How MCP works
mcp-remote: use a remote MCP server in any app
By Sophie Filer · Updated 1 Nov 2026
mcp-remote is a small npm package that your app starts like any local server. It connects to a remote MCP server for you, handles the browser sign-in, and passes the messages back and forth. You need it when an app or config file only accepts a command.
When you need it, and when you do not
| Situation | Use mcp-remote? |
|---|---|
| Claude Desktop's config file (it only starts programs) | Yes, or add the URL as a connector in Settings instead |
| A remote server that wants a fixed API key header in Claude Desktop | Yes: connectors cannot send one |
| An older or simpler app with no URL option | Yes |
| Claude Code, Cursor, VS Code, Codex, Windsurf | Usually not: they take a URL directly |
| ChatGPT | No: it only takes a URL, and cannot start programs |
Every MCP Shelf server page uses it for you where it is needed: the Claude Desktop tab of a remote server that needs a key header shows an mcp-remote config.
The basic config
Put the server URL after the package name. The -y stops npx from waiting for you to confirm the download, which an app cannot do.
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.context7.com/mcp"]
}
}
}The first time your app starts it, mcp-remote opens your browser so you can sign in to the service. It saves the tokens in ~/.mcp-auth and reuses them, so you only sign in again when they expire. It needs Node.js 18 or newer, and apps such as Claude Desktop use the Node on your system path, not one you installed somewhere else.
Sending an API key header
For servers that take a key instead of a browser sign-in, pass --header. Keep the key itself in env and refer to it by name:
{
"mcpServers": {
"example": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.example.com/mcp", "--header", "Authorization:${AUTH_HEADER}"],
"env": { "AUTH_HEADER": "Bearer YOUR_TOKEN" }
}
}
}Anyone on the same machine can read process arguments. To keep a key out of them, put one Name: value line per header in a file and pass --header-file /full/path/headers.txt instead.
Flags worth knowing
| Add to args | What it does |
|---|---|
| --transport sse-only | Use the older SSE transport. The default, http-first, tries Streamable HTTP and falls back to SSE. |
| --debug | Writes a detailed log to ~/.mcp-auth, named after the server. Turn it on when sign-in fails. |
| 9696 (a port after the URL) | Listen for the sign-in redirect on that port, for providers that need a fixed callback address. |
| --host 127.0.0.1 | Use this host in the callback address instead of localhost. |
| --resource https://tenant.example.com/ | Keep a separate sign-in per account when you add the same server twice. |
| --ignore-tool "delete*" | Hide tools that match a pattern from your app. Repeat it for more patterns. |
| --auth-timeout 60 | Wait longer than the default 30 seconds for the sign-in to finish. |
| --enable-proxy | Route through HTTPS_PROXY / HTTP_PROXY from env. |
| --allow-http | Allow plain http:// URLs. Only on a private network you trust. |
The full list is in the mcp-remote README, maintained by its author on GitHub.
When sign-in or the connection keeps failing
- Quit your app completely, then delete the saved sign-ins with
rm -rf ~/.mcp-auth(on Windows, delete the .mcp-auth folder in your user folder). Open the app again and sign in fresh. - Check
node --versionin a terminal says 18 or higher. - Behind a company VPN or proxy, point Node at your company certificate with an env entry:
"NODE_EXTRA_CA_CERTS": "/path/to/company-ca.pem". - Add
--debugand read the log in ~/.mcp-auth. - Still stuck? Test the URL on its own with MCP Inspector. If it fails there too, the problem is the server or your account, not mcp-remote.
Servers on MCP Shelf with a URL
| Server | Remote URL | Also runs locally |
|---|---|---|
| Context7 | https://mcp.context7.com/mcp | Yes |
| GitHub | https://api.githubcopilot.com/mcp/ | No |
| Exa | https://mcp.exa.ai/mcp | Yes |
| Supabase | https://mcp.supabase.com/mcp | No |
| Notion | https://mcp.notion.com/mcp | Yes |
| draw.io MCP | https://mcp.draw.io/mcp | Yes |
| GitMCP | https://gitmcp.io/docs | No |
| Apify | https://mcp.apify.com | Yes |
| AWS Knowledge MCP Server | https://knowledge-mcp.global.api.aws | No |
| TradingView MCP | https://mcp.tradingmcp.ai/mcp | Yes |
| Cloudflare MCP Servers | https://mcp.cloudflare.com/mcp | No |
| Perplexity MCP | https://api.perplexity.ai/mcp | Yes |
| Tavily MCP | https://mcp.tavily.com/mcp/ | Yes |
| Azure DevOps MCP | https://mcp.dev.azure.com/YOUR_ORGANIZATION | Yes |
| Terraform MCP Server | https://mcp.terraform.io/mcp | Yes |
| Ref MCP | https://api.ref.tools/mcp?apiKey=YOUR_REF_API_KEY | Yes |
Questions
Is mcp-remote made by Anthropic or the MCP project?
No. It is an open-source package by an independent developer, published on npm as mcp-remote. It is widely used, but treat it like any other local server: it sees the traffic it passes on.
Do I still need mcp-remote in Claude Desktop?
Only in the config file. For a server that signs in with OAuth or needs no sign-in, adding the URL under Settings → Connectors is simpler and needs no Node.js.
Where does mcp-remote keep my tokens?
In the .mcp-auth folder in your home folder, or wherever the MCP_REMOTE_CONFIG_DIR environment variable points. Deleting that folder signs you out of every server it connected to.
For bots & AI agents
Machine-readable versions of this guide and MCP Shelf. Fetch these instead of parsing this page.
This guide (.md)llms.txtllms-full.txtai.txtFull catalog (.md)API specMCP serverMCP manifestDeveloper docs