Weather MCP Server

Weather MCP Server

Provides weather forecasts and alerts for US locations using the National Weather Service API. Features secure access via GitHub authentication and supports coordinate-based forecasts and state-specific weather alerts.

Category
Visit Server

README

Weather MCP Server

A Model Context Protocol (MCP) server that provides weather forecasts and alerts using the US National Weather Service API. Requires GitHub authentication to access weather tools.

Features

  • GitHub Authentication: Secure access using GitHub personal access tokens
  • Weather Forecasts: Get detailed weather forecasts for any US location by coordinates
  • Weather Alerts: Retrieve active weather alerts by state code

Installation

NPM Installation

npm install -g @dmitry-melnishin/mcp-weather

Usage in VS Code

Add this to your MCP settings file (.vscode/mcp.json or global settings):

{
  "mcpServers": {
    "weather": {
      "command": "npx",
      "args": ["-y", "@dmitry-melnishin/mcp-weather"]
    }
  }
}

Or if installed globally:

{
  "mcpServers": {
    "weather": {
      "command": "mcp-weather"
    }
  }
}

Authentication Setup

Before using the weather tools, you must authenticate with GitHub:

  1. Create a GitHub Personal Access Token:

    • Go to GitHub Settings → Developer settings → Personal access tokens → Tokens (classic)
    • Click "Generate new token (classic)"
    • You don't need to select any scopes - just name it (e.g., "MCP Weather")
    • Click "Generate token" and copy the token
  2. Authenticate in MCP:

    • Use the authenticate tool with your GitHub token
    • Once authenticated, you can use all weather tools

Example authentication:

Tool: authenticate
Parameters: { "token": "ghp_your_github_token_here" }

Available Tools

authenticate

Authenticate with GitHub using a personal access token.

Parameters:

  • token (string): GitHub personal access token

Returns: Success message with authenticated username or error message.

Note: You must authenticate before using any weather tools.

get_forecast

Get weather forecast for a location. Requires authentication.

Parameters:

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

Example:

Get forecast for latitude 40.7128, longitude -74.0060

get_alerts

Get weather alerts for a US state. Requires authentication.

Parameters:

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

Example:

Get weather alerts for CA

Security Notes

  • Your GitHub token is only stored in memory during the server session
  • The token is never logged or persisted to disk
  • No specific GitHub permissions/scopes are required
  • The token is only used to verify your identity with GitHub

Development

Prerequisites

  • Node.js 18 or higher
  • npm or yarn

Setup

git clone https://github.com/your-username/mcp-weather
cd mcp-weather
npm install

Build

npm run build

Local Testing

You can test the server locally by running:

node build/index.js

API Source

This server uses the National Weather Service API, which provides weather data for US locations only.

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured