MCP Weather Server
Click on "Install 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 Weather ServerGet current weather for California."
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 Weather Server
A production-ready Model Context Protocol weather server built with the official Anthropic FastMCP Python SDK. Provides weather forecasts, alerts, and current conditions through a standardized AI-agent interface.
β¨ Features
π§ 2 Tools:
get_alerts(weather alerts by state) andget_forecast(5-day forecast by coordinates)π 1 Resource:
weather://{state}/currentβ formatted current conditionsπ¬ 1 Prompt:
weather_assistant(state)β guided weather analysis templateπ Dual Transport: stdio (local clients) and Streamable HTTP (remote clients)
πͺ΅ Structured Logging: All server logs go to stderr (compatible with stdio transport)
π¦ No API Keys Required: Uses realistic simulated weather data
π§ͺ Test Client Included: Ready-to-run example client
Related MCP server: MCP Server Basic Example
π Quick Start
Option 1: pip
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python weather_server.pyOption 2: uv (recommended)
uv venv
source .venv/bin/activate
uv add "mcp[cli]>=1.27,<2" httpx
python weather_server.pyOption 3: Setup script
chmod +x setup.sh
./setup.sh
python weather_server.pyπ Usage
stdio Transport (default)
python weather_server.pyThe server listens on stdin/stdout, ready to connect to Claude Desktop, Cursor, or any MCP client.
Streamable HTTP Transport
python weather_server.py --transport streamable-http --port 8000Now available at http://localhost:8000/mcp for HTTP-based clients.
Run the Test Client
# In one terminal:
python weather_server.py
# In another terminal:
source .venv/bin/activate
python client_example.pyπ οΈ Tools Reference
get_alerts(state: str) -> list[dict]
Get active weather alerts for a US state.
Parameter | Type | Description | Example |
|
| 2-letter US state code |
|
Returns: List of alerts with type, severity, and area.
get_forecast(latitude: float, longitude: float) -> list[dict]
Get a 5-day weather forecast for coordinates.
Parameter | Type | Description |
|
| Decimal degrees (-90 to 90) |
|
| Decimal degrees (-180 to 180) |
Returns: 5-day forecast with date, temperature_f, condition, humidity_pct, wind_mph.
π Resources Reference
weather://{state}/current
Returns formatted current weather conditions for a state as markdown.
π¬ Prompts Reference
weather_assistant(state: str)
Creates a weather analysis assistant prompt template.
Parameter | Type | Description |
|
| 2-letter US state code |
π Connecting to Clients
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"weather": {
"command": "python",
"args": ["/ABSOLUTE/PATH/TO/mcp-weather-server/weather_server.py"]
}
}
}Cursor
In Cursor Settings β Features β MCP Servers, add:
Name:
weatherType:
commandCommand:
python /ABSOLUTE/PATH/TO/mcp-weather-server/weather_server.py
HTTP Client (Streamable HTTP)
curl -X POST http://localhost:8000/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"1","method":"tools/list","params":{}}'π Project Structure
mcp-weather-server/
βββ weather_server.py # Main server implementation
βββ client_example.py # Example MCP client
βββ requirements.txt # Python dependencies
βββ setup.sh # Automated setup script
βββ README.md # This file
βββ .gitignoreπ§ Architecture
βββββββββββββββ stdio/HTTP ββββββββββββββββββββ
β MCP Client β ββββββββββββββββΊ β Weather Server β
β (Claude, etc)β β (FastMCP) β
βββββββββββββββ ββββββββββββββββββββ
β
ββββββββ΄βββββββ
β Simulated β
β Weather Dataβ
βββββββββββββββπ License
MIT β see LICENSE for details.
π Contributing
PRs welcome! Please ensure tools have proper type hints and docstrings.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides tools to fetch weather alerts for US states and forecasts based on latitude/longitude coordinates using the US National Weather Service API.21411MIT
- -license-quality-maintenanceA basic Model Context Protocol server implementation that demonstrates core MCP functionality including tools and resources. Provides weather alerts through the Weather API and serves as a learning example for MCP development.
- Alicense-qualityDmaintenanceProvides weather forecasts and active alerts for US locations using the National Weather Service API. It supports both local stdio and remote HTTP/SSE transport modes for flexible integration with MCP clients.141GPL 3.0
- FlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server that provides US weather forecasts and active alerts using the National Weather Service API.2
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
OpenWeather MCP β wraps the OpenWeatherMap API (openweathermap.org)
Hosted weather data MCP for discovery, validation, and OAuth-protected GribStream queries.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/moaaz01/mcp-weather-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server