home / mcp / weather mcp server

Weather MCP Server

Provides weather alerts and forecasts via MCP over HTTP with session management and health monitoring.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "anthonychu-20250711-node-mcp": {
      "url": "http://localhost:3000/mcp",
      "headers": {
        "PORT": "<PORT>"
      }
    }
  }
}

You can access weather data through a dedicated MCP server that communicates over HTTP. It exposes endpoints to fetch alerts and forecasts, supports multiple client sessions, and offers health monitoring for reliable integration into your apps.

How to use

You connect to the weather MCP server from your MCP client and call its available tools. Use the provided MCP endpoint to exchange requests and receive responses in real time through the transport mechanism. Your client sessions stay isolated and can run concurrently, so multiple parts of your application can request weather data without interference. Use the health endpoint to verify the server is up before making requests.

How to install

Prerequisites: Node.js 18 or higher and a modern package manager (npm is assumed). You will clone or obtain the server source, install dependencies, build the project if required, and then start the server.

# Install dependencies
npm install

# Build the TypeScript code (if the project uses a build step)
npm run build

# Start the HTTP MCP server
npm start

Configuration and endpoints

The server runs an MCP HTTP endpoint and a health check endpoint. Use the HTTP URL to interact with the MCP protocol and monitor health with the dedicated endpoint.

MCP Endpoint: http://localhost:3000/mcp
Health Check: http://localhost:3000/health

Available tools and usage patterns

The server exposes core weather tools you can call through the MCP interface:

  • get-alerts — Retrieve weather alerts for a US state by its two-letter code (e.g., CA, NY)
  • get-forecast — Retrieve a weather forecast for a specific location using latitude and longitude

Available tools

get-alerts

Fetch weather alerts for a specified US state using a two-letter state code.

get-forecast

Retrieve a weather forecast for a given latitude and longitude.