Price Per TokenPrice Per Token
Region Weather

Region Weather

by hydavinci

GitHub 1 2,443 uses Remote
0

About

Region Weather retrieves comprehensive weather information for any global location through the wttr.in API service, delivering current conditions, forecasts, and atmospheric metrics via standardized MCP interfaces without requiring API keys. Key features of Region Weather: - Real-time weather conditions, 3-day hourly forecasts, astronomical data (sunrise, sunset, moon phases), and environmental measurements (humidity, barometric pressure, wind speed, UV index, visibility) - Integration with the free wttr.in weather service—no API key or registration required - Flexible transport modes: HTTP server on port 8081 for web clients or stdio for local MCP integrations - Lightweight Python 3.10+ implementation using FastMCP with minimal dependencies (requests, fastmcp) and Docker deployment support

Tools 1

get_weather

MCP handler to get weather information for a specified region Args: region_name (str): Name of the region to get weather for Returns: dict: Weather information for the specified region

README

Weather MCP Server

A Model Context Protocol (MCP) server that provides weather information for different regions around the world.

Overview

This MCP server uses the wttr.in API to fetch weather data and serves it through a standardized MCP interface. It allows AI models and other clients to request weather information for any region by name.

Features

  • Fetch weather information for any city or region worldwide
  • Uses the free wttr.in API (no API key required)
  • Implemented as a FastMCP server for easy integration with AI models
  • Docker support for easy deployment
  • Minimal dependencies for fast startup and low resource usage
  • Requirements

  • Python 3.10+
  • Only 2 dependencies:
  • - requests - HTTP client for wttr.in API - fastmcp - MCP framework (includes uvicorn and starlette)

    Installation

    1. Clone the repository:

       git clone https://github.com/hydavinci/weather_mcp.git
       cd weather_mcp
       

    2. Install dependencies using uv (recommended):

       uv sync
       

    Or using pip:

       pip install requests fastmcp
       

    Usage

    Running the server locally

    HTTP mode (recommended for web clients):

    # PowerShell
    $env:TRANSPORT="http"; python src/server.py

    Bash/Linux

    TRANSPORT=http python src/server.py

    stdio mode (for local MCP clients):

    python src/server.py
    

    The server will start on port 8081 by default for HTTP mode.

    Using Docker

    Build the Docker image:

    docker build -t weather-mcp-server .
    

    Run the container:

    docker run -p 8081:8081 weather-mcp-server
    

    API Usage

    The server exposes a single MCP tool:

    get_weather

    Fetches weather information for the specified region.

    Parameters:

  • region_name (string, required): The name of the city or region to get weather for.
  • Returns:

  • JSON object with comprehensive weather information from wttr.in
  • Example weather data includes:

  • Current conditions and temperature
  • 3-day forecast with hourly details
  • Astronomical data (sunrise, sunset, moon phase)
  • Weather descriptions and codes
  • Humidity, pressure, wind information
  • UV index and visibility
  • Testing

    You can test the weather functionality directly by running:

    python src/weather_fetcher.py
    

    This will fetch and display weather information for Suzhou (default city).

    Environment Variables

  • TRANSPORT: Set to "http" for HTTP mode, otherwise defaults to stdio mode
  • PORT: Port for HTTP mode (default: 8081)
  • SERVER_TOKEN: Optional server token for stdio mode
  • Project Structure

    weather_mcp/
    ├── src/
    │   ├── server.py           # Main MCP server
    │   ├── weather_fetcher.py  # Weather API client
    │   └── middleware.py       # HTTP middleware
    ├── pyproject.toml          # Project configuration
    ├── Dockerfile             # Container configuration
    ├── smithery.yaml          # Smithery deployment config
    └── README.md              # This file
    

    License

    See the LICENSE file for details.

    Build the Docker image:

    docker build -t weather-mcp-server .
    

    Run the container:

    docker run -p 8000:8000 weather-mcp-server
    

    API Usage

    The server exposes a single MCP handler:

    get_weather

    Fetches weather information for the specified region.

    Parameters:

  • region_name (string, required): The name of the city or region to get weather for.
  • Returns:

  • JSON object with weather information from wttr.in
  • Example:

    # Example client code
    from mcp.client import MCPClient

    async with MCPClient("http://localhost:8000") as client: weather_data = await client.get_weather(region_name="London") print(weather_data)

    Testing

    You can test the weather functionality directly by running:

    python weather_fetcher.py
    

    This will fetch and display weather information for Suzhou (default city).

    License

    See the LICENSE file for details.

    Related MCP Servers

    AI Research Assistant

    AI Research Assistant

    hamid-vakilzadeh

    AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar

    Web & Search
    12 8
    Linkup

    Linkup

    LinkupPlatform

    Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages

    Web & Search
    2 24
    Math-MCP

    Math-MCP

    EthanHenrickson

    Math-MCP is a computation server that enables Large Language Models (LLMs) to perform accurate numerical calculations through the Model Context Protocol. It provides precise mathematical operations via a simple API to overcome LLM limitations in arithmetic and statistical reasoning. Key features of Math-MCP: - Basic arithmetic operations: addition, subtraction, multiplication, division, modulo, and bulk summation - Statistical analysis functions: mean, median, mode, minimum, and maximum calculations - Rounding utilities: floor, ceiling, and nearest integer rounding - Trigonometric functions: sine, cosine, tangent, and their inverses with degrees and radians conversion support

    Developer Tools
    22 81