MCP流式HTTP服务器(JavaScript)
使用Streamable HTTP传输的MCP服务器,与Docker Compose一起运行并连接到LM Studio。建于 包子 (没有Node,就没有npm)。
使用Docker Compose运行
docker compose up --build验证
- 健康检查: http://localhost:8000/health
- MCP端点: http://localhost:8000/mcp(流式HTTP)
LM工作室配置
打开LM工作室→ 程序标签 → 安装 → 编辑mcp.json 并添加:
{
"mcpServers": {
"my-local-mcp": {
"url": "http://localhost:8000/mcp"
}
}
}保存后,您的模型将可以访问 add, greet,以及 reverse_text 工具。
地方发展(与Bun)
bun install
bun run dev添加工具
添加更多 mcpServer.registerTool() 来电 src/index.ts 重建:
docker compose up --build