Connect an MCP Client that only supports local (stdio) servers to a Remote MCP Server.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add remote --env SERVER_URL='<SERVER_URL>' -- npx mcp-remote '{{config.SERVER_URL}}'~/.codex/config.toml
[mcp_servers.remote]
command = "npx"
args = ["mcp-remote", "{{config.SERVER_URL}}"]
env = { SERVER_URL = "<SERVER_URL>" }
# codex mcp add remote --env SERVER_URL='<SERVER_URL>' -- npx mcp-remote '{{config.SERVER_URL}}'~/.cursor/mcp.json
{
"mcpServers": {
"remote": {
"command": "npx",
"args": [
"mcp-remote",
"{{config.SERVER_URL}}"
],
"env": {
"SERVER_URL": "<SERVER_URL>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"remote": {
"type": "stdio",
"command": "npx",
"args": [
"mcp-remote",
"{{config.SERVER_URL}}"
],
"env": {
"SERVER_URL": "<SERVER_URL>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"remote": {
"command": "npx",
"args": [
"mcp-remote",
"{{config.SERVER_URL}}"
],
"env": {
"SERVER_URL": "<SERVER_URL>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"remote": {
"command": "npx",
"args": [
"mcp-remote",
"{{config.SERVER_URL}}"
],
"env": {
"SERVER_URL": "<SERVER_URL>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"remote": {
"command": "npx",
"args": [
"mcp-remote",
"{{config.SERVER_URL}}"
],
"env": {
"SERVER_URL": "<SERVER_URL>"
}
}
}
}Environment variables
SERVER_URL
Replace the placeholders with your own credentials and keep them out of version control.