Weather MCP Server

Weather MCP Server

By bittush8789 GitHub

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

weather MCP
Overview

What is Weather MCP Server?

Weather MCP Server is a project that sets up a Model Context Protocol (MCP) server to fetch and provide weather data from the National Weather Service API.

How to use Weather MCP Server?

To use the Weather MCP Server, install the required dependencies and run the server using the provided command. Configure your MCP client with the necessary settings to communicate with the server.

Key features of Weather MCP Server?

  • Fetches active weather alerts for US states.
  • Provides short-term weather forecasts based on geographical coordinates.
  • Utilizes the MCP framework for seamless integration.

Use cases of Weather MCP Server?

  1. Monitoring weather alerts for specific states.
  2. Obtaining weather forecasts for planning outdoor activities.
  3. Integrating weather data into applications for real-time updates.

FAQ from Weather MCP Server?

  • What programming language is used for the Weather MCP Server?

The server is built using Python 3.7 and above.

  • How do I install the required dependencies?

You can install the dependencies by running the command: uv add mcp[cli] httpx requests.

  • Can I run the server on any operating system?

Yes, as long as you have Python and the required libraries installed, you can run the server on any OS.

Content

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 tools information available.
School MCP
School MCP by 54yyyu

A Model Context Protocol (MCP) server for academic tools, integrating with Canvas and Gradescope platforms.

canvas mcp
View Details
repo-template
repo-template by loonghao

A Model Context Protocol (MCP) server for Python package intelligence, providing structured queries for PyPI packages and GitHub repositories. Features include dependency analysis, version tracking, and package metadata retrieval for LLM interactions.

-

google-calendar mcp
View Details
strava-mcp
strava-mcp by jeremysilva1098

MCP server for strava

strava mcp
View Details

Model Context Protocol (MCP) server implementation for Rhinoceros/Grasshopper integration, enabling AI models to interact with parametric design tools

grasshopper mcp
View Details

MCP configuration to connect AI agent to a Linux machine.

security mcp
View Details

AI assistant built with Streamlit, NVIDIA NIM (LLaMa 3.3:70B) / Ollama, and Model Control Protocol (MCP).

python mcp
View Details