- Home
- MCP servers
- China Weather
China Weather
- typescript
1
GitHub Stars
typescript
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"nanchengjiumeng-china-weather-mcp": {
"command": "node",
"args": [
"your_dir/weather/build/index.js"
],
"env": {
"API_KEY": "YOUR_API_KEY",
"QWEATHER_API_BASE": "https://ph5ctubwqh.re.qweatherapi.com"
}
}
}
}You set up a weather MCP server that lets you query weather forecasts and warnings for Chinese cities using the QWeather API. It runs locally and exposes a simple weather endpoint you can consume from any MCP client to retrieve forecasts, warnings, and detailed weather data.
How to use
You use this MCP server by connecting your MCP client to the local weather MCP endpoint. The server exposes weather data for Chinese cities, including 1–7 day forecasts and real-time weather warnings. Use it to search for cities by Chinese name and to retrieve detailed weather information such as temperatures, humidity, wind, precipitation, and UV index.
How to install
Prerequisites you need before installing this MCP server are: node.js and npm installed on your machine.
Step 1: Install dependencies and build the project.
npm install
npm run build
Step 2: Run the MCP server. The server is started by running the runtime entry point for the weather module. Use the command shown in your configuration to start the local server after building.
Configuration and runtime
The MCP server is configured as a local stdio server. It uses Node.js to execute the built index and expose MCP endpoints for weather data.
{
"mcpServers": {
"weather": {
"command": "node",
"args": [
"your_dir/weather/build/index.js"
]
}
}
}
Environment variables
Two environment variables control access to the weather data service used by the MCP server. You should provide your API base and API key to authenticate with the weather data provider.
Tools and data returned
The server provides access to two main capabilities: weather forecast by city and weather warnings by city.
Security considerations
Keep your API key secure. Do not expose your API key in client-side code. Use server-side configuration for any production deployments.
Troubleshooting
If you encounter invalid API keys, unknown city names, network issues, or API rate limits, verify your environment variables and network access, then retry after ensuring the built server is running correctly.
Notes
This MCP server is designed to query weather information for Mainland China and regions. It supports city name search in Chinese and provides detailed weather metrics such as temperatures, humidity, wind, precipitation, visibility, and UV index.
Available tools
get-weather-forecast
Fetches weather forecasts for a given city with an optional number of days (1-7).
get-weather-warnings
Retrieves current weather warnings for a specified city.