Taiwan Weather (CWA) MCP server

Provides real-time weather data and forecasts for Taiwan through the Central Weather Administration API with Node.js and Docker deployment options.
Back to servers
Provider
Lin CW
Release date
Apr 05, 2025
Language
TypeScript
Stats
1 star

The CWA MCP Server is a lightweight Node.js implementation that connects Claude Desktop to Taiwan's Central Weather Administration (CWA) API for accessing weather data. It allows Claude to retrieve and use real-time weather forecasts for all cities and counties in Taiwan.

Installation

Prerequisites

  • Node.js 18 or higher
  • A CWA API key
  • Claude Desktop application

Getting a CWA API Key

  1. Visit the CWA Open Data Platform
  2. Sign in or register if you don't have an account
  3. Click the "Get Authorization Code" button
  4. Copy your API key

Standard Installation

  1. Make the installation script executable:

    chmod +x install.sh
    
  2. Run the installation script:

    ./install.sh
    
  3. Edit the Claude Desktop configuration file located at ~/.config/claude/claude_desktop_config.json:

    {
      "mcpServers": {
        "cwa": {
          "command": "node",
          "args": [
            "/path/to/cwa-server.js"
          ],
          "env": {
            "CWA_API_KEY": "YOUR-CWA-API-KEY"
          }
        }
      }
    }
    

    Replace YOUR-CWA-API-KEY with your actual CWA API key.

  4. Restart Claude Desktop

Docker Installation

  1. Create a docker-compose.yml file:

    version: '3'
    services:
      cwa-mcp-server:
        container_name: cwa-mcp-server
        image: node:18
        volumes:
          - ./:/app
        working_dir: /app
        command: node cwa-server.js
        environment:
          - CWA_API_KEY=YOUR-CWA-API-KEY
        restart: unless-stopped
    

    Replace YOUR-CWA-API-KEY with your actual CWA API key.

  2. Update your Claude Desktop configuration:

    {
      "mcpServers": {
        "cwa": {
          "command": "docker",
          "args": [
            "exec",
            "-i",
            "cwa-mcp-server",
            "node",
            "cwa-server.js"
          ]
        }
      }
    }
    
  3. Start the Docker container:

    docker-compose up -d
    
  4. Restart Claude Desktop

Usage

Querying Weather Forecasts

Once installed and configured, you can start asking Claude about weather forecasts in Taiwan. The server provides the get_weather_forecast tool that retrieves weather forecasts for the next 36 hours based on the city or county name.

Example query in Claude:

What's the current weather in Taipei?

Supported Regions

The following cities and counties are supported:

  • 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

Troubleshooting

If you encounter issues with the MCP server:

  • Verify that Node.js 18 or higher is installed
  • Check that your CWA API key is valid and correctly configured
  • Run ./test.sh to test the server and confirm it's working properly
  • Ensure Claude Desktop is properly configured and restarted after making changes

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later