- 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": {
"abhishek3689-weather_mcp_server": {
"command": "python",
"args": [
"weather_server_mcp.py"
],
"env": {
"WEATHER_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}You can deploy this Weather MCP Server to provide real-time weather data, forecasts, and city comparisons to MCP clients. It runs locally or in your environment and exposes weather tools through a simple STDIO-based MCP transport, allowing AI assistants to fetch weather information efficiently.
How to use
Install and run the Weather MCP Server, then connect an MCP client to access tools like current weather, forecasts, and weather comparisons. You run the server locally and the client (such as Claude Desktop) communicates with the server through the standard input/output interface. Start by ensuring your API key is configured, then issue requests to the available tools from your client.
How to install
Prerequisites: Python 3.8 or higher and a WeatherAPI.com API key (free tier available). You will also need Internet access to fetch weather data.
# 1. Clone the project
git clone https://github.com/Abhishek3689/Weather_MCP_Server.git
cd weather-mcp-server
# 2. Install dependencies
pip install -r requirements.txt
# 3. Set up environment variables
# Create a .env file in the project root with your API key
# WEATHER_API_KEY=your_api_key_here
Additional sections
Configuration and start details are provided to help you run the server and integrate it with Claude Desktop. You can start the server manually to verify it’s running, and then connect via your MCP client.
To integrate with Claude Desktop, add the following configuration to your Claude Desktop config: on macOS, place it at ~/Library/Application Support/Claude/claude_desktop_config.json; on Windows, place it at %APPDATA%\Claude\claude_desktop_config.json.
{
"mcpServers": {
"weather": {
"command": "python",
"args": [
"weather_server_mcp.py"
],
"env": {
"WEATHER_API_KEY": "your_api_key_here"
}
}
}
}
Notes and troubleshooting
If you encounter issues starting the server, run it manually to confirm it’s working: python weather_server_mcp.py. The server uses STDIO transport, so you won’t see normal console output through MCP clients, but you can verify the process is running by observing startup messages in the terminal.
Available tools
get_current_weather
Fetches the current weather for a given city with selectable units (metric for Celsius, imperial for Fahrenheit).
get_forecast
Retrieves a multi-day weather forecast for a city, up to 10 days depending on the plan, with unit options.
compare_weather
Compares weather conditions between two cities using the same unit system.