loading…
Search for a command to run...
loading…
A Node.js proxy that enables communication between stdio-based clients and HTTP-based Model Context Protocol servers. It facilitates protocol translation, sessi
A Node.js proxy that enables communication between stdio-based clients and HTTP-based Model Context Protocol servers. It facilitates protocol translation, session management, and authentication to allow remote HTTP servers to function as local stdio servers.
A Node.js implementation of a Model Context Protocol (MCP) proxy that enables communication between stdio-based clients (like Antigravity) and HTTP-based MCP servers (running with streamableHttp).
This proxy allows you to use remote or HTTP-hosted MCP servers as if they were local stdio servers. It handles the JSON-RPC communication, session management, and optional authentication seamlessly.
graph LR
Client[Antigravity / Stdio Client] -->|stdio| Proxy[MCP Proxy]
Proxy -->|HTTP JSON-RPC| Upstream[Upstream MCP Server]
~/.mcp-session-cache for continuity.update tool to manually refresh the upstream connection and clear the session cache.npm install
The proxy can be configured using environment variables or a .env file:
| Variable | Description | Default |
|---|---|---|
UPSTREAM_MCP_URL |
The URL of the target HTTP MCP server. | http://localhost:8080/mcp |
UPSTREAM_AUTH |
Optional authentication header value (e.g., Bearer ...). |
(none) |
MCP_TIMEOUT_MS |
Timeout for upstream requests in milliseconds. | 15000 |
MCP_SESSION_ID |
Manually specify an initial session ID. | (none) |
You can run the proxy directly and optionally pass the upstream URL as the first argument:
node mcp-proxy.js https://your-remote-mcp-server.com/mcp
You can run the proxy directly without cloning using npx:
npx -y kiennh/mcp-http-stdio https://your-remote-mcp-server.com/mcp
The proxy is available as a Docker image:
docker run -i --rm \
-e UPSTREAM_MCP_URL="https://your-remote-mcp-server.com/mcp" \
-e UPSTREAM_AUTH="Bearer YOUR_TOKEN" \
ghcr.io/kiennh/mcp-http-stdio:latest
To use this proxy with Antigravity, add it to your mcp_config.json:
{
"mcpServers": {
"my-remote-server": {
"command": "npx",
"args": ["-y", "kiennh/mcp-http-stdio", "https://api.example.com/mcp"],
"env": {
"UPSTREAM_AUTH": "Bearer YOUR_TOKEN"
}
}
}
}
The proxy automatically adds a tool named update to the list of available tools. Calling update will:
~/.mcp-session-cache).ISC
Add this to claude_desktop_config.json and restart Claude Desktop.
{
"mcpServers": {
"mcp-http-stdio-proxy": {
"command": "npx",
"args": []
}
}
}