mcp-gateway
A gateway demo for MCP SSE Server JavaScript-based implementation.
Documentation
MCP Server Gateway
A gateway service that bridges the stdio-based Model Context Protocol (MCP) implementation in Claude Desktop with HTTP/SSE-based MCP servers. This solves the protocol compatibility gap since Claude Desktop currently only supports stdio-based MCP servers. See the discussion here.
Why This Gateway?
Claude Desktop App currently only supports stdio protocol for MCP servers, while many MCP servers use HTTP with Server-Sent Events (SSE) transport. This gateway acts as a protocol translator, allowing Claude Desktop to communicate with any HTTP/SSE MCP server by:
1. Accepting stdio input from Claude Desktop
2. Converting and forwarding requests to HTTP/SSE MCP servers
3. Converting SSE responses back to stdio format for Claude Desktop
Installation
Install the gateway globally using npm:
npm install -g @mcphub/gatewayConfiguration
1. Find the Gateway Path
After installation, find where npm installed the gateway using these commands:
# This shows the root directory of global packages
npm root -g
# The gateway will be located at:
/@mcphub/gateway/dist/src/mcphub-gateway.jsCommon global package locations:
- macOS (Homebrew Node): `/opt/homebrew/lib/node_modules/@mcphub/gateway/dist/src/mcphub-gateway.js`
- macOS (default): `/usr/local/lib/node_modules/@mcphub/gateway/dist/src/mcphub-gateway.js`
- Windows: `%AppData%\npm\node_modules\@mcphub\gateway\dist\src\mcphub-gateway.js`
Verify the installation and path:
npm list -g @mcphub/gateway2. Configure Claude Desktop
Create or update your Claude Desktop configuration file:
On macOS
Location: `~/Library/Application Support/Claude Desktop/config.json`
On Windows
Location: `%APPDATA%\Claude Desktop\config.json`
Add this configuration (using the path you found in step 1):
{
"mcpServers": {
"server-name": {
"command": "node",
"args": ["/opt/homebrew/lib/node_modules/@mcphub/gateway/dist/src/mcphub-gateway.js"]
}
}
}Note: Replace the path in `args` with your actual path from step 1.
3. Configure MCP Server Connection
The gateway uses an environment variable to specify which MCP server to connect to:
# Set the MCP server URL (optional)
export MCP_SERVER_URL=https://your-mcp-server.com/api/mcpBy default, the gateway connects to the MCP Hub server at `https://server.mcphub.ai/api/mcp`, which provides access to various pre-configured MCP services.
4. Start Claude Desktop
Start or restart Claude Desktop to apply the changes.
Troubleshooting
1. If you can't find the gateway path:
# List all global packages and look for @mcphub/gateway
npm list -g
# Or specifically check the gateway
npm list -g @mcphub/gateway2. Verify your Node.js installation:
# Check Node version
node --version
# Check npm version
npm --version3. Common issues:
brew doctor
brew link nodeLicense
Support
If you encounter any issues or have questions:
- File an issue on GitHub
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Frequently asked questions
What is mcp-gateway?
mcp-gateway is A gateway demo for MCP SSE Server JavaScript-based implementation.
How do I install mcp-gateway?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is mcp-gateway open source?
Yes — it is hosted on GitHub at https://github.com/lightconetech/mcp-gateway and has 146 stars.
Related MCP tools
🔥 Official Firecrawl MCP Server - Adds powerful web scraping and search to Cursor, Claude and any other LLM clients. JavaScript-based implementation.
CTTF: MCP integration between Cursor and Figma, allowing Cursor Agentic AI to communicate with Figma for reading designs and modifying them programmatically.
A server that integrates Linear's project management system with the Model Context Protocol (MCP) to allow LLMs to interact with Linear.
Agent Framework For Fintech for the Model Context Protocol. Enhance AI assistants with powerful integrations. Python-based implementation.
An MCP server that allows MCP clients like Claude Desktop or Cursor to perform actions in the Unity Editor C#-based implementation.
On-premises conversational RAG with configurable containers for the Model Context Protocol. Enhance AI assistants with powerful integrations.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP