mcp-nws

jeanralphaviles/mcp-nws

3.2

If you are the rightful owner of mcp-nws 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.

The National Weather Service MCP Server provides weather forecast information for locations in the United States as context to large language models.

National Weather Service MCP Server

PkgGoDev Go Report Card

The National Weather Service Model Context Protocol (MCP) server provides weather forecast information for locations in the United States as context to large language models.

Model Context Protocol

MCP helps you build agents and complex workflows on top of LLMs. LLMs frequently need to integrate with data and tools, and MCP provides:

  • A growing list of pre-built integrations that your LLM can directly plug into
  • The flexibility to switch between LLM providers and vendors
  • Best practices for securing your data within your infrastructure

General Architecture

At its core, MCP follows a client-server architecture where a host application can connect to multiple servers:

  • MCP Hosts: Programs like Claude Desktop, IDEs, or AI tools that want to access data through MCP
  • MCP Clients: Protocol clients that maintain 1:1 connections with servers
  • MCP Servers: Lightweight programs that each expose specific capabilities through the standardized Model Context Protocol
    • MCP NWS is an MCP Server
  • Local Data Sources: Your computer’s files, databases, and services that MCP servers can securely access
  • Remote Services: External systems available over the internet (e.g., through APIs) that MCP servers can connect to

Tools

  • Forecast(latitude, longitude):
    • Returns a standard 7-day weather forecast for a location. The forecast is broken down into 12h periods, covering both day and night.
  • HourlyForecast(latitude, longitude):
    • Returns a standard hourly weather forecast for a location for the next 7 days.
  • GridpointForecast(latitude, longitude):
    • Returns raw weather forecast timeseries data over the next 7 days.

[!IMPORTANT] Weather forecasts are only available within the United States.

Usage

Run MCP Server with Streamable HTTP transport

go run github.com/jeanralphaviles/mcp-nws/cmd/mcp-nws@latest --address 'localhost:3000'

Run MCP Server with stdio transport

go run github.com/jeanralphaviles/mcp-nws/cmd/mcp-nws@latest

Editor Integration

Follow the MCP setup instructions for your editor of choice:

// mcp.json
{
    "servers": {
        "weather": {
            "command": "go",
            "args": [
                "run",
                "github.com/jeanralphaviles/mcp-nws/cmd/mcp-nws@latest"
            ],
            "type": "stdio"
        }
    },
    "inputs": []
}

Explore

Use MCP Inspector to explore this MCP Server.

npx @modelcontextprotocol/inspector

Alternatively use to instrument this MCP Server.

See Also