使用说明
气象MCP服务器
气象MCP服务器,为AI代理提供美国气象服务的天气警报和预报
遵循指南 构建MCP服务器
如何跑步
克隆存储库
克隆Github存储库
git clone git@github.com:frenoid/sample-mcp-server.git
输入目录
cd sample-mcp-server
运行服务器
服务器需要2个env MCP_SERVER_HOST 和 MCP_SERVER_PORT 以控制主机和端口绑定。
默认值如下
export MCP_SERVER_HOST=127.0.0.1
export MCP_SERVER_PORT=8080
将服务器暴露给端口上的外部服务 5555,使用以下命令运行
MCP_SERVER_HOST=0.0.0.0 MCP_SERVER_PORT=5555 python weather.py