Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Provides weather alerts for US states and forecasts for given coordinates via MCP tools.

README.md

MCP Server – Weather MCP Server

This project implements an MCP server built using the Model Context Protocol. It follows the “Build an MCP server” tutorial and provides custom tools for your application.

Table of Contents

What this does

This server exposes MCP tools that can be called by MCP clients (such as the Claude for Desktop client) to perform specific operations. In the tutorial you followed, the example implements two tools: get_alerts(state) and get_forecast(latitude, longitude). In your version, you may have modified or added tools according to your use-case.

Prerequisites

  • Python 3.10 or higher (or whichever version you used)
  • MCP SDK version ≥ 1.2.0 (for Python) as described.
  • (If applicable) uv tool (or equivalent) for running the server.
  • Internet connection (if the tools query external APIs).
  • For integration with Claude for Desktop: ensure you have the client installed and configured correctly.

Installation

  1. Clone this repository:
   git clone <repo-url>
   cd <repo-name>
  1. Create and activate a virtual environment:
   source .venv/bin/activate   # (on macOS/Linux)
   # or on Windows: .venv\Scripts\activate
  1. Install dependencies:
   pip install mcp[cli] httpx

Usage

To start the MCP server:

uv run <server_file>.py

or if you don’t use uv, simply:

python <server_file>.py

The server will start listening for MCP host messages (via stdio or HTTP depending on your transport).

If you’re integrating with Claude for Desktop, update your claude_desktop_config.json like this:

{
  "mcpServers": {
    "<server-name>": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/PARENT/FOLDER/<server-dir>",
        "run",
        "<server_file>.py"
      ]
    }
  }
}

Then restart Claude for Desktop to pick up this configuration.

Tools / Endpoints

Below are the tools exposed by the server:

get_alerts(state: str) -> str

Gets weather alerts for a US state (2-letter code, e.g., “CA”, “NY”). Returns a formatted string of alerts or an informative message if none available.

get_forecast(latitude: float, longitude: float) -> str

Gets a weather forecast for a given latitude & longitude (US only, based on external API). Returns a readable string summarizing the next few forecast periods.

(Modify this section if you added additional tools.)

Architecture & How it Works

When a client sends a request:

  1. The client sends your question to the LLM host.
  1. The host selects which tool(s) to call (based on MCP tooling metadata).
  1. The MCP server receives a tool invocation via JSON-RPC (or HTTP) and executes it.
  1. The result is returned to the host, which then uses the LLM to formulate a natural language response to the user.

(This flow is based on the “What’s happening under the hood” section of the tutorial.)

Logging & Best Practices

  • Do not write to stdout for stdio-transport servers (in Python: avoid print() statements) as it may corrupt JSON-RPC messages. Use a logging library that writes to stderr or file instead.
  • Tool names should follow the naming conventions specified by MCP.
  • Validate inputs and handle errors gracefully (e.g., when external API fails or returns unexpected data).

Troubleshooting

  • If the server isn’t showing up in the client (e.g., Claude for Desktop):
  • Check your JSON config syntax.
  • Ensure the path to your server script is absolute.
  • Make sure you fully quit and restart the client application.
  • If tool calls fail silently:
  • Check client logs (e.g., ~/Library/Logs/Claude/mcp\*.log on macOS).
  • Verify that your server runs without startup errors.
  • Confirm that your network/API access is working (for example, if using an external weather API).
  • If you're working outside the US and the example API only supports US locations: consider switching to a global API or adjust the logic accordingly.

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Maps & Location servers.