mcpField
W
weather

weather

Local
github.com/eudoroolivares2016Maps & Travel0Updated 9w ago

About weather

weather is a minimal TypeScript MCP server for developers following an MCP server tutorial. It provides US National Weather Service forecasts and active state alerts through two tools.

Key features

  1. 01Fetch forecasts by latitude and longitude
  2. 02Retrieve active alerts by US state
  3. 03Return structured tool output

Use cases

  1. 01Check a location's weather forecast
  2. 02Look up active alerts for a state

MCP support

Exposes `get-forecast` and `get-alerts` as MCP tools over stdio. Both declare output schemas and return structured content.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"eudoroolivares2016-weather": {
"command": "npx",
"args": [
"-y",
"@eudoroolivares/mcp-weather-server"
]
}
}
}
Run commandnpx -y @eudoroolivares/mcp-weather-server

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@eudoroolivares/mcp-weather-server1.0.1

Tools

2

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
statestringYesTwo-letter state code (e.g. CA, NY)

Details

From the project README

A Simple MCP Weather Server written in TypeScript

A minimal MCP server that exposes US weather data from the National Weather Service API as two tools:

  • get-forecast – get the forecast for a location (takes latitude and longitude)
  • get-alerts – get active weather alerts for a US state (takes a two-letter state code)

This example accompanies the Build an MCP server tutorial.

Prerequisites

  • Node.js 24+
  • npm

Build and run

npm install
npm run build
node build/index.js

The server communicates over stdio, so running it directly just waits for a client on stdin. To see it in action, launch it from one of the client examples in this repository, for example:

cd ../mcp-client-typescript
npm install && npm run build
node build/index.js ../weather-server-typescript/build/index.js

Structured content

Both tools declare an outputSchema and return structuredContent. get-forecast returns an object; get-alerts returns a top-level JSON array, which protocol revision 2026-07-28 is the first to allow — see Structured Content in the spec.

serveStdio serves both protocol eras from one factory, and the SDK projects the array-rooted schema down to the {"result": [...]} form for a 2025-11-25 client, so adopting it costs older clients nothing. See the SDK documentation.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.