Skip to main content
Glama
kishore341

Weather Checker

by kishore341

β›… Weather MCP Server

A lightweight MCP (Model Context Protocol) server that exposes a single tool β€” real-time weather lookup for any location β€” to any MCP-compatible client, such as Claude Desktop.


🧠 How It Works

  1. A FastMCP server named "Weather Checker" is started over stdio transport.

  2. It exposes one async tool, check_weather(location: str), callable by any connected MCP client.

  3. Internally, the tool calls get_weather(), which hits wttr.in β€” a free, no-auth-required weather service β€” and returns a concise, one-line weather summary for the given location.

  4. No API keys, no sign-ups, no external dependencies beyond the mcp package itself.


Related MCP server: MCP Weather Server

πŸ—‚οΈ Project Structure

β”œβ”€β”€ main.py                 # MCP server entry point β€” defines and runs the check_weather tool
β”œβ”€β”€ tools/
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── weather.py          # Fetches weather data from wttr.in
β”œβ”€β”€ pyproject.toml          # Project metadata and dependencies (uv-managed)
β”œβ”€β”€ requrements.txt          # Pip-installable dependencies
β”œβ”€β”€ uv.lock                  # Locked dependency versions
└── .python-version          # Python 3.13

πŸ› οΈ Tech Stack

Layer

Technology

Protocol

MCP (Model Context Protocol) β€” FastMCP, stdio transport

Weather Data Source

wttr.in β€” free console-friendly weather API

HTTP Client

Python standard library (urllib.request)

Package Management

uv

Language

Python 3.13


βš™οΈ Local Setup

1. Clone the Repository

git clone https://github.com/<your-username>/<repo-name>.git
cd <repo-name>

2. Install Dependencies

Using uv (recommended, matches uv.lock):

uv sync

Or using standard venv + pip:

python -m venv .venv
source .venv/bin/activate   # On Windows: .venv\Scripts\activate
pip install -e .

3. Run the Server

python main.py

The server starts and communicates over stdio β€” it's designed to be launched by an MCP client, not accessed directly via a browser or REST call.


πŸ”Œ Connecting to an MCP Client

To use this server with an MCP-compatible client (e.g. Claude Desktop), add it to the client's MCP server configuration:

{
  "mcpServers": {
    "weather-checker": {
      "command": "python",
      "args": ["main.py"]
    }
  }
}

If using uv:

{
  "mcpServers": {
    "weather-checker": {
      "command": "uv",
      "args": ["run", "main.py"]
    }
  }
}

Once connected, the client can call the check_weather tool directly β€” for example, asking "What's the weather in London?" will invoke check_weather(location="London") behind the scenes.


πŸ”§ Available Tools

Tool

Parameters

Returns

Description

check_weather

location: str (e.g. "New York", "London")

Concise weather summary (string)

Fetches current weather conditions for the specified location via wttr.in

Example Output

New York: β˜€οΈ   +24Β°C

πŸ“Œ Key Features

  • βœ… Zero-configuration β€” no API keys or environment variables required

  • βœ… Minimal dependency footprint (mcp[cli] only)

  • βœ… Clean separation between MCP tool definition (main.py) and the underlying data-fetch logic (tools/weather.py)

  • βœ… Graceful error handling β€” returns a readable error string instead of raising on failed requests

  • βœ… Async tool definition, ready to scale to additional tools in the same server


πŸ“„ License

This project is for educational purposes.

Available Tools

1 tool
check_weatherC

Get weather information for a specified location.

ParametersJSON Schema
NameRequiredDescriptionDefault
locationYes

TDQS

C2.6/5.0
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It only says 'get weather information' without specifying if data is real-time, cached, or any constraints on the location parameter. Minimal transparency.

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 description is a single concise sentence. It is front-loaded with the action and resource. No extraneous words.

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

Completeness2/5

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

Given the tool's simplicity (one parameter, no output schema), the description is barely adequate. It lacks details on return value, expected input format, or any additional context that would help the agent use the tool correctly.

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

Parameters1/5

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

Schema description coverage is 0%, yet the description adds no information about the 'location' parameter beyond its name. The description fails to compensate for the lack of parameter documentation, leaving the agent without semantic details.

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?

The description clearly states the action ('get weather information') and the resource ('for a specified location'). It is a specific verb-resource pair. With no sibling tools, there is no confusion about its purpose.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives, or any prerequisites. There are no siblings listed, but the description does not offer any context about appropriate use cases.

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. Dates show when Glama detected each change.

  1. 1 tool updatev0.1.0
    • First observedcheck_weather

TDQS

C2.9/5.0
Disambiguation5/5

With only one tool, there is no possibility of confusion between tools, making disambiguation perfect.

Naming Consistency5/5

The single tool name 'check_weather' follows a clear verb_noun pattern, and with only one tool, consistency is trivial.

Tool Count2/5

A single tool for a weather service feels too thin; typical weather APIs offer multiple endpoints (current, forecast, alerts), so this count is insufficient for the apparent scope.

Completeness2/5

The tool set likely lacks essential features like forecasts, historical data, or location types, making it incomplete for realistic weather queries.

Maintenance

ActivityStale
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kishore341/Weather-Agent-using-MCP-and-MCP-Inspector'

If you have feedback or need assistance with the MCP directory API, please join our Discord server