nakamurau1
MCP Servernakamurau1public

weather mcp

Sample MCP server implementation for fetching weather forecasts

Repository Info

0
Stars
1
Forks
0
Watchers
0
Issues
JavaScript
Language
MIT License
License

About This Server

Sample MCP server implementation for fetching weather forecasts

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

Weather MCP Server

A Model Context Protocol (MCP) server that provides weather data from the National Weather Service API.

Features

  • Get weather forecasts by geographic coordinates
  • Get weather alerts by US state
  • Clean, formatted weather data for LLM consumption
  • Integration with Claude and other MCP-compatible clients

Prerequisites

  • Node.js (LTS version recommended)
  • npm or yarn

Installation

  1. Clone the repository
git clone https://github.com/nakamurau1/weather-mcp.git
cd weather-mcp
  1. Install dependencies
npm install
  1. Build the server
npm run build

Usage

Running the server directly

npm start

Or directly:

./dist/index.js

Connecting to Claude Desktop

  1. Edit your Claude Desktop configuration file:
# MacOS
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
  1. Add the weather-mcp server configuration:
{
  "mcpServers": {
    "weather": {
      "command": "node",
      "args": ["/absolute/path/to/your/weather-mcp/dist/index.js"]
    }
  }
}
  1. Restart Claude Desktop

  2. Test the server with queries like:

    • "What's the weather in Sacramento?"
    • "Are there any active weather alerts in Texas?"

Available Tools

get_forecast

Gets weather forecast for a geographic location.

Parameters:

  • latitude: Latitude of the location (number between -90 and 90)
  • longitude: Longitude of the location (number between -180 and 180)

get_alerts

Gets active weather alerts for a US state.

Parameters:

  • state: Two-letter US state code (e.g., "CA", "NY", "TX")

Resource Templates

Weather alerts by state

URI Template: weather://{state}/alerts

Example: weather://CA/alerts

Limitations

  • Weather data is limited to United States locations (NWS API)
  • No historical weather data, only current conditions and forecasts

Development

  • Run in development mode: npm run dev
  • Build the project: npm run build

License

ISC

Quick Start

1

Clone the repository

git clone https://github.com/nakamurau1/weather-mcp
2

Install dependencies

cd weather-mcp
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownernakamurau1
Repoweather-mcp
LanguageJavaScript
LicenseMIT License
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation