心知天气 MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@心知天气 MCP Serverwhat's the weather in Shanghai today?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
心知天气 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. **部署测试**:魔搭社区会自动安装依赖并启动服务This server cannot be deployed
Maintenance
Related MCP Connectors
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.
- APIVerveOAuthcom.apiverve
350+ production-ready APIs through one MCP server — weather, geocoding, validation, financial data.
Global weather API: forecasts, historical data, marine, ski, astronomy and timezone.
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.36 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-