Skip to main content
Glama

Weather MCP

一个 FastMCP 服务器,从 Open-Meteo 获取天气数据,并通过 MCP Apps 渲染交互式天气仪表盘。

Weather MCP 仪表盘

功能

  • 按城市或地名搜索位置

  • 获取当前天气状况和最多 16 天的预报

  • 在摄氏度和华氏度之间切换

  • 显示天气描述和天气状况符号

  • 将位置和预报响应缓存五分钟

  • 在兼容的 MCP 主机中直接渲染仪表盘

Related MCP server: bridgemcp-server-weather

要求

  • Python 3.14+

  • uv

  • 支持 MCP Apps 的 MCP 主机,用于交互式仪表盘

设置

安装项目依赖:

uv sync

正常的非商业 Open-Meteo 使用无需天气 API 密钥。

运行服务器

通过默认的 stdio 传输方式运行服务器:

uv run python main.py

查看已注册的工具:

uv run fastmcp list main.py

预览仪表盘

FastMCP 包含用于应用工具的本地浏览器预览:

uv run fastmcp dev apps main.py

打开显示的本地 URL 并选择 weather_dashboard。该仪表盘支持搜索其他位置和切换温度单位。

MCP 工具

search_locations

查找匹配的位置,并返回其坐标、国家、地区和时区。

get_weather

获取某个位置的当前天气和每日预报。

参数:

  • location:城市或地名

  • forecast_days:预报天数,从 1 到 16

  • temperature_unit:celsius 或 fahrenheit

weather_dashboard

使用相同的天气参数打开交互式天气仪表盘。

项目结构

main.py                         MCP server entry point
src/tools.py                    MCP tool registration and response shaping
src/services/weather_service.py Open-Meteo client and response cache
src/formatting.py               UI-friendly forecast formatting
src/dashboard.py                Prefab MCP App UI

数据来源

天气数据由 Open-Meteo 提供,它整合了多个国家气象服务机构的预报。在商业部署之前,请查看 Open-Meteo 条款和许可。

Available Tools

3 tools
get_weatherC

Get current conditions and a daily forecast.

ParametersJSON Schema
NameRequiredDescriptionDefault
locationYes
forecast_daysNo
temperature_unitNocelsius

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

C2.4/5.0
Behavior2/5

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

无注释,描述未提及任何副作用、依赖或限制(如API密钥、数据来源)。描述仅概括功能,未披露行为细节。

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?

描述简短,无冗余信息,结构清晰。

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?

无输出schema,描述未说明返回数据格式(如JSON结构),也未提及可能的错误情况。整体信息量不足。

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

Parameters2/5

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

参数列表简单,但描述未解释每个参数的含义、格式或默认值的影响。例如,temperature_unit的可能值未说明。

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

Purpose3/5

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

描述明确说明了工具的功能(获取当前天气和预报),但未指定返回值格式或用途。与兄弟工具(如搜索位置、天气仪表盘)的区分度一般。

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?

未说明何时使用此工具与何时使用其他工具(如天气仪表盘),也未提供任何使用前提或限制。

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

search_locationsC

Find weather locations matching a place name.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior1/5

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

No annotations are provided, and the description does not disclose any behavioral traits such as read-only nature, side effects, authentication requirements, or quota limits. The description is purely functional and lacks transparency about what the tool does beyond its immediate action.

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 a single, concise sentence with no unnecessary words or redundant information. It efficiently conveys the core purpose and the key input condition, making it highly focused and easy to parse.

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

Completeness3/5

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

Given the simplicity of the tool (one parameter, no complex behavior), the description is fairly complete. However, it does not mention the return format or the nature of matched locations (e.g., list vs. single), though an output schema exists which could compensate. The lack of any behavioral or edge-case details keeps it at an average level.

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

Parameters2/5

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

The schema provides only the parameter name and type (query: string) with no description. The description adds minimal meaning by indicating that the query is a 'place name', but it does not clarify constraints, formatting, or expected input patterns. Since schema coverage is 0%, this is insufficient.

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 ('Find') and the resource ('weather locations') with a specific criterion ('matching a place name'), which distinguishes it from sibling tools like get_weather that likely retrieve weather for a given location.

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 such as get_weather or weather_dashboard. It does not mention any conditions, prerequisites, or typical use cases, leaving the agent to infer usage solely from the purpose.

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

weather_dashboardC

Show an interactive weather dashboard with location and unit controls.

ParametersJSON Schema
NameRequiredDescriptionDefault
locationYes
forecast_daysNo
temperature_unitNocelsius

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. The description does not mention any side effects, data persistence, or interactive behavior details. It does not state whether the dashboard is read-only, whether it requires network access, or what happens with the controls. For a tool that likely involves UI rendering, more transparency about its behavior would be expected.

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 sentence, concise and front-loaded with the main purpose. It is appropriately sized for a simple tool, though it could benefit from a bit more detail without becoming verbose. The structure is clear and easy to parse.

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 complexity (3 parameters, no output schema, no annotations), the description is incomplete. It does not explain the return value or the interactive nature of the dashboard, nor does it provide enough context for the agent to know what to expect. The sibling tools suggest a weather-related context, but the description alone is insufficient for a complete understanding.

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

Parameters2/5

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

Schema description coverage is 0%, meaning the description must compensate for the lack of parameter documentation. The description mentions 'location and unit controls' which maps to 'location' and 'temperature_unit', but it does not explain 'forecast_days' or provide any additional meaning beyond the schema. The description adds minimal value over the schema, and with 0% coverage, it fails to adequately explain the parameters.

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 tool's purpose: to show an interactive weather dashboard with location and unit controls. It uses a specific verb ('show') and resource ('interactive weather dashboard'), and it distinguishes itself from siblings like 'get_weather' by emphasizing the interactive dashboard aspect. However, it could be more explicit about how it differs from 'get_weather'.

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?

The description implies usage by mentioning location and unit controls, but it does not explicitly state when to use this tool versus alternatives like 'get_weather' or 'search_locations'. There is no guidance on prerequisites or scenarios where this tool is preferred. The context is clear but lacks explicit exclusions or alternative recommendations.

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.

  1. 3 tool updatesv0.1.0
    • First observedget_weather
    • First observedsearch_locations
    • First observedweather_dashboard

TDQS

B3.1/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a distinct purpose: location search, weather data retrieval, and an interactive dashboard. No overlap or ambiguity in their functions.

Naming Consistency4/5

Two tools follow the verb_noun pattern (search_locations, get_weather), but weather_dashboard breaks the pattern by leading with a noun. This is a minor deviation that doesn't cause confusion.

Tool Count4/5

Three tools is lean but appropriately scoped for a weather server. It covers the essential workflows without unnecessary bloat.

Completeness4/5

The core workflow of searching locations and getting weather is covered. Missing advanced features like alerts or historical data, but these are not critical for a basic weather service.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides real-time weather updates and city geocoding by integrating the Nominatim and Open-Meteo APIs. It enables users to retrieve current weather conditions for any location through natural language queries in MCP-compatible clients.
    19 npm
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides weather data including current conditions, forecasts, and summaries via Open-Meteo with no API key required, enabling natural language queries through an MCP interface.
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    MCP server for worldwide weather data, using high-resolution GeoSphere Austria data for the Alpine region and Open-Meteo elsewhere. Provides current conditions, hourly forecasts, and daily outlooks with compact emoji-markdown output.
    4
    76 PyPI
    1
    MIT