J

mcp-server-weather-js

...
Created 12/12/2024byhideya

Categories

mcpmcp-servermodelcontextprotocolnodejstypescript

Language:

JavaScript

Stars:

5

Forks:

4

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 more 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:
      • path (number): Latitude of the location
      • content (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.

Last updated: 3/18/2025

Publisher info

hideya's avatar

hideya

self-employed
tokyo
23
followers
8
following
95
repos

More MCP servers built with JavaScript

mcp-server-semgrep

MCP Server Semgrep is a [Model Context Protocol](https://modelcontextprotocol.io) compliant server that integrates the powerful Semgrep static analysis tool with AI assistants like Anthropic Claude. It enables advanced code analysis, security vulnerability detection, and code quality improvements directly through a conversational interface.

By Szowesgad9
protonmail-mcp

This MCP server provides email sending functionality using Protonmail's SMTP service. It allows both Claude Desktop and Cline VSCode extension to send emails on your behalf using your Protonmail credentials.

By amotivv6
agentql-mcp

Model Context Protocol server that integrates AgentQL's data extraction capabilities.

By tinyfish-io45