Weather MCP Server

Weather MCP Server

Provides US weather alerts and forecasts via the National Weather Service API with no API key required.

Category
Visit Server

README

Weather MCP Server

https://modelcontextprotocol.io/docs/develop/build-server#typescript

Professional TypeScript MCP server that exposes weather tools backed by the US National Weather Service API.

Features

  • MCP server over stdio
  • TypeScript strict mode
  • No required API key
  • Safe .env handling
  • CLI client for manual testing
  • Automated MCP smoke tests using a local mock NWS server
  • Tools:
    • get-alerts
    • get-forecast

Important: api.weather.gov only supports locations in the United States and US territories. Forecasts for Italy or other non-US locations will not work with this data source.

Requirements

  • Node.js 20 or newer
  • npm

Check your versions:

node -v
npm -v

Installation

From the project folder:

npm install

Build

npm run build

This creates compiled JavaScript in build/.

Run the MCP server

npm start

The server communicates over stdio, so when started directly it waits for an MCP client.

Manual CLI testing

First build the project:

npm run build

Then run the included client:

npm run client

Example commands inside the client prompt:

get-alerts { "state": "CA" }
get-forecast { "latitude": 34.05, "longitude": -118.25 }
quit

Automated tests

npm test

The tests do not depend on the live National Weather Service API. They start a local mock weather server and verify that the MCP server lists and executes its tools correctly.

Configuration

No configuration is required for normal use.

Optional environment variables:

NWS_API_BASE=https://api.weather.gov
NWS_USER_AGENT=weather-mcp-server/2.0 your-email@example.com

Do not commit .env files. Use .env.example as a template only.

Claude Desktop configuration example

After running npm run build, add something like this to Claude Desktop's MCP configuration, adjusting the path to your local project folder:

{
  "mcpServers": {
    "weather": {
      "command": "node",
      "args": [
        "C:/Users/torre/Desktop/myWeather/build/server.js"
      ]
    }
  }
}

Project structure

src/
  cli.ts       Manual MCP client
  nws.ts       NWS API helpers and formatting
  server.ts    MCP server entry point
tests/
  mcp-smoke.test.js

Available npm scripts

npm run build   Compile TypeScript
npm start       Start the MCP server
npm run dev     Start the server with tsx
npm run client  Start the manual CLI client
npm test        Build and run automated tests
npm run clean   Remove build output

Security note

The original project contained a .env file. This version removes it from the distributable project and ignores all .env files by default. If the previous .env contained a real API key, revoke or rotate that key.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured