Weather MCP Server

by bittush8789

290 downloads
Not rated
GitHub

About

Creating MCP (Model Context Protocol) weather-related projects involves setting up an MCP server that can fetch and provide weather data.

Details

Author
bittush8789
Downloads
290
Categories
Media

- get_alerts(state) returns active weather alerts for a US state.
- get_forecast(latitude, longitude) returns a short-term forecast.
- Leverages the National Weather Service API.
- Requires Python 3.7+ and the httpx library.
- Uses standard I/O for transport.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Weather MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install dependencies using uv add mcp[cli] httpx requests, then run the server with uv run weather.py. The server communicates via standard I/O. For MCP client integration, add a configuration entry to your config.json specifying the path to uv and the project directory.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "weather mcp server": {
            "mcp-bittush8789": {
                "command": "uv",
                "args": [
                    "run",
                    "weather.py"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-bittush8789": {
        "command": "uv",
        "args": [
            "run",
            "weather.py"
        ]
    }
}

Weather MCP Server

This MCP server fetches weather data from the National Weather Service API. It provides two tools:

- get_alerts(state: str)
Returns active weather alerts for a given US state (using its two-letter code).

- get_forecast(latitude: float, longitude: float)
Returns a short-term weather forecast for a specified location.

Requirements

- Python 3.7+
- httpx
- MCP Framework mcp[cli]

so install, run:

uv add mcp[cli] httpx requests

Usage

Run the server with:

uv run weather.py

The server uses standard I/O for communication.

MCP Client Configuration

configuration snippet for your MCP client (config.json):

{
  "mcpServers": {
    "weather": {
      "command": "C:/path/to/your/uv",
      "args": [
        "--directory",
        "C:/path/to/your/project",
        "run",
        "weather.py"
      ]
    }
  }
}
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.