Skip to main content
Glama
ctermiii

HeFeng Weather MCP Server

by ctermiii

Wttr.in MCP Server

一个基于 Model Context Protocol (MCP) 的天气服务器,通过 wttr.in 免费天气 API 提供天气查询和日期时间查询功能。

A Model Context Protocol server that provides weather forecast and datetime query features through the free wttr.in weather API.

功能特性 / Features

  • 获取实时天气数据 / Get real-time weather data

  • 获取三天天气预报 / Get 3-day weather forecast

  • 支持多种位置格式(城市名、邮政编码、经纬度坐标)/ Support multiple location formats (city name, postal code, coordinates)

  • 获取当前日期时间(支持自定义时区)/ Get current date and time (with timezone support)

  • 完整的中文天气描述 / Full Chinese weather description

Related MCP server: Hefeng QWeather MCP Server

工具说明 / API Tools

此 MCP 服务器提供以下两个工具:

get_weather_wttr

获取指定地点的天气预报数据。

参数 / Parameters:

  • location (必填): 需要查询的城市名称、邮政编码或经纬度坐标

    • 示例: 'beijing', '90210', '40.71,-74.00'

  • days (可选): 预报类型,默认为 '3d'

    • 'now' - 获取实时天气

    • '3d' - 获取三天天气预报

返回内容:

  • 实时天气:温度、体感温度、风速、风向、湿度、气压、紫外线指数

  • 三天预报:每日最高/最低温、平均温度、日出日落时间、降水概率等

get_datetime

获取当前日期和时间。

参数 / Parameters:

  • timezone (可选): 时区,默认为 'Asia/Shanghai'

    • 示例: 'America/New_York', 'Europe/London'

返回内容:

  • 指定时区的当前日期和时间

使用方法 / Usage with MCP Host

在 Claude Desktop 中使用 / With Claude Desktop

将以下配置添加到 claude_desktop_config.json:

{
  "mcpServers": {
    "wttr-mcp-server": {
      "command": "npx",
      "args": ["wttr-mcp-server@latest"]
    }
  }
}

本地开发 / Local Development

# 安装依赖
npm install

# 构建项目
npm run build

# 在配置文件中使用本地路径
{
  "mcpServers": {
    "wttr-mcp-server": {
      "command": "node",
      "args": ["/path/to/wttr-mcp-server/dist/index.js"]
    }
  }
}

技术栈 / Tech Stack

  • TypeScript

  • Model Context Protocol SDK

  • Zod (参数验证)

  • wttr.in API (免费天气服务)

许可证 / License

ISC

Available Tools

3 tools
get_datetimeB

获取当前的日期和时间。可以提供一个可选的时区参数,默认为 'Asia/Shanghai'。

ParametersJSON Schema
NameRequiredDescriptionDefault
timezoneNo可选的时区,例如 'America/New_York', 'Europe/London'。如果未提供,默认为 'Asia/Shanghai'。

TDQS

B3.4/5.0
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While it indicates the tool retrieves current datetime (implying read-only behavior), it doesn't disclose important traits like whether this is a real-time query, potential rate limits, authentication requirements, or what format the datetime is returned in. The description is minimal beyond stating the basic function.

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 just two sentences that directly state the tool's function and parameter behavior. Every word earns its place with zero wasted text, and the information is front-loaded with the core purpose stated first.

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 no annotations and no output schema, the description is inadequate for a tool that returns data. It doesn't explain what format the datetime is returned in (ISO string? timestamp? structured object?), whether it includes timezone information, or what happens on errors. For a data retrieval tool, this leaves significant gaps in understanding how to interpret results.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already fully documents the single optional timezone parameter. The description adds only that the parameter is optional and defaults to 'Asia/Shanghai', which is already stated in the schema. No additional semantic context is provided beyond what's in the structured 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 with a specific verb ('获取' meaning 'get') and resource ('当前的日期和时间' meaning 'current date and time'). It distinguishes itself from sibling tools like get_location_id and get_weather by focusing on datetime retrieval rather than location or weather data.

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 when current datetime is needed, but provides no explicit guidance on when to use this tool versus alternatives or any prerequisites. It mentions the optional timezone parameter but doesn't specify scenarios where different timezones would be appropriate.

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

get_location_idC

根据城市名称(拼音/英文)、经纬度、LocationID或Adcode获取其精确的位置ID和详细地理信息。

ParametersJSON Schema
NameRequiredDescriptionDefault
city_nameYes需要查询地区的名称(拼音如'beijing')、以英文逗号分隔的经度,纬度坐标(例如 116.41,39.92)、LocationID或Adcode(仅限中国城市)。

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. It describes what the tool does (retrieves location ID and geographic details) but lacks critical behavioral traits: it doesn't specify if this is a read-only operation, potential rate limits, authentication needs, error handling, or what '详细地理信息' (detailed geographic information) entails. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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, efficient sentence that clearly states the tool's function and input options. It's front-loaded with the core purpose and avoids unnecessary words. However, it could be slightly more structured by separating input types for better readability, but overall, it's concise and well-sized for its purpose.

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 tool's moderate complexity (single parameter, no output schema, no annotations), the description is partially complete. It covers the purpose and input semantics adequately but lacks details on behavioral aspects (e.g., read-only status, error cases) and output specifics. Without an output schema, the description should ideally hint at what '详细地理信息' includes, but it doesn't, leaving room for improvement in contextual coverage.

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

Parameters3/5

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

The description adds some meaning beyond the input schema by listing the types of inputs accepted (city name in pinyin/English, coordinates, LocationID, or Adcode), which aligns with the schema's description. However, with 100% schema description coverage, the schema already documents the parameter thoroughly ('需要查询地区的名称(拼音如'beijing')、以英文逗号分隔的经度,纬度坐标(例如 116.41,39.92)、LocationID或Adcode(仅限中国城市)'). The description doesn't provide additional syntax, format details, or constraints, so it meets the baseline for high schema coverage.

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: '获取其精确的位置ID和详细地理信息' (get precise location ID and detailed geographic information). It specifies the verb '获取' (get) and resource '位置ID和详细地理信息' (location ID and detailed geographic information), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like get_datetime or get_weather, which prevents a perfect score.

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. It lists input types (city name, coordinates, LocationID, or Adcode) but doesn't mention scenarios where this tool is preferred over siblings like get_weather for weather-related queries or get_datetime for time information. There's no explicit when-to-use or when-not-to-use context.

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

get_weatherC

获取指定地点的天气预报。请提供LocationID或经纬度坐标。

ParametersJSON Schema
NameRequiredDescriptionDefault
daysNo预报类型。now:实时天气, 24h/72h/168h:逐小时预报, 3d/7d/10d/15d/30d:逐天预报now
locationYes需要查询地区的LocationID或以英文逗号分隔的经度,纬度坐标(十进制,最多支持小数点后两位)。例如: 101010100 或 116.41,39.92。

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 full burden for behavioral disclosure. It states what the tool does (get weather forecast) but doesn't mention any behavioral traits like rate limits, authentication needs, error handling, or what happens with invalid inputs. For a tool with no annotation coverage, this is a significant gap in 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 appropriately concise with two sentences that directly address the tool's function and required inputs. It's front-loaded with the main purpose and wastes no words. However, it could be slightly more structured by separating usage guidance from parameter requirements.

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 no annotations and no output schema, the description is incomplete for a weather forecasting tool. It doesn't explain what the return values look like (e.g., temperature, conditions), error scenarios, or any limitations. For a tool with 2 parameters and complex forecasting options, more context is needed to be fully helpful to an AI agent.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents both parameters thoroughly. The description adds minimal value beyond the schema by mentioning LocationID or coordinates as input options, but doesn't provide additional semantic context. Baseline 3 is appropriate when the schema does the heavy lifting.

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: '获取指定地点的天气预报' (get weather forecast for a specified location). It specifies the verb (get) and resource (weather forecast), but doesn't differentiate from sibling tools like get_datetime or get_location_id, which are unrelated weather tools. The purpose is specific but lacks sibling distinction.

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. It mentions what parameters to provide (LocationID or coordinates) but doesn't indicate when this tool is appropriate compared to siblings or other weather-related tools. There's no context about use cases or exclusions.

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. 3 tool updatesv1.0.0
    • First observedget_datetime
    • First observedget_location_id
    • First observedget_weather

TDQS

B3.3/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: get_datetime retrieves time data, get_location_id finds location identifiers, and get_weather fetches weather forecasts. There is no overlap in functionality, and an agent can easily distinguish between them based on their specific objectives.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with 'get_' prefix: get_datetime, get_location_id, and get_weather. This uniformity makes the set predictable and easy to understand, adhering to a clear naming convention throughout.

Tool Count3/5

With only 3 tools, the set feels thin for a weather server, as it lacks operations like historical weather data, alerts, or air quality. While the core functions are present, the scope is minimal and may limit agent capabilities in more complex scenarios.

Completeness3/5

The tools cover basic weather retrieval (get_weather) and location lookup (get_location_id), but there are notable gaps such as missing update/delete operations, historical data access, or weather alerts. The surface is functional for simple queries but incomplete for comprehensive weather domain coverage.

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

  • A
    license
    Not graded
    quality
    B
    maintenance
    Provides comprehensive weather data including forecasts, air quality, weather alerts, historical data, and astronomical information through the Hefeng Weather API. Supports real-time weather, multi-day forecasts, hourly predictions, and specialized data like sunrise/sunset times and precipitation forecasts.
    4
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables querying weather forecasts (1-7 days) and meteorological warnings for Chinese cities using the QWeather API. Supports detailed weather data including temperature, humidity, wind, precipitation, UV index, and real-time weather alerts.
    1
    -

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

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