MCP Server
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-serverWindows (через 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
Доступные инструменты и ресурсы
Тип | Название | Что делает |
Инструмент |
| Возвращает текущее время с автоматическим определением часового пояса |
Ресурс |
| Оповещения о погоде для штата США (например, |
Ресурс |
| Прогноз на 5 периодов для координат |
Промпт |
| Помогает Claude выполнить полный анализ погоды |
Промпт |
| Помогает с проверкой, преобразованием и сравнением часовых поясов |
Добавление собственных инструментов
Откройте 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 toolsclear_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
| Name | Required | Description | Default |
|---|---|---|---|
| max_age_minutes | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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)
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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
| Name | Required | Description | Default |
|---|---|---|---|
| ip_address | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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)
| Name | Required | Description | Default |
|---|---|---|---|
| latitude | Yes | ||
| longitude | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
4 tool updates
v0.1.0- First observed
clear_old_cache - First observed
get_alerts - First observed
get_current_time - First observed
get_forecast
TDQS
Each tool targets a distinct function: cache management, alerts, current time, and forecast. No overlap or ambiguity.
All names follow a consistent verb_noun snake_case pattern (clear_old_cache, get_alerts, get_current_time, get_forecast).
With 4 tools, the set is slightly sparse but well-scoped for a combined weather/time server. Each tool serves a clear purpose.
Missing current weather conditions and location-based time input; only alerts and forecast for weather, time only via IP. Notable gaps exist.
Maintenance
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
Hosted MCP server for Xweather weather data: conditions, forecasts, alerts, and more.
1MCP server for weather with reasoning — umbrella advice, outdoor checks, city comparisons.
An MCP server for weather information by @kulybaba
An MCP server for weather information by @kulybaba
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides real-time weather data from Open-Meteo API, mathematical calculations, and time zone information through MCP protocol. Works with both Claude Desktop and Gemini AI CLI for natural language interactions.-
- FlicenseNot gradedqualityDmaintenanceA 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-
- AlicenseAqualityCmaintenanceAn MCP server that provides weather and time tools, enabling users to get current time, weather alerts, and forecasts through natural language with Claude Desktop.4MIT
- FlicenseBqualityCmaintenanceA Python MCP server providing weather and date tools for travel planning, compatible with Google ADK and Claude Desktop.2-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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