How to connect Cursor to a server
Cursor talks to a server through MCP. You can run your own MCP server on a VPS and add its address to Cursor, 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
Cursor’s agent works with a server through MCP (Model Context Protocol): a program called 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.
There are two ways to give Cursor 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 Cursor.
- 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 Cursor’s agent puts your projects online through it.
A note on names. Cursor’s documentation now opens at docs.grok.com, where the product is called Grok Build: links to cursor.com/docs redirect there. The file names and the install links on those pages still say cursor, so everything below applies to the Cursor editor you have. We read the pages on 5 December 2026.
Where Cursor keeps its servers
Cursor reads MCP servers from two files (MCP docs):
~/.cursor/mcp.jsonfor every project on your computer;.cursor/mcp.jsoninside a project, for that project only.
A remote server is one entry under mcpServers with its address:
{
"mcpServers": {
"my-server": { "url": "https://mcp.example.com/mcp" }
}
}
If the server wants a key in a header, add "headers": {"Authorization": "Bearer …"} next to url. Cursor speaks stdio, SSE and Streamable HTTP. Cloud agents don’t read ~/.cursor/mcp.json: they use servers set up on cursor.com/agents and your team’s servers.
You can also skip the file: a service can publish an install link of the form cursor://anysphere.cursor-deeplink/mcp/install?name=…&config=…, where config is the same JSON in base64. A click opens Cursor, and Cursor offers to install the server (install links).
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. Cursor on your laptop can reach a server in your own network, but cloud agents and your teammates can’t. - A sign-in. Cursor supports OAuth with PKCE and finds the sign-in from your server’s metadata. It registers itself on your server (Dynamic Client Registration), or you put a fixed client ID in an
authobject inmcp.json. The callback addresses for a fixed client arehttp://localhost:8787/callbackfor the desktop app andhttps://www.cursor.com/agents/mcp/oauth/callbackfor the web (MCP docs). A simpler option is a long random key in a header, but then anyone who sees the file has the key. - Upkeep. The program has to run day and night, restart after a crash or a reboot, and get updates. If the VPS is down, the agent loses its tools.
- A firewall that leaves HTTPS open and closes everything you don’t need.
Add it to Cursor
- Put the server into
~/.cursor/mcp.json(all projects) or.cursor/mcp.json(one project), as shown above, and save the file. - Open Customize in the sidebar: the server is listed there and can be switched on and off.
- If the server uses OAuth, Cursor opens your browser to sign in on first use.
- Ask the agent to do something the server offers and check that it calls the tool.
Keep it safe
By default Cursor asks before it calls an MCP tool, and you can expand the call to see its arguments. MCP tools follow the same run modes as terminal commands: in Auto-review, tools on your allow list run at once and the rest pass a check; an empty allow list allows every tool of that server (MCP docs). 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
.cursor/mcp.jsonin a repository: anyone with the repository gets them. - Offer only the tools you need, and keep the allow list short.
- Read the call before you approve anything that changes or deletes data.
The BitHut way: nothing to host
If what you want from “Cursor 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, with the automatic client registration Cursor expects. On the Connect page press Add BitHut to Cursor, then Install, sign in to BitHut and press Allow. If the button doesn’t open Cursor, the same page has a sentence you paste to Cursor’s agent instead.
Then you just talk to the agent:
- “Put this project online on BitHut”: it uploads the code, BitHut builds and checks it, and the agent gets the address.
- “Why did my bot stop?”: the agent reads the logs and the error and fixes the code.
- “Roll back to yesterday’s version”: the agent 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 Cursor end to end ourselves. Other AIs and their steps are on the same Connect page.
When something doesn’t work
- The server doesn’t connect. Open the Output panel (Ctrl+Shift+U, on a Mac ⇧⌘U) and pick MCP Logs in the list: connection, sign-in and crash errors are there (MCP docs).
- The server is missing from Customize. Check that the JSON is valid and that the entry sits under
mcpServers. - A cloud agent doesn’t see the server. Cloud agents don’t read
~/.cursor/mcp.json; add the server on cursor.com/agents. - The sign-in expired. If your server gives no refresh token, Cursor asks you to sign in again when the token runs out.
- A tool call failed. The chat shows the error; retry it or read the logs. Other servers keep working.
- The install link opens nothing. Use the file instead, or paste the sentence from the Connect page to the agent.
- BitHut is connected but the agent doesn’t answer about projects. Ask it: “Show my BitHut projects.” If it lists them, the connection works.