Skip to main content
Glama

Taiwan Central Weather Administration MCP Server

This project provides a Model Context Protocol (MCP) server that interfaces with the Taiwan Central Weather Administration (CWA) API, allowing you to easily access weather data for Taiwan.

中文版

CWA API Resources

To use this project, you need to obtain an API key from the Central Weather Administration:

Related MCP server: Caiyun Weather MCP Server

Features

  • Get 3-day weather forecast data for Taiwan counties and cities

  • Get 1-week weather forecast data for Taiwan counties and cities

  • Get historical rainfall data for the past three days

  • Automatic data cleaning and format conversion

  • Simplified API output with only essential information

System Requirements

  • Python 3.10+

  • MCP CLI 1.6.0+

  • uv package manager

Installation

  1. Ensure you have Python 3.10 or higher installed

  2. Install dependencies using uv:

# Install project dependencies using uv
uv pip install -e .

Usage

Starting the Server

Windows Users

# Execute in Command Prompt or PowerShell
uv --directory your_project_path run src/server.py your_API_key

Mac and Linux Users

# Execute in Terminal
uv --directory your_project_path run src/server.py your_API_key

Available MCP Tools

This server provides the following three main tools:

1. get_3_days_weather

Get 3-day weather forecast data for a specified county or city.

Parameters:

  • location_name (string): County or city name, must be a valid Taiwan county or city name

Valid county/city names include: Yilan County, Hualien County, Taitung County, Penghu County, Kinmen County, Lienchiang County, Taipei City, New Taipei City, Taoyuan City, Taichung City, Tainan City, Kaohsiung City, Keelung City, Hsinchu County, Hsinchu City, Miaoli County, Changhua County, Nantou County, Yunlin County, Chiayi County, Chiayi City, Pingtung County

2. get_1_week_weather

Get 1-week weather forecast data for a specified county or city.

Parameters:

  • location_name (string): County or city name, must be a valid Taiwan county or city name

3. get_historical_rainfall

Get rainfall data for the past three days.

No parameters required.

Data Format

Weather Forecast Data Format

[
  {
    "ElementName": "Temperature",
    "Time": [
      ["2025-04-11T00:00", "21"],
      ["2025-04-11T01:00", "21"],
      ...
    ]
  },
  {
    "ElementName": "Relative Humidity",
    "Time": [
      ["2025-04-11T00:00", "90"],
      ["2025-04-11T01:00", "89"],
      ...
    ]
  },
  ...
]

Rainfall Data Format

{
  "rain_labels": ["Now", "Past10Min", "Past1hr", "Past3hr", "Past6Hr", "Past12hr", "Past24hr", "Past2days", "Past3days"],
  "stations": [
    {
      "name": "Station Name",
      "time": "Observation Time",
      "loc": "County,Town",
      "geo": [latitude, longitude],
      "rain": [current, past10min, past1hr, past3hr, past6hr, past12hr, past24hr, past2days, past3days]
    },
    ...
  ]
}

Supported Weather Elements

3-Day Forecast

  • Temperature

  • Relative Humidity

  • Apparent Temperature

  • Comfort Index

  • Wind Direction

  • Wind Speed

  • 3-hour Precipitation Probability

  • Weather Phenomenon

  • Comprehensive Weather Description

1-Week Forecast

  • Average Temperature

  • Maximum Temperature

  • Minimum Temperature

  • Average Relative Humidity

  • Maximum Apparent Temperature

  • Minimum Apparent Temperature

  • Maximum Comfort Index

  • Minimum Comfort Index

  • Wind Speed

  • Wind Direction

  • 12-hour Precipitation Probability

  • UV Index

  • Weather Phenomenon

  • Comprehensive Weather Description

API Data Sources

This project uses the following open data APIs from the Taiwan Central Weather Administration:

  • 3-Day Forecast: Taiwan Township Weather Forecast - 3-Day Forecast (3-hour intervals)

  • 1-Week Forecast: Taiwan Township Weather Forecast - 1-Week Weather Forecast

  • Rainfall Data: Automatic Rainfall Station - Rainfall Observation Data

Available Tools

3 tools
get_1_week_weatherA

Get 1-week weather forecast data for the specified county/city

Args: location_name: County/city name, must be a valid Taiwan county/city name Valid county/city names: 宜蘭縣, 花蓮縣, 臺東縣, 澎湖縣, 金門縣, 連江縣, 臺北市, 新北市, 桃園市, 臺中市, 臺南市, 高雄市, 基隆市, 新竹縣, 新竹市, 苗栗縣, 彰化縣, 南投縣, 雲林縣, 嘉義縣, 嘉義市, 屏東縣

Returns: list: Cleaned weather data containing various weather elements and their time series

ParametersJSON Schema
NameRequiredDescriptionDefault
location_nameYes

TDQS

A3.7/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. It only states basic functionality without disclosing data source, update frequency, accuracy, or any side effects. The absence of any behavioral context beyond 'get' is insufficient.

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 structured with Args and Returns sections, is mostly concise, and front-loaded. The list of valid names is necessary for usability but slightly lengthy; still efficient overall.

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?

The description explains the parameter and return type, but the return structure is vague ('various weather elements and their time series'). Given no output schema, more detail on the return format would improve completeness. Adequate for a simple tool.

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?

Schema description coverage is 0%, but the tool description exhaustively lists all valid Taiwan county/city names for the 'location_name' parameter and explains its meaning. This fully compensates for the schema gap.

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 gets a 1-week weather forecast for a specified location. It distinguishes from sibling tools (get_3_days_weather and get_historical_rainfall) by specifying the time range and data type.

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 the tool is for obtaining a 1-week forecast but does not provide explicit guidance on when to use it vs. alternatives or any prerequisites. Usage is inferred from the tool name and sibling context.

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

get_3_days_weatherA

Get 3-day weather forecast data for the specified county/city

Args: location_name: County/city name, must be a valid Taiwan county/city name Valid county/city names: 宜蘭縣, 花蓮縣, 臺東縣, 澎湖縣, 金門縣, 連江縣, 臺北市, 新北市, 桃園市, 臺中市, 臺南市, 高雄市, 基隆市, 新竹縣, 新竹市, 苗栗縣, 彰化縣, 南投縣, 雲林縣, 嘉義縣, 嘉義市, 屏東縣

Returns: list: Cleaned weather data containing various weather elements and their time series

ParametersJSON Schema
NameRequiredDescriptionDefault
location_nameYes

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the behavioral burden. It states that the tool returns 'cleaned weather data containing various weather elements and their time series', but does not disclose any additional behavioral traits such as authentication, rate limits, or side effects. The verb 'get' implies a read operation, but more detail would improve 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 structured with a clear first sentence stating the purpose, followed by an Args section and Returns section. It is mostly concise, though the list of valid county/city names adds length but provides necessary detail. Front-loading is good.

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 single parameter, no annotations, no output schema, and the presence of sibling tools (get_1_week_weather, get_historical_rainfall), the description adequately covers the parameter and basic purpose. However, it does not explain the return format in detail or provide guidance on when to use this versus siblings, leaving some gaps.

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?

With schema description coverage at 0%, the description adds significant meaning to the single parameter. It explicitly states 'must be a valid Taiwan county/city name' and provides a complete list of valid values, which is beyond what the schema provides (just a string type).

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 'Get 3-day weather forecast data for the specified county/city', providing a specific verb and resource. The scope is further refined by listing valid Taiwan county/city names. The tool name and description distinguish it from siblings like 'get_1_week_weather' by specifying the 3-day forecast period.

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 includes the required input (location_name) and lists valid values, but does not explicitly state when to use this tool over siblings or provide any context on alternatives. Usage is implied but not explicitly guided.

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

get_historical_rainfallB

Get rainfall data for the past three days

Returns: dict: Cleaned rainfall data containing rainfall labels and information for various stations

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description should disclose behavior. It mentions returning cleaned data but omits details like read-only nature, error handling, or data freshness. The description is insufficient for full behavioral understanding.

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?

Two sentences with no redundant information. The structure is front-loaded with the action. Could benefit from a brief note on output structure, but remains efficient.

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 no parameters and no output schema, the description provides the essential purpose and a high-level return summary. However, it lacks specifics like station identifiers, date range constraints, or any caveats about data availability.

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?

Tool has no parameters, so baseline is 4. Description adds minimal value but confirms the simple invocation without inputs, which is sufficient for parameterless tools.

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?

Clearly states it retrieves rainfall data for the past three days, distinguishing from sibling tools that provide general weather forecasts or longer periods.

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?

No explicit guidance on when to use this tool versus siblings or alternatives. Usage is implied by the specific focus on historical rainfall, but lacks when-not or exclusion criteria.

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 updatesv0.1.0
    • First observedget_1_week_weather
    • First observedget_3_days_weather
    • First observedget_historical_rainfall

TDQS

A3.7/5.0
Disambiguation5/5

Each tool serves a distinct purpose: one for 1-week forecast, one for 3-day forecast, and one for historical rainfall. No overlap or ambiguity.

Naming Consistency5/5

All tools follow a consistent verb_get + time_period + resource pattern in snake_case, making it predictable.

Tool Count5/5

Three tools cover the essential weather data needs without being excessive or insufficient.

Completeness4/5

Covers forecasts and historical rainfall well, but missing current conditions or severe weather alerts. Minor gap.

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
    D
    maintenance
    Provides read-only access to Taiwan's Central Weather Administration (CWA) Open Data API, offering 36 tools across 7 categories including weather forecasts, observations, earthquakes, and astronomy.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides weather reports for Zhongshan District, Taipei, Taiwan and other Taiwanese cities using the Open-Meteo API, enabling AI assistants to answer weather queries in natural language.
    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/lwsinclair/roc-cwa-mcp'

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