Skip to main content
Glama

Weather MCP Server

A Model Context Protocol (MCP) server that provides weather information using the National Weather Service (NWS) API.

Features

  • Get weather forecasts for any US location

  • Check current weather conditions

  • View active weather alerts by state

  • Built-in caching to reduce API calls

Related MCP server: MCP Weather Server

Installation

1. Clone the repository

git clone https://github.com/YOUR_USERNAME/weather-mcp-server.git
cd weather-mcp-server

2. Create a virtual environment and install

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -e .

This installs the package and all its dependencies (mcp, httpx) automatically.

Configuration for Claude Desktop

macOS

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "weather": {
      "command": "/ABSOLUTE/PATH/TO/YOUR/weather-mcp-server/venv/bin/python",
      "args": ["-m", "weather.main"],
      "cwd": "/ABSOLUTE/PATH/TO/YOUR/weather-mcp-server"
    }
  }
}

Windows

Edit %APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "weather": {
      "command": "C:\\ABSOLUTE\\PATH\\TO\\YOUR\\weather-mcp-server\\venv\\Scripts\\python.exe",
      "args": ["-m", "weather.main"],
      "cwd": "C:\\ABSOLUTE\\PATH\\TO\\YOUR\\weather-mcp-server"
    }
  }
}

Important: Replace /ABSOLUTE/PATH/TO/YOUR/ with your actual path. You can get it by running pwd (macOS/Linux) or cd (Windows) in the project directory.

After configuration

  1. Save the config file

  2. Completely quit and restart Claude Desktop (Cmd+Q on macOS, not just close window)

  3. In Claude connectors you can see your tools.

Available Tools

  • get_forecast(latitude, longitude) - Get 5-period weather forecast

  • get_current_conditions(latitude, longitude) - Get current weather conditions

  • get_alerts(state) - Get active weather alerts for a US state (use 2-letter code like "CA", "NY")

  • get_metrics() - View server usage statistics

Usage Examples

Once configured in Claude Desktop, you can ask:

  • "What's the weather forecast for New York City?"

  • "Are there any weather alerts in California?"

  • "What are the current conditions in Chicago?"

Development

Running tests

# Test the server manually
python -m weather.main

The server should output:

2025-12-16 14:51:11,260 INFO Starting weather MCP server
=== MCP server running ===

Press Ctrl+C to stop.

Troubleshooting

Server not appearing in Claude

  1. Check the config file path is correct for your OS

  2. Use absolute paths in the config (not relative paths or ~)

  3. Restart Claude Desktop completely (Quit, don't just close)

  4. Check logs (macOS: ~/Library/Logs/Claude/mcp*.log)

ModuleNotFoundError

Make sure you:

  1. Activated your virtual environment: source venv/bin/activate

  2. Installed the package: pip install -e .

Connection issues

The server uses the National Weather Service API which:

  • Only works for US locations

  • May have occasional downtime

  • Has built-in caching (60 second TTL)

License

MIT

Contributing

Pull requests are welcome! Please feel free to submit issues or improvements.

F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

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/dhruvagarwal29/us-weather-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server