心知天气 MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
心知天气 MCP 服务
基于心知天气API的Model Context Protocol服务,提供实时天气查询功能。
魔搭社区部署说明
服务配置
在魔搭社区创建MCP服务时,使用以下配置:
{
"mcpServers": {
"xinzhi-weather": {
"command": "python",
"args": ["server.py"],
"env": {
"PYTHONPATH": ".",
"XZ_PUBLIC_KEY": "您的心知天气公钥",
"XZ_PRIVATE_KEY": "您的心知天气私钥",
"XZ_DEFAULT_LOCATION": "yulin"
}
}
}
}使用方法
在支持MCP的客户端中调用 get_weather 工具:
# 示例调用
result = await client.call_tool("get_weather", {
"location": "beijing",
"public_key": "您的公钥",
"private_key": "您的私钥"
})API密钥申请
访问心知天气官网注册账号
在控制台申请API密钥
获取公钥和私钥
## 5. 魔搭社区创建步骤
1. **在GitHub创建仓库**:上传以上4个文件
2. **魔搭社区创建MCP**:
- 选择"从GitHub导入"
- 仓库地址:`https://github.com/您的用户名/xinzhi-weather-mcp`
- 服务配置:使用上面的 `mcp.json` 内容
- 入口文件:`server.py`
- Python版本:3.9
3. **部署测试**:魔搭社区会自动安装依赖并启动服务Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for China weather: current conditions and multi-day forecast by city name or adcode.
MCP server for current weather and multi-day forecasts worldwide, Chinese city names and output.
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
China MCP gateway hosting HTTP APIs for Doubao/Tongyi/Wenxin/Claude; weather, currency, holiday.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides weather forecast data for locations in China through HeFeng Weather API, supporting real-time, hourly, and daily forecasts with full Chinese weather descriptions.319 npmISC
- AlicenseNot gradedqualityDmaintenanceEnables weather queries using Baidu Maps API, providing real-time weather conditions, 5-day forecasts, hourly predictions, lifestyle indices, and weather alerts. Supports queries by administrative district codes or coordinates with multiple coordinate systems.MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides real-time weather information, 4-day forecasts, and city search functionality for Chinese cities via the AMap API. It enables users to query weather data using city names or administrative codes through natural language interactions.1MIT
- FlicenseAqualityDmaintenanceProvides real-time weather and 3-day forecast for Chinese cities using the QWeather API, working with any MCP-compatible client.2-