智能天气MCP服务器
🌤️ Claude Desktop和MCP客户端的人工智能天气查询

它做什么
通过Claude Desktop或任何MCP客户端以自然语言查询天气。支持中文、日文和英文。
🟢 生产就绪 -住在 https://smart-weather-mcp-server-891745610397.asia-east1.run.app
快速开始
克劳德桌面(推荐)
npm install && npm run build添加到您的Claude Desktop配置中:
{
"mcpServers": {
"smart-weather": {
"command": "node",
"args": ["/path/to/dist/unified-server.js", "--mode=stdio"]
}
}
}云服务
通过mcp-remote使用托管版本:
{
"smart-weather-cloud": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://smart-weather-mcp-server-891745610397.asia-east1.run.app/mcp"]
}
}特性
- 自然语言查询: "台北今天天氣" or "London weather tomorrow"
- 多语言支持:中文、日文、英文
- 真实天气数据:Google Weather API集成
- 智能缓存:5分钟天气,30分钟预报,7天地点
- 双重部署:本地(STDIO)或云(流式HTTP)
可用工具
搜索_天气
查询任何位置的当前天气、预报或历史数据。
查找位置
解决位置名称不明确的问题,并获得精确的坐标。
获取_天气_建议
根据天气状况获得个性化建议。
发展
# Install and build
npm install && npm run build
# Run tests
npm test
# Local development
npm run dev # STDIO mode
npm run dev:http # HTTP mode on port 8080
# Production
npm start # Auto-detect mode当地STDIO烟雾测试(中文)
- 一次性英语基线:
npm run test:stdio-smoke - 中国样品(台北/冲绳):
npm run test:stdio-zh - 如果存在秘密,CI将在PR和main上运行中国STDIO烟雾:
- WEATHER_API_KEY, GOOGLE_MAPS_API_KEY - Gemini在CI中已禁用(GEMINI_DISABLED=true)仅验证规则/混合路径
部署
谷歌云运行
# Setup (one-time)
./scripts/setup-gcp-ci.sh
./scripts/setup-secrets.sh
# Deploy
./scripts/deploy-cloudrun.sh自动部署到主分支。
码头工人
npm run docker:build
npm run docker:runAPI终点
/health-健康检查/mcp-MCP客户端连接/-服务信息
建筑
使用TypeScript、Express.js和谷歌云平台构建。使用混合的基于规则的+AI解析来获得最佳性能。
文档
许可证
麻省理工学院
