mcp-server-weather

davidgarc/mcp-server-weather

3.1

If you are the rightful owner of mcp-server-weather and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

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

Tools
2
Resources
0
Prompts
0

Weather MCP Server

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

Overview

This MCP server exposes two weather-related tools that can be used by Claude or other MCP clients:

  • get-alerts: Retrieve weather alerts for any US state
  • get-forecast: Get weather forecast for specific coordinates (US locations only)

Tools

get-alerts

  • Description: Get weather alerts for a state
  • Parameters:
    • state (string): Two-letter state code (e.g., "CA", "NY")

get-forecast

  • Description: Get weather forecast for a location
  • Parameters:
    • latitude (number): Latitude of the location (-90 to 90)
    • longitude (number): Longitude of the location (-180 to 180)

Installation

  1. Build the project:

    npm run build
    
  2. Run the server:

    node build/index.js
    

Usage

This server is designed to be used with MCP clients. It communicates over stdio and provides weather data from the National Weather Service API.

Dependencies

  • @modelcontextprotocol/sdk: MCP SDK for server implementation
  • zod: Schema validation for tool parameters

Data Source

Weather data is provided by the National Weather Service API (api.weather.gov). Only US locations are supported.