MCP Weather Server logo

MCP Weather Server

by aditi-joshi-usc

A lightweight TypeScript + Node.js server built using the Model Context Protocol (MCP) to provide real-time weather alerts and forecast data. It demonstrates how AI tools can consume external APIs via tool invocation.

View on GitHub

Last updated: N/A

MCP Weather Server

A lightweight TypeScript + Node.js server built using the Model Context Protocol (MCP) to provide real-time weather alerts and forecast data using the National Weather Service API.

This is my first MCP tool, integrated with Claude Desktop and Cursor, and designed to demonstrate how AI tools can consume external APIs via tool invocation.


Features

get-alerts

Returns current weather alerts for a given US state code (e.g., "CA" for California).

get-forecast

Returns a detailed weather forecast based on geographic coordinates (latitude, longitude).


🛠️ Tech Stack

| Technology | Usage | |----------------|--------------------------------------| | TypeScript | Type-safe development | | Node.js | Backend runtime | | MCP SDK | Tool communication with Claude/Cursor| | Zod | Input schema validation | | NWS API | External weather data |