Skip to main content
Glama

MCP-сервер

Расширяемый сервер Model Context Protocol (MCP) с инструментами для получения погоды и времени. Создан для обучения — подключите его к Claude Desktop и начните общение.

Начало работы

1. Клонирование и установка

git clone <repo-url> && cd mcp-server
python3 -m venv .venv
source .venv/bin/activate   # macOS / Linux / WSL
pip install -e .

Или с помощью uv:

git clone <repo-url> && cd mcp-server
uv venv
source .venv/bin/activate
uv pip install -e .

2. Подключение к Claude Desktop

Запустите скрипт настройки, чтобы автоматически записать файл конфигурации Claude Desktop:

macOS:

python setup_claude_agent.py

Это запишет файл ~/Library/Application Support/Claude/claude_desktop_config.json, указывающий на .venv/bin/python вашего проекта.

Если ваш проект находится в нестандартном месте, укажите его явно:

python setup_claude_agent.py --project-path /path/to/mcp-server

Windows (через WSL):

python3 setup_claude_agent.py --windows --win-user <YourWindowsUser> --wsl-user <YourWSLUser>

Например:

python3 setup_claude_agent.py --windows --win-user Cam --wsl-user cam

Это запишет файл %APPDATA%\Claude\claude_desktop_config.json и настроит Claude Desktop на запуск сервера через WSL.

3. Перезапуск Claude Desktop

Закройте и снова откройте Claude Desktop. Чтобы убедиться, что сервер подключен, перейдите в Settings → Developer — вы должны увидеть mcp-server с зеленым значком running.

4. Попробуйте в действии

Спросите у Claude что-нибудь из следующего:

  • "What time is it?" — использует инструмент get_current_time

  • "Get weather alerts for California" — использует ресурс weather://alerts/CA

  • "What's the forecast for latitude 40.7128, longitude -74.0060?" — использует ресурс прогноза

Вам не нужно запускать сервер вручную — Claude Desktop запускает его автоматически.


Related MCP server: mcp-weather

Доступные инструменты и ресурсы

Тип

Название

Что делает

Инструмент

get_current_time

Возвращает текущее время с автоматическим определением часового пояса

Ресурс

weather://alerts/{state}

Оповещения о погоде для штата США (например, CA, NY)

Ресурс

weather://forecast/{lat}/{lon}

Прогноз на 5 периодов для координат

Промпт

analyze_weather_prompt

Помогает Claude выполнить полный анализ погоды

Промпт

timezone_helper_prompt

Помогает с проверкой, преобразованием и сравнением часовых поясов

Добавление собственных инструментов

Откройте src/mcp_server/server.py и добавьте функцию с декоратором @mcp.tool():

@mcp.tool()
async def my_tool(param: str) -> str:
    """Description of what this tool does."""
    return f"Result for {param}"

Перезапустите Claude Desktop, чтобы изменения вступили в силу.

Информацию о ресурсах и промптах см. в CONTRIBUTING.md.

Запуск тестов

pip install -e ".[dev]"   # or: uv pip install -e ".[dev]"
pytest

Структура проекта

src/mcp_server/
├── server.py              # MCP server entry point — register tools here
└── tools/
    ├── weather/           # Weather alerts & forecasts (NWS API)
    ├── time/              # IP-based timezone & current time
    └── conversation/      # Conversation tools

Лицензия

MIT

Ресурсы

Available Tools

4 tools
clear_old_cacheA

Clear expired weather cache entries.

Args: max_age_minutes: Maximum age in minutes before considering expired

Returns: Status message with number of entries removed

ParametersJSON Schema
NameRequiredDescriptionDefault
max_age_minutesNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior2/5

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

No annotations are provided, but the description only states the action and parameter. It does not disclose behavioral traits such as destructiveness, safety for repeated use, or side effects.

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?

The description is extremely concise with one line for purpose plus args/returns. It is front-loaded and contains no superfluous text.

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?

The tool is simple with one optional parameter and an output schema. The description explains the parameter and return value, but could mention default behavior or safety.

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?

The description adds meaning to the parameter 'max_age_minutes' beyond the schema by explaining its purpose ('Maximum age in minutes before considering expired'). Schema coverage is 0%, so this is valuable.

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 clearly states the action 'Clear expired weather cache entries' using a specific verb and resource. It distinguishes from sibling tools (get_alerts, get_current_time, get_forecast) which are retrieval-focused.

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?

The description provides no guidance on when to use this tool versus alternatives, nor does it mention when not to use it.

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

get_alertsA

Get active weather alerts for a US state.

Provides current weather alerts and warnings for the specified state. Checks cache first (30 min expiry), fetches fresh if needed.

Args: state: Two-letter US state code (e.g. CA, NY)

ParametersJSON Schema
NameRequiredDescriptionDefault
stateYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

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

Discloses cache checking and 30-min expiry, which is beyond a simple read operation. No annotations provided, so description carries burden.

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?

Three sentences: purpose, caching, parameter detail. No fluff, front-loaded.

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

Completeness5/5

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

Simple tool with one param, output schema exists. Description covers caching and parameter format adequately.

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

Parameters5/5

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

Adds format (two-letter code, examples) beyond schema's type/required constraints. Schema description coverage 0%, description fully compensates.

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?

Clear verb 'Get', resource 'active weather alerts', scope 'for a US state'. Distinct from sibling tools like get_forecast.

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?

Mentions caching behavior but no explicit guidance on when to use vs alternatives or when not to use.

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

get_current_timeA

Get the current time based on the user's IP address.

This tool determines the user's timezone from their IP address using geolocation and returns the current local time in that timezone.

Args: ip_address: Optional IP address to determine timezone. If not provided or empty string, attempts to detect automatically or defaults to UTC.

Returns: Formatted string with current time, timezone, day, and ISO timestamp

ParametersJSON Schema
NameRequiredDescriptionDefault
ip_addressNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.8/5.0
Behavior5/5

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

No annotations provided, so description fully discloses behavior: geolocation from IP, optional default, and return format (local time, timezone, day, ISO timestamp). No contradictions.

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?

Two concise paragraphs front-loaded with purpose, followed by Args and Returns. No unnecessary words.

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

Completeness5/5

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

Tool is simple, parameter fully explained, return format described, output schema exists. No missing information for correct usage.

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

Parameters5/5

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

Single parameter ip_address is described in detail: optional, used for timezone detection, default behavior. Schema coverage is 0%, so description adds essential meaning beyond the schema.

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?

Clearly states the tool gets current time via IP geolocation, distinguishing it from unrelated siblings like clear_old_cache, get_alerts, get_forecast.

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

Usage Guidelines4/5

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

Describes when to provide IP address or rely on auto-detection, but does not explicitly exclude use cases or suggest alternatives. Given tool simplicity, this is sufficient.

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

get_forecastA

Get weather forecast for geographic coordinates.

Provides a 5-day forecast for the specified location. Checks cache first (60 min expiry), fetches fresh if needed.

Args: latitude: Latitude of the location (-90 to 90) longitude: Longitude of the location (-180 to 180)

ParametersJSON Schema
NameRequiredDescriptionDefault
latitudeYes
longitudeYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior4/5

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

The description discloses caching behavior ('Checks cache first (60 min expiry), fetches fresh if needed'), which adds transparency beyond a simple read operation. However, since no annotations are provided, the description fully carries the transparency burden, and it does not mention any potential side effects, rate limits, or data staleness considerations.

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?

The description is concise (4 sentences) and front-loaded with the main purpose. Every sentence adds value, with no redundant or filler content. The structure is clear: purpose, scope, behavior, parameter details.

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

Completeness5/5

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

Given the tool's low complexity (2 required parameters, no nested objects, and an output schema present), the description sufficiently covers purpose, caching behavior, and parameter bounds. It does not need to explain return values due to the output schema, making it complete for effective use.

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

Parameters5/5

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

With 0% schema description coverage, the input schema provides no descriptions for the parameters. The tool description compensates fully by adding clear parameter semantics: latitude bounds (-90 to 90) and longitude bounds (-180 to 180), which are not present in the schema.

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 clearly states the tool's purpose: 'Get weather forecast for geographic coordinates.' It specifies the resource (weather forecast) and the scope (geographic coordinates), making it highly specific and distinct from sibling tools like get_alerts and get_current_time.

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?

The description does not provide guidance on when to use this tool versus alternatives. It mentions it provides a '5-day forecast' and caching behavior, but there is no explicit when-to-use or when-not-to-use context, nor differentiation from sibling tools.

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. 4 tool updatesv0.1.0
    • First observedclear_old_cache
    • First observedget_alerts
    • First observedget_current_time
    • First observedget_forecast

TDQS

A4.1/5.0
Disambiguation5/5

Each tool targets a distinct function: cache management, alerts, current time, and forecast. No overlap or ambiguity.

Naming Consistency5/5

All names follow a consistent verb_noun snake_case pattern (clear_old_cache, get_alerts, get_current_time, get_forecast).

Tool Count4/5

With 4 tools, the set is slightly sparse but well-scoped for a combined weather/time server. Each tool serves a clear purpose.

Completeness3/5

Missing current weather conditions and location-based time input; only alerts and forecast for weather, time only via IP. Notable gaps exist.

Maintenance

ActivityInactive
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
    A Model Context Protocol (MCP) server built with the mcp-framework to provide weather-related tools and data to AI clients. It enables integration of weather capabilities and custom tools into the MCP ecosystem for use with platforms like Claude Desktop.
    23
    -
  • A
    license
    A
    quality
    C
    maintenance
    An MCP server that provides weather and time tools, enabling users to get current time, weather alerts, and forecasts through natural language with Claude Desktop.
    4
    MIT

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/naggbagg/mcp-server'

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