Skip to main content
Glama

☀️ 台灣紫外線指數助手 (mcp-tw-uv)

這是一個 Model Context Protocol (MCP) 伺服器,專門提供台灣各地的即時紫外線 (UV) 指數以及紫外線預報,並根據指數提供防曬建議。

資料來源:中央氣象署 (CWA) 開放資料平台

  • O-A0003-001 (紫外線指數日最大值預報)

  • O-A0005-001 (紫外線指數觀測資料)

✨ 功能

  • 即時觀測 (get_uv_observation):查詢全台測站目前的紫外線指數。

  • 未來預報 (get_uv_forecast):查詢今天與明天的紫外線最大值預報。

  • 防曬建議 (get_protection_advice):根據指數等級提供 WHO/CWA 標準的防護建議。

Related MCP server: mcp-cwa

🛠 安裝與設定

1. 取得 API Key

你需要一個中央氣象署的授權碼 (API Key)。

2. 安裝依賴

本專案需要 Python 3.10+。

# 建立虛擬環境
python3 -m venv .venv
source .venv/bin/activate

# 安裝套件
pip install -r requirements.txt

🔌 MCP Client 設定

Claude Desktop

請編輯 ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "tw-uv": {
      "command": "/Users/simonliuyuwei/clawd/projects/mcp-tw-uv/.venv/bin/python",
      "args": [
        "/Users/simonliuyuwei/clawd/projects/mcp-tw-uv/src/server.py"
      ],
      "env": {
        "CWA_API_KEY": "你的API_KEY"
      }
    }
  }
}

Dive (Moltbot)

請在 Dive 的設定介面中新增一個 MCP Server:

  • Name: tw-uv

  • Type: stdio

  • Command: /Users/simonliuyuwei/clawd/projects/mcp-tw-uv/.venv/bin/python

  • Arguments: /Users/simonliuyuwei/clawd/projects/mcp-tw-uv/src/server.py

  • Environment Variables:

    • CWA_API_KEY: 你的API_KEY (請填入實際的 Key)


📝 開發說明

  • src/server.py: MCP Server 入口點。

  • src/logic.py: 資料擷取與處理邏輯。

  • src/config.py: 設定檔 (API Key, URL)。

⚠️ 注意事項

  • 請確保 API Key 正確,否則伺服器無法擷取資料。

  • 紫外線觀測資料 (O-A0005-001) 並非所有測站都有提供。

F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

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/simonliu-moltbot/mcp-tw-uv'

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