MCP Gateway solves a critical compatibility issue between Claude Desktop and HTTP/SSE-based Model Context Protocol servers. Claude Desktop currently only supports stdio-based MCP servers, while many MCP implementations use HTTP with Server-Sent Events (SSE) transport. This gateway acts as a protocol translator, enabling seamless communication between these different implementations. By installing MCP Gateway, Claude Desktop users can access a wide range of HTTP/SSE MCP servers without waiting for native support. The gateway handles all the protocol conversion transparently, accepting stdio input from Claude Desktop, converting and forwarding requests to HTTP/SSE MCP servers, and converting SSE responses back to stdio format.
MCP Gateway bridges the protocol gap between Claude Desktop (which only supports stdio-based MCP servers) and HTTP/SSE-based MCP implementations. This allows Claude Desktop users to access a wider range of MCP services.
npm install -g @mcphub/gateway
# View the root directory of global packages
npm root -g
# The gateway will be at:
<npm_global_root>/@mcphub/gateway/dist/src/mcphub-gateway.js
Common installation locations:
/opt/homebrew/lib/node_modules/@mcphub/gateway/dist/src/mcphub-gateway.js
/usr/local/lib/node_modules/@mcphub/gateway/dist/src/mcphub-gateway.js
%AppData%\npm\node_modules\@mcphub\gateway\dist\src\mcphub-gateway.js
You can verify the installation and path with:
npm list -g @mcphub/gateway
Locate your Claude Desktop configuration file:
~/Library/Application Support/Claude Desktop/config.json
%APPDATA%\Claude Desktop\config.json
Add the gateway configuration (replace the path with your actual installation path):
{
"mcpServers": {
"mcp-gateway": {
"command": "node",
"args": ["/path/to/node_modules/@mcphub/gateway/dist/src/mcphub-gateway.js"]
}
}
}
By default, the gateway connects to the MCP Hub server at https://server.mcphub.ai/api/mcp
. To connect to a different MCP server, set the MCP_SERVER_URL
environment variable:
export MCP_SERVER_URL=https://your-mcp-server.com/api/mcp
If you encounter issues:
node --version
npm --version
npm list -g @mcphub/gateway
For permission errors during installation, you may need to use sudo
.
On macOS with Homebrew, ensure Node.js is properly linked:
brew doctor
brew link node
If problems persist, file an issue on the GitHub repository.