Skip to main content
Glama
kayabhay

Real-Time Weather MCP Server

by kayabhay

๐ŸŒค๏ธ Real-Time Weather MCP Server

A Model Context Protocol (MCP) server that provides real-time weather information to Claude Desktop and any other MCP-compliant client. Built using FastMCP.


โœจ Features

  • Live Weather Data: Real-time conditions, temperatures, and forecasts.

  • Zero API Key Requirement: Uses wttr.in without requiring sign-up or paid subscription keys.

  • FastMCP Powered: High-performance asynchronous tool handling over standard input/output (stdio).

  • Claude Desktop Ready: One-click registration using the mcp CLI or manual JSON configuration.


Related MCP server: mcp-weather-server

๐Ÿ“ Project Structure

real_time_weather-mcp/
โ”œโ”€โ”€ main.py              # FastMCP server entry point & tool registration
โ”œโ”€โ”€ tools/
โ”‚   โ”œโ”€โ”€ __init__.py      # Tools package initializer
โ”‚   โ””โ”€โ”€ weather.py       # Weather fetching logic & API handler
โ”œโ”€โ”€ pyproject.toml       # Modern Python packaging & dependencies
โ”œโ”€โ”€ requirements.txt     # Standard pip requirements file
โ”œโ”€โ”€ .gitignore           # Git ignore configuration
โ”œโ”€โ”€ LICENSE              # MIT License
โ””โ”€โ”€ README.md            # Project documentation

๐Ÿ› ๏ธ Prerequisites

  • Python: >= 3.10

  • uv (recommended) or standard pip

  • Claude Desktop (optional, for LLM integration)


๐Ÿš€ Quick Start

1. Clone the repository

git clone https://github.com/<your-username>/real_time_weather-mcp.git
cd real_time_weather-mcp

2. Set up environment & install dependencies

Using uv (recommended):

uv venv
.venv\Scripts\activate   # On Windows (or 'source .venv/bin/activate' on macOS/Linux)
uv pip install -e .

Using standard pip:

python -m venv .venv
.venv\Scripts\activate   # On Windows (or 'source .venv/bin/activate' on macOS/Linux)
pip install -r requirements.txt

๐Ÿ”Œ Installing into Claude Desktop

Automatic Installation

Run the FastMCP installer from your activated virtual environment:

mcp install main.py

Note for Windows Store Claude users: If your Claude app was installed from the Microsoft Store, ensure AppData\Roaming\Claude points or links to your local package cache.

Manual Configuration

Add the following to your claude_desktop_config.json:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "Live Weather": {
      "command": "uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "mcp",
        "run",
        "/absolute/path/to/real_time_weather-mcp/main.py"
      ]
    }
  }
}

Restart Claude Desktop to activate the tool.


๐Ÿงช Testing & Debugging

You can test the MCP server using the official MCP Inspector:

npx @modelcontextprotocol/inspector uv run main.py

Or run the server directly in stdio mode:

python main.py

๐Ÿ› ๏ธ Available MCP Tools

Tool

Parameters

Description

check_weather

location (string), detailed (bool, optional)

Fetches real-time weather information for a specified location. If detailed=True, returns temperature, feels-like temp, humidity, wind, and precipitation.


๐Ÿ“„ License

This project is licensed under the MIT License.

Available Tools

1 tool
check_weatherB

Get real-time weather information for a specified location (e.g., "Paris", "New York", "Tokyo").

Args: location: City or location name. detailed: If True, includes feels-like temperature, humidity, wind, and precipitation.

ParametersJSON Schema
NameRequiredDescriptionDefault
detailedNo
locationYes

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It conveys one useful trait ('real-time', i.e. current conditions), but says nothing about units, coverage limits, what happens for an unrecognized location, or whether the call has any cost/auth/rate-limit implications. For a tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the first sentence with examples, followed by a compact Args block. It is appropriately sized for a two-parameter tool, though the Args listing partially duplicates what the schema already shows.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter tool with no output schema, the description is roughly adequate: it says what is returned in detailed mode and what the inputs mean. It omits units, failure behavior for invalid locations, and any description of the default (non-detailed) return shape, leaving noticeable gaps given the absence of annotations and output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does: it names both parameters and explains that 'detailed' adds feels-like temperature, humidity, wind, and precipitation. That is real meaning beyond the bare boolean in the schema. It stops short of stating the expected format/units for 'location', so not a full 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get real-time weather information') plus concrete example locations, so the agent immediately knows what the tool produces. There are no sibling tools to distinguish from, so the ceiling for sibling differentiation cannot be reached, but the purpose itself is unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'real-time' wording implies this is for current conditions rather than forecasts or historical data, which is soft usage guidance. However, there is no explicit statement of when to use this tool, no prerequisites, and no alternatives named (there are no siblings, so alternatives are moot).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev0.1.0
    • First observedcheck_weather

TDQS

A3.6/5.0

Scored across 1 tool

Disambiguation5/5

There is only one tool, so there is no risk of confusing it with another. Its purpose is clearly stated and distinct.

Naming Consistency5/5

The single tool follows a clear verb_noun pattern: check_weather. There are no competing conventions to create inconsistency.

Tool Count3/5

A single tool is thin for a server, even one focused on real-time weather. The detailed flag helps, but the surface feels minimal.

Completeness4/5

For current real-time weather, the tool covers essential output including optional detailed metrics. It lacks features like forecasts, alerts, or multiple locations, but those may be outside the stated real-time scope.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers