Skip to main content
Glama
kayabhay

Real-Time Weather MCP Server

by kayabhay
README.md
# ๐ŸŒค๏ธ 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](https://github.com/modelcontextprotocol/python-sdk).

---

## โœจ 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.

---

## ๐Ÿ“ Project Structure

```text
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

```bash
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):**
```bash
uv venv
.venv\Scripts\activate   # On Windows (or 'source .venv/bin/activate' on macOS/Linux)
uv pip install -e .
```

**Using standard `pip`:**
```bash
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:

```bash
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`

```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:

```bash
npx @modelcontextprotocol/inspector uv run main.py
```

Or run the server directly in stdio mode:

```bash
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](LICENSE).

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