Mcp Gateway Go

Mcp Gateway Go

🚀 mcp-gateway-go

mcp-gateway-go 是一款轻量级的 Go 语言网关,它能够将标准输入输出(stdio)的模型上下文协议(MCP)服务器转换为 Server-Sent Events (SSE) 端点。借助这一功能,可实现通过 HTTP 与客户端(如网页浏览器或 AI 代理)进行实时通信。

🚀 快速开始

mcp-gateway-go 的使用分为安装和运行两个步骤,以下为你详细介绍。

📦 安装指南

使用以下命令安装 mcp-gateway-go

go install github.com/zhengkunwang223/mcp-gateway-go@latest

💻 使用示例

基础用法

安装完成后,可使用以下命令运行 mcp-gateway-go

mcp-gateway-go --port 7979 --baseUrl http://127.0.0.1:7979  --command "npx -y @modelcontextprotocol/server-filesystem /tmp"

参数说明

参数 详情
--port 7979 要监听的端口(默认为 7979
--baseUrl "http://localhost:7979" SSE 的基础 URL
--ssePath "/sse" 订阅 SSE 的路径(默认为 /sse
--messagePath "/message" 消息的路径(stdio→SSE,默认为 /message
--oauth2Bearer "some-access-token" 在请求中添加带有提供的 Bearer 令牌的 Authorization

📚 详细文档

额外资源

你可以通过以下链接获取更多相关资源:

  • 0 关注
  • 0 收藏,27 浏览
  • system 提出于 2025-10-03 04:51

相似服务问题

相关AI产品