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.
Make the installation script executable:
chmod +x install.sh
Run the installation script:
./install.sh
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.
Restart Claude Desktop
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.
Update your Claude Desktop configuration:
{
"mcpServers": {
"cwa": {
"command": "docker",
"args": [
"exec",
"-i",
"cwa-mcp-server",
"node",
"cwa-server.js"
]
}
}
}
Start the Docker container:
docker-compose up -d
Restart Claude Desktop
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?
The following cities and counties are supported:
If you encounter issues with the MCP server:
./test.sh
to test the server and confirm it's working properlyThere 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.
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"
]
}
}
}
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.
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.