Skip to main content
Glama
AronSoldok

weather_mcp

by AronSoldok

Прогноз погоды через MCP

Учебный проект: MCP-сервер ходит в публичный API Open-Meteo, консольный клиент спрашивает город (кириллицей или латиницей) и печатает прогноз на 7 дней.

Что такое MCP

MCP (Model Context Protocol) — открытый стандарт Anthropic (конец 2024). Коротко для собеседования: это «USB-C для ИИ». Один протокол, чтобы подключать к модели внешние системы (API, файлы, БД) без самописного плагина под каждый чат.

Три роли:

  • Host — приложение, в котором живёт модель (Cursor, Claude Desktop) или, как здесь, наше CLI.

  • Client — сторона, которая говорит с сервером по протоколу: handshake, список инструментов, вызов.

  • Server — процесс, который отдаёт инструменты. Он не чат и не модель, а розетка с функциями.

Три примитива протокола (в этом проекте только первый):

  • Tools — функции с JSON Schema аргументов. Методы tools/list и tools/call. У нас это get_forecast(city).

  • Resources — данные «как файлы» по URI. Не используем.

  • Prompts — шаблоны промптов. Не используем.

Связь — JSON-RPC 2.0. Локально идёт по stdio: клиент запускает сервер как subprocess и пишет JSON-строки в его stdin. Поэтому сервер нельзя логировать через print() — это попадёт в тот же поток, что и протокол, и сломает его. Логи только в stderr (logging).

Чем этот проект отличается от Cursor

«Классический» хост — Cursor: модель сама решает, какой tool вызвать. Здесь хост — client.py: город вводит человек, клиент явно вызывает get_forecast. Протокол тот же, LLM нет. Так проще увидеть handshake, list_tools и call_tool без «магии модели».

«Зачем MCP, если есть REST?»

REST — как сервер разговаривает с Open-Meteo. MCP — как ИИ-приложение разговаривает с вашим сервером: единый каталог инструментов, схемы аргументов, один транспорт. Сервер пишете один раз — его могут вызвать Cursor, Claude Desktop или этот CLI.

Спецификация: modelcontextprotocol.io.

Related MCP server: Weather MCP Server

Как это устроено здесь

  1. Вы запускаете клиент и вводите город (Москва или Moscow).

  2. Клиент поднимает MCP-сервер по stdio и вызывает tool get_forecast.

  3. Сервер ищет координаты в Geocoding API (кириллица → language=ru, иначе en) и берёт 7 дней из Forecast API.

  4. Клиент печатает таблицу: дата, день недели, погода, мин/макс, осадки, ветер.

Ключ API не нужен.

Запуск

Нужны Python 3.10+ и uv.

cd Checking_weather_MCP
uv sync
uv run python -m weather_mcp.client

Если команда uv не находится, тот же CLI ставится через pip: py -m pip install uv, дальше py -m uv sync и py -m uv run python -m weather_mcp.client.

Появится приглашение Город:. После ввода — таблица на неделю.

Сервер отдельно обычно не запускают: без клиента он просто ждёт JSON-RPC на stdin. Если нужно вручную:

uv run python -m weather_mcp.server

Available Tools

1 tool
get_forecastA

7-дневный прогноз по названию города (кириллица или латиница).

ParametersJSON Schema
NameRequiredDescriptionDefault
cityYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
cityYes
daysNo
countryYes
latitudeYes
timezoneYes
longitudeYes

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the behavioral disclosure burden. It does disclose the forecast horizon and accepted input script, but it does not mention possible limitations, error behavior, timezone considerations, or data source. The description is not misleading but is minimal.

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

Conciseness5/5

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

A single compact sentence that front-loads the core semantics and the input requirement. There is no redundancy or filler; every part contributes useful information.

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

Completeness4/5

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

For a simple one-parameter tool with an output schema, the description covers the essential input and output semantics. Minor gaps like units, city ambiguity, or error behavior are not addressed, but the tool's simplicity and the presence of an output schema keep these gaps acceptable.

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 coverage is 0%, so the description must compensate. It adds meaning by clarifying that the city value is a name (rather than an ID) and explicitly supports both Cyrillic and Latin script. This goes beyond the bare string type in the schema, though it doesn't specify additional formatting or disambiguation details.

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

Purpose5/5

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

The description states a clear verb and resource: it returns a 7-day forecast for a given city name. It is specific and unambiguous, and the additional script hint (Cyrillic or Latin) further sharpens the purpose.

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?

There are no sibling tools or explicit when/when-not guidance, but the description implies the intended use: whenever a 7-day city forecast is needed. This is adequate for a simple single-purpose tool but leaves the agent to infer the context.

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 observedget_forecast

TDQS

A3.6/5.0
Disambiguation5/5

Only one tool exists, so there is no possibility of confusion or overlap. The single tool's purpose is clearly defined as a 7-day forecast by city name.

Naming Consistency4/5

The tool name get_forecast follows a clear verb_noun convention that would be consistent with a broader weather toolset. However, with only one tool, the naming pattern is not fully demonstrable.

Tool Count1/5

A single tool is far too few for a weather server, which typically requires current conditions, geocoding, unit preferences, and alerts. This feels like an extreme under-scoping of the domain.

Completeness1/5

The tool surface is severely incomplete for a weather service. It only provides a 7-day forecast, leaving out current weather, location search, weather alerts, and other common weather data operations.

Maintenance

ActivityMaintained
ResponsivenessNo issues

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

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to fetch current weather conditions and forecasts for any city using the Open-Meteo API. Provides temperature, precipitation, and hourly forecast data through natural language queries.
    -
  • A
    license
    B
    quality
    D
    maintenance
    Enables real-time weather queries for cities worldwide using Open-Meteo API. Provides 7-day forecasts with detailed information including temperature, wind, humidity, precipitation, and comfort level assessments in both Chinese and English.
    1
    10
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides current weather information for any city worldwide using the free Open-Meteo API, enabling users to query temperature, wind speed, humidity, and weather conditions through natural language.
    13
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Provides current weather and multi-day forecasts for any city using the Open-Meteo API, with natural language city names and optional forecast duration.
    -

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/AronSoldok/Checking_weather_MCP'

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