# Mcp Taiwan Flood

> MCP Server: Taiwan Flood & Water Resources Data (淹水/水利資料)

- **Type:** MCP server
- **Install:** `agentstack add mcp-mackinhung-mcp-taiwan-flood`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [MackinHung](https://agentstack.voostack.com/s/mackinhung)
- **Installs:** 0
- **Category:** [Cloud & Infrastructure](https://agentstack.voostack.com/c/cloud-infrastructure)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [MackinHung](https://github.com/MackinHung)
- **Source:** https://github.com/MackinHung/mcp-taiwan-flood

## Install

```sh
agentstack add mcp-mackinhung-mcp-taiwan-flood
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# MCP Taiwan Flood

> 台灣水情與防洪資料 MCP Server - 提供淹水潛勢、河川水位、雨量、水庫等即時資料

## 工具清單

| 工具名稱 | 說明 |
|----------|------|
| `get_flood_potential` | 查詢台灣各地區淹水潛勢資料，可依縣市或鄉鎮篩選 |
| `get_river_water_level` | 取得河川水位觀測資料，含警戒狀態 |
| `get_rainfall_data` | 查詢即時雨量觀測資料，可依縣市或測站篩選 |
| `get_flood_warnings` | 取得即時淹水警報，來自 Civil IoT 感測器 |
| `get_reservoir_status` | 取得全台水庫即時水情，含蓄水量與進出水量 |

## 安全徽章

- **資料敏感度**: public（公開資料）
- **權限**: readonly（僅讀取）
- **開源**: 是
- **外部資料源**:
  - https://opendata.wra.gov.tw
  - https://sta.ci.taiwan.gov.tw
  - https://sta.colife.org.tw

## 安裝

```bash
npm install
```

## 使用方式

### Cloudflare Workers 部署

```bash
npx wrangler deploy
```

部署後會得到一個 Worker URL，可透過 JSON-RPC 2.0 協定呼叫。

### MCP 協定流程

1. **initialize** - 初始化連線，取得 server 資訊
2. **tools/list** - 列出所有可用工具
3. **tools/call** - 呼叫特定工具

### 範例請求

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_flood_potential",
    "arguments": {
      "county": "臺北市",
      "town": "信義區"
    }
  }
}
```

### Claude Desktop 整合

在 `claude_desktop_config.json` 中新增：

```json
{
  "mcpServers": {
    "taiwan-flood": {
      "url": "https://your-worker.workers.dev"
    }
  }
}
```

## 技術棧

- **框架**: Hono + Cloudflare Workers
- **語言**: TypeScript (strict mode)
- **測試**: Vitest (71 tests, 100% coverage)
- **協定**: MCP (Model Context Protocol) 2024-11-05

## 開發

```bash
# 開發模式
npm run dev

# 執行測試
npm test

# 測試覆蓋率
npm run test:coverage

# TypeScript 檢查
npx tsc --noEmit
```

## 資料來源

- 水利署開放資料平台
- Civil IoT 台灣民生公共物聯網
- 農田水利署資料服務

## License

MIT

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [MackinHung](https://github.com/MackinHung)
- **Source:** [MackinHung/mcp-taiwan-flood](https://github.com/MackinHung/mcp-taiwan-flood)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-mackinhung-mcp-taiwan-flood
- Seller: https://agentstack.voostack.com/s/mackinhung
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
