- Home
- MCP servers
- Weather
Weather
- python
0
GitHub Stars
python
Language
6 months ago
First Indexed
3 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": {
"tanghui886-mcp_weather": {
"command": "python",
"args": [
"-m",
"mcpserver.get_weather_mcpserver",
"--port",
"8000",
"--transport",
"sse"
]
}
}
}You can run a lightweight MCP server that fetches and exposes weather data for the next 7 days by querying a city or region. It supports both real-time streaming (SSE) and local stdio-based communication, making it easy to integrate into your workflows and models that need weather information.
How to use
You interact with the weather MCP server by asking for the weather of a city or region. Use the get_weather capability to retrieve the 7-day forecast for the specified area. You can choose between two transport methods based on your integration: streaming via SSE for interactive sessions or stdio for local, file-based pipelines.
How to install
Prerequisites: Python is required to run the server locally. You also need to install dependencies listed in the requirements file.
Step 1: Install Python dependencies
pip install -r requirements.txt
Step 2: Start the MCP weather server via stdio (local run) with port 8000 and SSE transport
python -m mcpserver.get_weather_mcpserver --port 8000 --transport sse
Configuration and additional notes
The MCP server can be started in alternative ways using a CLI tool (example shows a separate, reusable command). If you prefer a local, NPM-based invocation, you may also run the package with a minimal setup that exposes an MCP server named for weather querying.
Inline MCP configuration example (local stdio invocation) shows how to wrap the server for automation. Use the following configuration snippet to reference the weather MCP in your orchestration tool.
Example MCP server configurations
{
"mcpServers": {
"mcp_weather_py": {
"command": "python",
"args": ["-m", "mcpserver.get_weather_mcpserver", "--port", "8000", "--transport", "sse"]
}
}
}
{
"mcpServers": {
"mcp_weather_npx": {
"command": "npx",
"args": ["-y", "MCP_WEATHER"]
}
}
}
Available tools
get_weather
Query weather information for a city or region and retrieve the 7-day forecast.
get_city_list
Retrieve a list of supported cities or regions for weather queries.
get_weather_by_cityId
Fetch weather data by a specific city identifier.