Skip to main content
Glama
li000592
by li000592

Weather MCP Server

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

Features

  • Weather Alerts: Get active weather alerts for any US state

  • Weather Forecasts: Get detailed weather forecasts for any location (latitude/longitude)

  • Clean Architecture: Modular codebase with separation of concerns

Related MCP server: Weather MCP Server

Tools

get_alerts

Get weather alerts for a US state.

Parameters:

  • state (string): Two-letter state code (e.g., "CA", "NY")

Example:

{
  "state": "CA"
}

get_forecast

Get weather forecast for a specific location.

Parameters:

  • latitude (number): Latitude of the location (-90 to 90)

  • longitude (number): Longitude of the location (-180 to 180)

Example:

{
  "latitude": 37.7749,
  "longitude": -122.4194
}

Installation

  1. Clone the repository

  2. Install dependencies:

    npm install
  3. Build the project:

    npm run build

Development

This project is built with TypeScript and follows the MCP Node.js quickstart guide.

Project Structure

src/
├── index.ts        # Main server entry point
├── types.ts        # TypeScript interfaces and types
├── api-client.ts   # NWS API client
├── formatters.ts   # Data formatting utilities
└── tools.ts        # MCP tool definitions

Building

npm run build

This compiles TypeScript to JavaScript in the build/ directory and makes the main file executable.

Setup with Claude Desktop

To use this weather server with Claude Desktop:

  1. Build the server (if not already done):

    npm run build
  2. Find your Claude Desktop configuration file:

    • macOS/Linux: ~/Library/Application\ Support/Claude/claude_desktop_config.json

    • Windows: %APPDATA%\Claude\claude_desktop_config.json

    You can open it directly with:

    # macOS/Linux
    code ~/Library/Application\ Support/Claude/claude_desktop_config.json
  3. Add the weather server to your configuration:

    {
      "mcpServers": {
        "weather": {
          "command": "node",
          "args": ["/ABSOLUTE/PATH/TO/PARENT/FOLDER/weather/build/index.js"]
        }
      }
    }

    Replace /ABSOLUTE/PATH/TO/PARENT/FOLDER/weather with the actual absolute path to your weather project directory.

  4. Save the configuration file and restart Claude Desktop.

The MCP UI elements will only show up in Claude Desktop if at least one server is properly configured.

API Data Source

This server uses the National Weather Service (NWS) API, which provides weather data for locations within the United States. The API is free and does not require authentication.

License

ISC

A
license - permissive license
-
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/li000592/weather-mcp'

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