mcp-weather

by erhwenkuo

197 downloads
Not rated
GitHub

About

一個給 AI Agent 使用的 MCP Server 範例,用來取得美國各州的天氣預報與警示資訊

Details

Author
erhwenkuo
Downloads
197
Categories
Media

- Provides US weather forecasts and alerts
- SSE-based for remote, decoupled access
- Two tools: get_alerts and get_forecast
- Supports uv and Docker deployment
- Configurable host and port via command line

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name mcp-weather
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository, install dependencies with uv sync, then start the server with uv run server or via Docker. Connect using an MCP client (e.g., MCP Inspector) via SSE URL http://<host>:<port>/sse. The server exposes two tools: get_alerts and get_forecast. Host and port can be configured with command-line arguments.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp-weather": {
            "mcp-weather-erhwenkuo": {
                "command": "uv",
                "args": [
                    "run",
                    "server"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-weather-erhwenkuo": {
        "command": "uv",
        "args": [
            "run",
            "server"
        ]
    }
}

mcp-weather

一個給 AI Agent 使用的 MCP Server 範例,用來取得美國各州的天氣預報與警示資訊。

- 原始專案: mcp-sse

目的

這個 mcp server 示範了基於 SSE 的 MCP 伺服器和使用其中工具的獨立 MCP 用戶端的工作模式。

運行環境

本專案使用 uv 來管理相關的依賴與 python 的運行環境, 如果尚未安裝 uv 可依照官網的安裝指示來安裝。

接下來的相關命令都是在 Ubuntu 24.04 的環境下執行的, 其它作業系統的操作請自行修改:

$ curl -LsSf https://astral.sh/uv/install.sh | sh

下載源碼:

$ git clone https://github.com/erhwenkuo/mcp-weather.git

$ cd mcp-weather

$ uv sync

運行服務

使用 uv 來啟動:

$ uv run server

INFO: Started server process [15784]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)

使用 Docker 來啟動

首先構建 Docker image:

$ docker build -t mcp-weather .

啟動 mcp-weather:

$ docker run -d -p 5488:5488 mcp-weather

驗證結果

首先安裝 nodejs:

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.