Skip to content
Agent-ready apps

Let your users connect VS Code to your app

Agent-ready apps: make the app you build with the SDK ready for VS Code. Your users add your app's MCP server to VS Code, sign in on your hosted page and approve it, and VS Code acts as them, never as more.

How your users add your app to VS Code

Give your users your app's MCP address. npx buildbase agent install --url <your MCP address> prints the setup for each AI tool, VS Code included, with your address filled in.

  1. In VS Code, your user adds a remote MCP server: code --add-mcp, or .vscode/mcp.json. They use your app's MCP address, https://app.example.com/api/mcp in these examples, or the command or config below.
  2. Sign in. The first time it connects, VS Code opens a browser to sign in. It registers its own client; the account then appears in the Accounts menu, where you can sign out.
  3. Your hosted sign-in page opens. Your user signs in and approves the consent screen, which names VS Code and what it asks for.
  4. VS Code can now use your tools, as that user and with that user's permissions.
terminalBash
code --add-mcp '{"name":"acme","type":"http","url":"https://app.example.com/api/mcp"}'
.vscode/mcp.jsonJSON
{
  "servers": {
    "acme": {
      "type": "http",
      "url": "https://app.example.com/api/mcp"
    }
  }
}

The plan it needs

On Copilot Business and Enterprise, the organization's "MCP servers in Copilot" policy must be on, and it is off by default. GitHub says the policy applies to those two plans only.

How sign-in looks in VS Code

The first time it connects, VS Code opens a browser to sign in. It registers its own client; the account then appears in the Accounts menu, where you can sign out.

What is different in VS Code

  • VS Code runs on your user's own computer, so it reaches any address that computer can, including a development server while you test.
  • Your server's built-in tools are read-only until you allow changes. Choose which tools the agent may use from Configure Tools in the chat input, and approve each call when VS Code asks.
  • VS Code uses servers, not mcpServers, and type: "http".
  • A one-click install link opens a page that shows the server before you install it.

If it does not work in VS Code

VS Code cannot register or sign in
Turn on Let agents register themselves, with a base client, in the console under Authentication, then Agent readiness. VS Code registers its own client the first time it connects.
VS Code does not connect
MCP: List Servers starts, stops and restarts a server, and Show Output shows its log. Run MCP: Reset Cached Tools after the tool list changes.
Check your server the way VS Code will
Run npx buildbase agent doctor --url <your MCP address>. It walks the first contact a client makes (the sign-in challenge, the metadata, redirects, a stable tool list) and exits 1 when a check fails.

Frequently Asked Questions

Which VS Code plan do your users need?

On Copilot Business and Enterprise, the organization's "MCP servers in Copilot" policy must be on, and it is off by default. GitHub says the policy applies to those two plans only.

Does my MCP server need to be public for VS Code?

No. VS Code runs on your user's computer, so it reaches what that computer reaches. Your users still need an address they can open, and production should be public HTTPS.

Can VS Code change data in my app?

Only through tools you allow, and only as the user who connected it. The built-in tools are read-only by default, and a tool that needs extra scopes is hidden until the user grants them.