mcpField
S
Simple Weather MCP Server example from Quickstart

Simple Weather MCP Server example from Quickstart

Local
npmjs.comMedia & Design14Updated 84w ago

About Simple Weather MCP Server example from Quickstart

A Node.js weather MCP server example from MCP Quickstart, for people learning MCP or querying US weather in Claude Desktop. It is published as an npm package and can be run with npx.

Key features

  1. 01Get weather alerts by US state
  2. 02Get forecasts by latitude and longitude
  3. 03Run through npx

Use cases

  1. 01Check for weather alerts in a US state
  2. 02Get a forecast for a US location

MCP support

Exposes weather-alert and forecast tools to MCP clients, queried by state code or latitude and longitude.

Configuration

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

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

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@h1deya/mcp-server-weather

Tools

2

Saved tool list · updated 3w ago

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

Details

From the project README

Simple Weather MCP Server example from Quickstart License: MIT npm version

Node.js server implementing Model Context Protocol (MCP) for accessing weather information in the US.

This is an example explained in MCP Quickstart.

It has been hosted as an npm package for convenient use with npx.

Usage with Claude Desktop

Merge the following JSON fragment into your claude_desktop_config.json. Please refer to the "Testing your server with Claude for Desktop" section of MCP Quickstart for details.

# MacOS/Linux
code ~/Library/Application\ Support/Claude/claude_desktop_config.json

# Windows
code $env:AppData\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "weather": {
      "command": "npx",
        "args": [
            "-y",
            "@h1deya/mcp-server-weather"
        ],
    }
  }
}

Tools

  • get-alerts
    • Get weather alerts for a US state.
    • Input: state (string): Two-letter US state code (e.g. CA, NY)
  • get-forecast
    • Get weather forecast for a location in the US
    • Inputs:
      • latitude (number): Latitude of the location
      • longitude (number): Longitude of the location

Example Queries

  • Tomorrow's weather in Palo Alto?
  • Any weather alerts in California?

Original Author and License

This example is based on the code explained in MCP Quickstart (github), whose license is CC-BY-4.0. The completed code examples are also hosted in this repo, whose license is MIT (Copyright (c) 2025 Model Context Protocol). So I've chosen the MIT license for this repo.

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.