MCP Weather

v1.0.0APIsstable

Provides comprehensive weather information including current conditions, 7-day forecasts, and air quality data for any city worldwide using the Open-Meteo API. Features real-time weather data, hourly forecasts, sunrise/sunset times, and European Air

agentsllmmcptool-use
Share:
301
Stars
0
Downloads
0
Weekly
0/5

What is MCP Weather?

MCP Weather is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to provides comprehensive weather information including current conditions, 7-day forecasts, and air quality data for any city worldwide using the open-meteo api. features real-time weather data, hourly ...

Provides comprehensive weather information including current conditions, 7-day forecasts, and air quality data for any city worldwide using the Open-Meteo API. Features real-time weather data, hourly forecasts, sunrise/sunset times, and European Air

This server falls under the APIs category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Provides comprehensive weather information including current

Use Cases

Weather forecast and conditions
Air quality data
Real-time weather agent integration
sidharthrajaram

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 17, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-weather-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use MCP Weather

The MCP Weather Server is a Python-based MCP server that exposes real-time weather data from the US National Weather Service API through two clean tools: get_alerts for active weather warnings and get_forecast for location-based forecasts. It is implemented using the Server-Sent Events (SSE) transport pattern, making it suitable for cloud-native and multi-process deployments where stdio-based servers are impractical. AI developers and agent builders use it as both a functional weather utility and a reference implementation for SSE-based MCP architectures.

Prerequisites

  • Python 3.10 or higher with uv or pip installed
  • The mcp and httpx Python packages (installed automatically)
  • An MCP client such as Claude Desktop or a compatible SSE-aware client
  • No API key required — the server uses the free National Weather Service API (US locations only)
1

Install via Smithery (recommended)

Use the Smithery CLI to install the server and register it with Claude Desktop in one step.

npx -y @smithery/cli install @sidharthrajaram/mcp-sse --client claude
2

Or clone and run manually

Clone the repository and run the weather server directly with uv for local development or testing.

git clone https://github.com/sidharthrajaram/mcp-sse.git
cd mcp-sse
uv run weather.py
3

Verify the server is running

The server starts on 0.0.0.0:8080 by default. You can specify a different host and port via command-line arguments.

uv run weather.py --host 127.0.0.1 --port 9090
4

Connect with the included SSE client

Use the bundled client.py to connect to the running SSE server and send natural language weather queries.

uv run client.py http://0.0.0.0:8080/sse
5

Set ANTHROPIC_API_KEY for the client

The client uses Claude to interpret tool results. Set your Anthropic API key in the environment before running client.py.

export ANTHROPIC_API_KEY=sk-ant-...
uv run client.py http://0.0.0.0:8080/sse

MCP Weather Examples

Client configuration

Claude Desktop config for the weather MCP server running locally over SSE.

{
  "mcpServers": {
    "mcp-weather": {
      "command": "python",
      "args": ["weather.py"],
      "env": {
        "ANTHROPIC_API_KEY": "sk-ant-..."
      }
    }
  }
}

Prompts to try

Ask the AI assistant weather questions that trigger get_alerts and get_forecast tools.

- "What are the current weather alerts for Sacramento, CA?"
- "What's the forecast for New York City this week?"
- "Are there any tornado warnings currently active in Oklahoma?"
- "Get the weather forecast for ZIP code 98101 in Seattle."
- "Are there any flood watches or warnings near Houston, Texas right now?"

Troubleshooting MCP Weather

Server starts but get_forecast returns no data

The National Weather Service API only covers US locations. Provide US city names or coordinates. Non-US locations will not return forecast data from this API.

Client fails with 'connection refused' when connecting to the SSE endpoint

Confirm the weather.py server is running and listening on the expected host and port. Check with `curl http://0.0.0.0:8080/sse` — you should see an open SSE stream.

ANTHROPIC_API_KEY not found error in client.py

Export the key before running the client: `export ANTHROPIC_API_KEY=sk-ant-...`. Alternatively, create a .env file in the project root with ANTHROPIC_API_KEY=your-key and the client will load it automatically.

Frequently Asked Questions about MCP Weather

What is MCP Weather?

MCP Weather is a Model Context Protocol (MCP) server that provides comprehensive weather information including current conditions, 7-day forecasts, and air quality data for any city worldwide using the open-meteo api. features real-time weather data, hourly forecasts, sunrise/sunset times, and european air It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MCP Weather?

Follow the installation instructions on the MCP Weather GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with MCP Weather?

MCP Weather works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is MCP Weather free to use?

Yes, MCP Weather is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More APIs MCP Servers

Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp-weather-server": { "command": "npx", "args": ["-y", "mcp-weather-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use MCP Weather?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides