Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AIFire in da houseCheck it out free

mcp-server-weather-js

MCP.Pizza Chef: hideya

mcp-server-weather-js is a Node.js-based MCP server that implements the Model Context Protocol to provide structured, real-time weather information for locations in the United States. Designed as a simple example from the MCP Quickstart, it enables LLMs and AI applications to query and retrieve weather data seamlessly. Packaged as an npm module, it supports easy deployment and integration, including usage with clients like Claude Desktop. This server exemplifies how MCP servers can expose external data sources, such as weather APIs, to AI models in a standardized, secure, and observable manner.

Use This MCP server To

Provide real-time US weather data to AI models Integrate weather info into AI-driven chatbots Enable LLMs to answer weather-related queries Demonstrate MCP server implementation with Node.js Test MCP client-server interactions using weather data

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.

mcp-server-weather-js FAQ

How do I install mcp-server-weather-js?
Install via npm using 'npm install @h1deya/mcp-server-weather' or run directly with 'npx @h1deya/mcp-server-weather'.
Can I use mcp-server-weather-js with different MCP clients?
Yes, it is compatible with any MCP client that supports the protocol, including Claude Desktop and other MCP hosts.
Does mcp-server-weather-js provide weather data outside the US?
No, this server currently provides weather information only for locations within the United States.
How do I configure mcp-server-weather-js for use with Claude Desktop?
Merge the provided JSON fragment into your 'claude_desktop_config.json' as described in the MCP Quickstart documentation.
Is the weather data updated in real-time?
Yes, the server fetches current weather information dynamically to provide up-to-date data.
What license governs mcp-server-weather-js?
It is licensed under the MIT License, allowing free use and modification.
Can I extend mcp-server-weather-js to support other regions?
Yes, since it is open source, you can modify the code to integrate additional weather APIs for other regions.
What Node.js version is required to run mcp-server-weather-js?
It requires a recent Node.js version compatible with the dependencies, typically Node.js 14 or higher.