Skip to main content
Glama
imvedanshmehra

weather-mcp-server

Weather MCP Server

A simple Model Context Protocol (MCP) server that exposes weather tools backed by the US National Weather Service (NWS) API.

The server runs over stdio and can be plugged into any MCP-compatible client (e.g. Cursor, Claude Desktop).

Tools

The server registers two tools:

  • get_alerts — Get active weather alerts for a US state.

    • Input: state — two-letter state code (e.g. CA, NY).

  • get_forecast — Get the weather forecast for a location.

    • Input: latitude (-90 to 90), longitude (-180 to 180).

    • Note: Only US locations are supported by the NWS API.

Related MCP server: MCP Weather Server

Requirements

  • Node.js (with support for ES modules)

  • npm

Installation

npm install

Build

npm run build

This compiles TypeScript into the build/ directory and marks build/index.js as executable.

Run

After building, run the server directly:

node build/index.js

You should see:

Weather MCP Server running on stdio

Using with an MCP client

Configure your MCP client to launch this server. Example configuration:

{
  "mcpServers": {
    "weather": {
      "command": "node",
      "args": ["/absolute/path/to/weather/build/index.js"]
    }
  }
}

Project structure

src/
  index.ts          # MCP server entry point, tool registration
  utils/
    helper.ts       # NWS API helpers and alert formatting

Maintenance

ActivitySlowing
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers