天气应用连接服务

提供天气应用与Claude Desktop的连接服务,支持Docker部署和多种配置方式。

  • by lexxai
  • Python
  • 混合部署
  • 更新于
在 GitHub 查看 lexxai/mcp-weather-education

使用说明

这是一个天气应用程序,示例如何连接到Claude Desktop

Dockerfile

docker build -t weather .
docker run -p 8000:8000 weather

Docker Compose

docker-compose up --build -d 
docker-compose logs -f

Claude桌面配置

通过npx实现CLAUDE桌面

{ “mcpServers”:{ “天气”:{ “command”:“C:\程序文件\nodejs\npx”, “args”:[ y “mcp远程”, "http://127.0.0.1:8000/mcp" ] } } }

通过cli访问CLAUDE桌面

{ “mcpServers”:{ “天气”:{ “command”:“uv”, “args”:[ “--目录”, “C:\绝对\路径\到\父母\文件夹\天气\ src”, “运行”, “天气。py”, ] } } }

开放API

/openapi.json

{
  "mcp-weather": {
    "type": "openapi",
    "url": "http://localhost:8000/openapi.json"
  }
}

MCP (se)

/mcp

{
  "mcp-weather": {
    "type": "sse",
    "url": "http://localhost:8000/mcp"
  }
}