Remote MCP guide
Remote MCP Servers: How They Work and How to Connect One
A practical guide to remote MCP servers: Streamable HTTP versus stdio, OAuth, connecting Claude Code, Cursor and Claude, and what it takes to host your own.
Updated October 16, 2026
What a remote MCP server is
The Model Context Protocol defines how an AI application (the client) discovers and calls tools on a server. The first MCP servers ran locally: your editor started a program on your machine and talked to it over standard input and output. A remote MCP server is the same idea delivered as a web service. It already runs somewhere on the internet, and the client connects to its URL.
That changes who does the work. With a remote server there is nothing to install, no runtime to keep up to date, and one deployment serves every user. In exchange the server has to handle what a local process never worried about: authenticating each user, keeping their data apart, and staying available.
https://mcp.mcpbackend.com/mcp, and the tools let an AI coding agent create a database, auth and REST API for the app you are building.Streamable HTTP versus stdio
MCP messages are JSON-RPC either way. The transport is what carries them, and it decides whether a server can be remote.
| stdio (local) | Streamable HTTP (remote) | |
|---|---|---|
| How the client reaches it | Starts a child process | Sends HTTP POST requests to a URL |
| Where it runs | The user’s machine | Any server, edge platform or cloud |
| Authentication | Inherits the local user; secrets often in env vars | Its own sign-in, usually OAuth 2.1 |
| Updates | Each user reinstalls | Deploy once for everyone |
| Good for | Files, local tools, private scripts | Hosted products and shared team services |
Streamable HTTP replaced the earlier HTTP+SSE transport. A server can still stream responses when a tool takes a while, but everything starts with a POST to one endpoint. Our short note on Streamable HTTP or stdio covers what that means for MCPBackend specifically.
How sign-in works on a remote server
Because anyone can reach a public URL, a remote server that touches real accounts has to know who is calling. The MCP authorization spec builds on OAuth 2.1, and a typical first connection looks like this:
- 1
The client calls the server and gets a 401
The response points to the server’s OAuth metadata, which lists its authorization and token endpoints.
- 2
The client registers itself
Many servers support dynamic client registration, so the client gets a client ID without you creating one by hand.
- 3
You approve access in the browser
The client opens the server’s consent page. You sign in there; your password or code never passes through the AI tool.
- 4
The client exchanges the code for tokens
PKCE protects the exchange. The client stores an access token and a refresh token and sends the access token on each request.
- 5
Tokens refresh quietly
When the access token expires, the client uses the refresh token instead of asking you to sign in again.
MCPBackend follows this flow. If you are already signed in to the dashboard you approve straight away; otherwise it emails a four-digit code and returns you to the consent page.
Connect a remote MCP server to your client
Every client needs the same two things, a name and the server URL. These examples use MCPBackend; swap in any other remote server’s URL.
Claude Code:
claude mcp add --transport http mcpbackend https://mcp.mcpbackend.com/mcpCursor, in ~/.cursor/mcp.json or a project’s .cursor/mcp.json:
{
"mcpServers": {
"mcpbackend": { "url": "https://mcp.mcpbackend.com/mcp" }
}
}Claude and Claude Desktop: Settings → Connectors → Add custom connector, paste the URL and click Connect. Other clients, including ChatGPT’s connector settings, have their own forms and plan requirements, so check that the client supports remote servers with OAuth before you start. The MCP config generator produces the right snippet for several clients.
Once connected, ask the agent to list its tools. If they show up, the connection and sign-in worked.
Hosting your own remote MCP server
If you are exposing your own product to AI clients, you will write and deploy a server. The common starting points are:
- TypeScript SDK. The official
@modelcontextprotocol/sdkpackage includes a Streamable HTTP server transport you can mount in Node frameworks such as Express or Hono. - Python and FastMCP. The official Python SDK’s FastMCP interface can serve over Streamable HTTP instead of stdio, which makes it straightforward to run behind any Python web host.
- Cloudflare Workers. The Cloudflare Agents SDK provides an MCP server class and an OAuth provider library, so a server can run on the edge without managing machines. MCPBackend’s own MCP server runs on Workers.
Whichever you pick, the hard parts are the same: OAuth and token storage, isolating each user’s data, sensible timeouts for slow tools, rate limits, and logging that never records secrets. Budget for those before the tool code itself.
You may not need a server of your own at all. If the goal is a backend for an app you are building with an AI editor, connecting a hosted MCP database gives the agent tables, auth and an API without anything to deploy. See what an MCP backend is for how that model works.
Troubleshooting remote MCP connections
Most connection problems fall into a few patterns:
| Symptom | Usual cause | Guide |
|---|---|---|
| Unauthorized after connecting | A stale or missing grant for the agent’s account, separate from your app’s keys | MCP unauthorized after connecting |
| Consent page keeps reopening | A callback mismatch, stored connection state or the wrong account | MCP OAuth consent loop |
| Connected but no tools | Discovery did not finish, or the client has not enabled the tools | MCP tools not visible |
| A tool call times out | The change may still have happened; inspect before retrying | MCP tool timeout |
The step-by-step fixes are in the developer library: unauthorized after connecting, OAuth consent loop, tools not visible and tool timeouts. The full MCP and agent workflows topic has more.
Frequently asked questions
What is a remote MCP server?+
A remote MCP server is a Model Context Protocol server that runs on the internet and is reached by URL, instead of a program your MCP client starts on your own machine. Clients talk to it over HTTP, usually the Streamable HTTP transport, and it normally asks the user to sign in with OAuth.
What is the difference between a remote and a local MCP server?+
A local server is launched by the client as a child process and talks over stdio, so it only exists on that one computer. A remote server is already running somewhere else, is shared by every client that connects, and handles authentication itself. Remote servers suit hosted services; local servers suit tools that need your files or machine.
Is SSE still used for remote MCP servers?+
The older HTTP+SSE transport has been replaced by Streamable HTTP in the MCP specification. Some servers still offer an SSE endpoint for older clients, but new servers should implement Streamable HTTP.
How do I connect a remote MCP server to Claude Code?+
Run claude mcp add --transport http <name> <url>. Claude Code opens the server's sign-in page in your browser when OAuth is required. For MCPBackend that is: claude mcp add --transport http mcpbackend https://mcp.mcpbackend.com/mcp.
Do I need to build my own remote MCP server?+
Only if you are exposing your own service to AI clients. If what you need is a database, auth and an API for an app you are building with an AI editor, you can connect a hosted server such as MCPBackend instead of writing and operating one.
Why does my client say unauthorized after connecting?+
The client reached the server, but the agent's own OAuth grant was missing, stale or for a different account. That grant is separate from your app's API keys and your dashboard session. Reconnect through the client, finish the consent screen and check which account you approved. The linked troubleshooting guide covers the details.
Build the backend, skip the setup
Give your AI editora real backend
Start with a free project. Database, REST API, auth, permissions, webhooks, and MCP are included.