LABSCO SUMMARY
The stopgap between remote MCP servers and clients that cannot reach them yet.
It is meant to be deleted: the moment your client supports authorized remote servers directly, the line comes out of the config. Until then it is what lets a stdio-only client use a server that lives on the web.
What it is
A bridge, not a server of its own. Most MCP clients today only launch local stdio servers; this stands in as that local process and forwards everything to a remote HTTP or SSE server, handling the authorization flow on the way.
What you get
- The standard one-liner:
npx mcp-remote https://<your-remote-mcp-server>/ssein thecommandandargsof any client that takes them — Claude Desktop, Cursor and Windsurf all use the same shape - Custom headers with
--header, to pass a bearer token or bypass the OAuth flow entirely - Isolated sessions per instance with
--resource, so two tenants of the same remote server keep separate OAuth sessions and token storage; it is sent as the RFC 8707 resource indicator on the authorization, token and refresh requests alike --disable-resource-parameterfor authorization servers that reject it outright, such as Microsoft Entra ID v2- Transport strategies with
--transport:http-first(the default, falling back to SSE on a 404),sse-first,http-onlyandsse-only - Static OAuth client metadata and client information via
--static-oauth-client-metadataand--static-oauth-client-info, for servers that expect pre-registered clients rather than dynamic registration --ignore-toolwith wildcard patterns, filtering tools out oftools/listresponses and blocking calls to them- Operational flags:
--allow-httpfor trusted private networks,--enable-proxyto honourHTTPS_PROXYandNO_PROXY,--debugfor verbose logs, and--silent - A client mode for diagnosis:
npx -p mcp-remote@latest mcp-remote-client https://<your-remote-mcp-server>/sseruns the full authorization flow and lists the remote tools and resources
Requirements
Node 18 or higher — Claude Desktop uses your system Node even if a newer one is installed elsewhere. Credentials are stored under ~/.mcp-auth, or wherever MCP_REMOTE_CONFIG_DIR points; clearing that directory is the first fix for a stuck token exchange. The OAuth redirect listens on 3334 by default, changeable by passing a port after the server URL, with --host and --callback-path for the rest of the callback shape. Cursor, Codex-Cli and Claude Desktop on Windows do not escape spaces inside args, so pass a header as Authorization:${AUTH_HEADER} with no space and keep the space in the environment variable. Behind a VPN, NODE_EXTRA_CA_CERTS may need to point at your CA file. Glen Maddern wrote it; the repository has since moved to github.com/punkpeye/mcp-remote, which the npm package names as its home, and the README there credits him as the original author.
Setup effort
Get your endpoint, then paste it — add your endpoint to your client
USE CASES
Using a remote server from a stdio-only client
One line in the client config and the remote server appears as a local one, OAuth flow included.
Connecting to two tenants of the same service
Give each entry its own --resource value; every unique combination of URL, resource and headers keeps a separate OAuth session and token store.
Getting past an authorization server that rejects the resource parameter
Microsoft Entra ID v2 answers AADSTS9010010; pass --disable-resource-parameter to omit it entirely.
Hiding destructive tools from the model
Filter with wildcard patterns — --ignore-tool 'delete*' removes them from tools/list and blocks calls to them, not just hides them.
Working out why authentication keeps failing
Run client mode from a terminal to walk the whole authorization flow outside your MCP client, and add --debug to get timestamped logs of every step under ~/.mcp-auth.
BEFORE YOU INSTALL
What to know first
Requires
npx on PATH
INSTALLATION
Connect your client
MCP Clients
Claude Desktop, Cursor, Windsurf
{
"mcpServers": {
"remote-example": {
"command": "npx",
"args": [
"mcp-remote",
"https://<YOUR_REMOTE_MCP_SERVER>/sse"
]
}
}
}Any MCP client — auth header, Windows
{
"mcpServers": {
"remote-example": {
"command": "npx",
"args": [
"mcp-remote",
"https://<YOUR_REMOTE_MCP_SERVER>/sse",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Bearer <YOUR_AUTH_TOKEN>"
}
}
}
}Values written as ${…} are filled in only by clients that expand variables.