How to connect VS Code to a server
In VS Code, the GitHub Copilot agent talks to a server through MCP. You can run your own MCP server on a VPS and add its address, or connect a service whose MCP server already exists. Here is what each way takes.
Try it on your own project
Choose AI Claude CodeCodexGeminiCursorVS CodeAnother AI
Claude opens with BitHut already filled in.
Press Add, then Connect.
Sign in to BitHut and press Allow.
Done: BitHut is in Customize → Connectors in Claude (not in Plugins).
Claude Code picks BitHut up by itself: type /mcp and look for “claude.ai BitHut”. Was it already open? Restart it.
Ask it: “Show my BitHut projects.” If it answers, you are connected.
Claude says “You already have a connector with this URL”?
BitHut is already in your Claude. Open Customize → Connectors and find BitHut. If it shows Connect, press it, sign in to BitHut and press Allow. To use another BitHut account, choose Remove there, then press the button above again.
Signed in to Claude Code with an API key, not a Claude account?
Then the button above won’t reach it. Paste this into Claude Code instead:
Add the BitHut MCP server for me: claude mcp add --transport http bithut https://api.bithut.app/mcp
Then type /mcp, pick bithut, sign in to BitHut and press Allow.
Codex has no add button yet. Copy this address:
https://api.bithut.app/mcp
In Codex, open Settings, then MCP servers, then Add server.
Name it BitHut, choose Streamable HTTP, paste the address and press Save.
Restart Codex, press Authenticate next to BitHut, sign in to BitHut and press Allow.
Ask it: “Show my BitHut projects.” If it answers, you are connected.
Antigravity can add BitHut by itself. Paste this into its chat:
Add the BitHut MCP server for me. Its address is https://api.bithut.app/mcp
Then open Customizations, then MCP Servers, and press Authenticate next to BitHut. Sign in to BitHut and press Allow. If Antigravity asks for a code, copy it from the page and paste it back.
Ask it: “Show my BitHut projects.” If it answers, you are connected.
Or add it yourself
In the Antigravity editor, click … at the top of the agent panel, then MCP Servers, Manage MCP Servers, View raw config.
Under “mcpServers”, add this line and save the file.
"bithut": {"serverUrl": "https://api.bithut.app/mcp"}
When Antigravity asks, sign in to BitHut and press Allow.
Cursor opens and asks to install BitHut.
Press Install.
Sign in to BitHut and press Allow.
Ask it: “Show my BitHut projects.” If it answers, you are connected.
The button didn’t open Cursor? Ask its agent
Paste this into Cursor’s chat (Agent). It adds BitHut by itself.
Add the MCP server "bithut" with the URL https://api.bithut.app/mcp to ~/.cursor/mcp.json under "mcpServers", keeping the servers already there.
Then open Cursor Settings, find BitHut among the MCP servers, sign in and press Allow.
VS Code opens with BitHut ready to install.
Press Install.
Sign in to BitHut and press Allow.
Ask it: “Show my BitHut projects.” If it answers, you are connected.
The button didn’t open VS Code? Steps by hand
Open the Command Palette (Ctrl+Shift+P, on a Mac ⇧⌘P) and run “MCP: Add Server”.
Choose HTTP, paste this address and name the server bithut.
https://api.bithut.app/mcp
When VS Code asks, sign in to BitHut and press Allow.
Find where your AI app adds MCP servers. It may be called MCP servers, connectors or tools.
Add a remote (HTTP) server with this address.
https://api.bithut.app/mcp
If it asks how to sign in, choose OAuth. Sign in to BitHut and press Allow.
Ask it: “Show my BitHut projects.” If it answers, you are connected.
Can’t find the setting? Ask your AI: “How do I add a remote MCP server here?”
Copy the prompt into it: Show my BitHut projects
The short answer
VS Code works with MCP through GitHub Copilot: an MCP server offers the agent tools, such as “show the logs” or “restart the app”, and the agent calls them while it works on your code. Without Copilot there is no agent to call them.
There are two ways to give VS Code such a server:
- Your own MCP server on your VPS. You install it, give it a public HTTPS address, protect it with a sign-in and add that address to VS Code.
- A service that already runs an MCP server. You add its address and sign in. BitHut works this way: there is nothing to install, and Copilot puts your projects online through it.
Everything below comes from the VS Code and GitHub documentation, read on 5 December 2026. One change matters if you followed an older tutorial: the .vscode/mcp.json file with a servers object belongs to the editor-managed setup, which VS Code calls deprecated and plans to remove in February 2027 (MCP configuration). New setups go to the Copilot files below.
What you need on the VS Code side
- GitHub Copilot. MCP and agent mode are included in Copilot Free, Pro, Pro+ and Max (Copilot plans). With a Business or Enterprise seat, your organization has to turn on the “MCP servers in Copilot” policy, which is off by default (GitHub Docs).
- VS Code 1.99 or later.
- Copilot picked as the agent in the chat’s session list.
Where VS Code keeps the servers
For Copilot there are two places (MCP configuration):
~/.copilot/mcp-config.jsonfor you, in every workspace on this computer;.mcp.jsonin the workspace root, to share the server with your team through the repository.
A remote server is one entry under mcpServers:
{
"mcpServers": {
"my-server": { "type": "http", "url": "https://mcp.example.com/mcp", "tools": ["*"] }
}
}
type is http (VS Code tries Streamable HTTP first and falls back to SSE). headers adds a key in a header if the server wants one.
You don’t have to edit the file by hand. Run Chat: Open Customizations, go to MCP Servers, press Add Server (+), choose HTTP, paste the address, give the server a name and pick Copilot Global (just you) or the workspace .mcp.json (the team). The command MCP: Add Server starts the same flow (MCP servers).
A service can also publish an install link, vscode:mcp/install?… or its web form https://vscode.dev/redirect?url=…. VS Code then opens the server’s page for you to review before installing (extension guide).
Your own MCP server on a VPS
What you need
- An MCP server program. Either one a service publishes, or one you (or your AI) write for your own tasks.
- A public HTTPS address, for example
https://mcp.example.com/mcp: a domain, a certificate and a proxy in front of the program. - A sign-in. VS Code handles OAuth itself. It first uses a client ID you set in the config, then a saved registration, then a Client ID Metadata Document if your server supports it, and Dynamic Client Registration as the last resort (extension guide). If you register VS Code by hand, its callback addresses are
http://127.0.0.1:33418/andhttps://vscode.dev/redirect. A client secret goes into VS Code’s secret storage, not into the file. - Upkeep. The program has to run day and night, restart after a crash or a reboot, and get updates. If the VPS is down, Copilot loses its tools.
- A firewall that leaves HTTPS open and closes everything you don’t need.
Working on the VPS itself
If you open the VPS in VS Code as a remote host, the address of an HTTP server doesn’t change: storing the config on the remote side doesn’t move the service (manage MCP servers). For Copilot sessions on a remote host, put the server into .mcp.json in that workspace or into the Copilot user file on that host: your local ~/.copilot/mcp-config.json isn’t carried over.
Keep it safe
Copilot asks before a tool call unless your permission level or a saved approval says otherwise. You can allow a call once, for the session, or always; Chat: Manage Tool Approval shows the approvals per server and per tool, and Chat: Reset Tool Confirmations clears them (approvals). Servers from a workspace file follow Workspace Trust, so an untrusted folder can’t start them. For your own VPS, our advice:
- Never give an AI the root password or a tool that runs any command as root. Give the MCP server its own user with access only to what it needs.
- Keep keys out of
.mcp.jsonin a repository: anyone with the repository gets them. - Offer only the tools you need, and keep global auto-approval off.
- Read the call before you approve anything that changes or deletes data.
The BitHut way: nothing to host
If what you want from “VS Code on a server” is to put a site, a bot or a script online, you don’t need a VPS of your own. BitHut already runs an MCP server at https://api.bithut.app/mcp. On the Connect page press Add BitHut to VS Code: VS Code opens with BitHut ready to install. Press Install, sign in to BitHut and press Allow.
Then you just talk to Copilot:
- “Put this project online on BitHut”: it uploads the code, BitHut builds and checks it, and Copilot gets the address.
- “Why did my bot stop?”: Copilot reads the logs and the error and fixes the code.
- “Roll back to yesterday’s version”: Copilot asks you to confirm, then does it.
Keys are stored apart from the code, sites start private behind a password page, and the price is fixed for the account: from $5 a month, see pricing. The first 14 days are free.
To be clear: we have not yet run BitHut with VS Code end to end ourselves. Other AIs and their steps are on the same Connect page.
When something doesn’t work
- There is no MCP in the chat. Check that Copilot is picked as the agent and, with a Business or Enterprise seat, that your organization allows MCP servers.
- The server doesn’t start. Run MCP: List Servers, pick the server and choose Show Output to read its log (manage MCP servers). The same list has Start, Restart and Authenticate.
- A workspace server is blocked. The folder isn’t trusted; trust it, or run MCP: Reset Trust if you declined earlier.
- The sign-in fails. Press Authenticate on the server in MCP: List Servers; for a server without automatic registration, set a client ID in the config.
- Old tools still show up. Run MCP: Reset Cached Tools.
- “Cannot have more than 128 tools per request”. This limit is documented for the editor-managed setup: open Configure Tools and switch off servers or tools you don’t need (tools).
- BitHut is connected but Copilot doesn’t answer about projects. Ask it: “Show my BitHut projects.” If it lists them, the connection works.