Cover image

MCP SSE服务器的网关演示

3 years

Works with Finder

3

Github Watches

8

Github Forks

101

Github Stars

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/gateway

Configuration

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:
<npm_global_root>/@mcphub/gateway/dist/src/mcphub-gateway.js

Common 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/gateway

2. 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/mcp

By 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/gateway
    
  2. Verify your Node.js installation:

    # Check Node version
    node --version
    
    # Check npm version
    npm --version
    
  3. Common issues:

    • If using Homebrew on macOS, make sure Node.js is properly linked:
      brew doctor
      brew link node
      
    • If you get permission errors, you might need to use sudo for the installation

License

Apache 2.0 License

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.

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • appcypher
  • 很棒的MCP服务器 - 模型上下文协议服务器的策划列表

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

    Reviews

    4 (1)
    Avatar
    user_yeiAL1aB
    2025-04-17

    I'm extremely impressed with the mcp-gateway by lightconetech. This tool has streamlined our API management and integration processes significantly. The robust design and seamless functionality make it an excellent choice for developers looking to enhance their project's connectivity. I highly recommend checking it out! More details can be found on their [GitHub page](https://github.com/lightconetech/mcp-gateway).