Cover image
Try Now
2025-03-29

3 years

Works with Finder

1

Github Watches

0

Github Forks

0

Github Stars

Weather MCP Server

smithery badge

Overview

This repository contains an MCP (Model Context Protocol) server for accessing US weather data from the National Weather Service (NWS) API. The server provides tools to fetch weather alerts and forecasts for locations across the United States.

Features

  • Get weather alerts for any US state using two-letter state codes
  • Retrieve detailed weather forecasts by latitude and longitude
  • Structured logging with contextual information
  • Error handling and timeout management

Installation

Installing via Smithery

To install mcp-weather-server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @asifdotpy/mcp-weather-server --client claude

Manual Installation

# Clone the repository
git clone <repository-url>

# Navigate to the directory
cd weather

# Install dependencies (requires Python 3.11+)
pip install -e .

Dependencies

  • httpx: For making asynchronous HTTP requests
  • mcp: Model Context Protocol library for building MCP servers

Usage

The server provides two main tools:

Get Weather Alerts

get_alerts(state: str) -> str
  • state: Two-letter US state code (e.g., CA, NY)
  • Returns formatted weather alerts for the specified state

Get Weather Forecast

get_forecast(latitude: float, longitude: float) -> str
  • latitude: Latitude of the location
  • longitude: Longitude of the location
  • Returns a 5-period weather forecast for the specified coordinates

Running the Server

python weather.py

The server runs over stdio, making it compatible with MCP clients.

Development

  • Set the ENV environment variable to "production" for JSON-formatted logs
  • Configure logging level with the LOG_LEVEL environment variable

License

[Specify your license here]

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Lists Tailwind CSS classes in monospaced font

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

    Reviews

    5 (1)
    Avatar
    user_e8acLC5H
    2025-04-15

    The privateGPT MCP Server by MCP-Mirror is an outstanding product for AI and MAS development enthusiasts. It offers robust and scalable solutions, ensuring seamless performance and efficiency. Highly recommended for anyone in need of a reliable and effective server. Check it out here: https://mcp.so/server/Fujitsu-AI_MCP-Server-for-MAS-Developments/MCP-Mirror.