DocsAI & automation

Connect VS Code to Mangobeds with MCP

2 min read

VS Code supports the Model Context Protocol through GitHub Copilot’s agent mode, so it can read your live Mangobeds data and answer questions about it while you work. This guide covers VS Code specifically. For the background on MCP, or for a different tool, start with Connect Mangobeds to AI tools with MCP.

VS Code runs on your own computer and can send a header with each request, so it uses your API key rather than signing in.

Before you start

In Mangobeds, go to Apps > MCP and pick VS Code. The snippet shown there already has your API key in it. Everything below uses a placeholder instead.

Add the server

Add this to .vscode/mcp.json in your project, or to your user-level MCP configuration if you want it everywhere, then reload VS Code:

{
  "servers": {
    "mangobeds": {
      "type": "http",
      "url": "https://api.mangobeds.com/mcp",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Note that VS Code uses servers, not mcpServers, and wants an explicit “type”: “http”. Copying a Cursor or Claude Desktop snippet across is the most common reason this does not work: the shape is close enough to look right and different enough to fail.

Open the Chat view, switch it to Agent mode, and ask “what properties do I have in Mangobeds?” to check it works.

Keep your key out of your repository

.vscode/mcp.json sits inside your project, so it is committed along with everything else unless you stop it. Add it to .gitignore, or put the server in your user-level configuration instead, where it is outside any repository and available in every project.

If a key has already been pushed somewhere it should not be, delete it from Apps > MCP and create a new one. Deleting takes effect immediately, and anything still using the old key stops working, so update your other tools afterwards.

What you can ask

VS Code can list your properties itself, then answer from your live data: bookings and who is checking in, availability, why a room is blocked on a date, what a room costs on a given day, your seasonal rates, and your guests. With permission it can also correct a guest’s details, add a guest to a booking, and send one of your saved messages.

An API key carries every permission, so a connection made this way can do all of it. If you would rather grant read-only access, use Claude in the browser instead, which asks you to tick what it may do.

If it does not connect

  • Check you used “servers” and “type”: “http”. This is the difference from every other tool’s file and the usual cause.
  • Check you are in Agent mode. MCP tools are not available in the plain chat modes.
  • Reload VS Code. The file is read at startup.
  • Check the key. Copy it again from Apps > MCP; a regenerated key makes the old one stop working immediately.
  • Start a new chat. The available tools are picked up when a conversation starts.