
Open-Meteo Weather
io.github.myAI-2025由 GitHub 帳號 myAI-2025 發布v0.1.2更新於 Oct 24, 2026
Current weather and hourly forecasts for any place name, via the free Open-Meteo API. No API key.
概覽
讓助理透過免費的 Open-Meteo API 查詢任意地名的目前天氣與逐小時預報。
- 可以做什麼
- 這是一個精簡的 stdio MCP 伺服器,提供兩個工具:get_weather 依地名回傳目前天氣狀況、華氏溫度與風速(英里/小時);get_hourly_forecast 回傳 1 至 48 小時的逐小時溫度、降雨機率與天氣狀況,時間戳為當地時區。它會先對地名做地理編碼,再從 Open-Meteo API 取得資料並格式化為文字。無法辨識的地名會以標記 isError 的結果回傳,而非通訊協定錯誤。
- 適用情境
- 適合讓助理回答日常天氣問題與短期預報,不需要註冊任何天氣服務。它面向簡單的對話式查詢,不涉及歷史資料、天氣警報或專業氣象分析。
- 執行需求
- 以本機 Python stdio 程序執行,可透過 uvx(uv)或 pipx 啟動;需要 Python 3.8+,沒有第三方執行階段相依套件。需要網路連線以下載套件並存取 Open-Meteo 的地理編碼與預報端點。不需要 API 金鑰或帳號。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Open-Meteo Weather,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
weather-mcp
A minimal Model Context Protocol server in a
single file. It speaks JSON-RPC 2.0 over stdio and exposes two tools,
get_weather and get_hourly_forecast, backed by the free
Open-Meteo API.
No third-party runtime dependencies — standard library only. Requires Python 3.8+.
Quick start: Claude Code
1. Prepare your terminal
Where do I paste each instruction?
You will use two places:
- A regular Terminal tab is for setup commands. On a Mac, open the Terminal app and press Command + T to open a new tab. Paste one command, then press Return.
- The Claude Code conversation is where you ask questions, such as “What is the weather in Tokyo?”
If Claude is already chatting with you, open a new Terminal tab for the setup commands. Keep your Claude conversation in its original tab so you can return to it afterward.
Open Terminal on macOS/Linux or PowerShell on Windows. Paste the command
blocks in this guide there. Weather questions and commands beginning with /,
such as /login and /mcp, belong inside a Claude Code conversation.
If Claude Code is already open in your terminal, use a new terminal tab for setup.
- Install Claude Code using its official setup guide.
Run
claude --versionin your terminal to check that it is available. Then runclaudeand follow the sign-in prompts; if needed, type/logininside Claude Code. Keep a separate terminal tab open for the next steps. - Install uv using the instructions for your operating system.
uv supplies
uvx, which downloads and runs the weather package for you. Reopen your terminal after installation and runuvx --version. If either version check says “command not found,” finish that installation before continuing.
You need an internet connection to download the package and fetch weather. No weather API key is needed.
2. Add the weather server
Run this in your terminal:
weather is the name you will see in Claude Code. myai-weather-mcp is the
published package it runs. User scope makes this setup available across your
Claude Code projects. No repository clone or separate package installation is needed.
See the Claude Code MCP reference for other setup options.
The ==0.1.2 pin selects the release used in this guide, so a later release does
not silently change your setup. It is intentional; see Updating your version
when you want to upgrade.
If weather already exists, inspect it with claude mcp get weather.
If it already uses the command above, continue to the next step. To replace an
older user-scope setup, follow the replacement steps under Updating your version.
3. Check the connection and ask for weather
Run in your terminal:
Look for Connected. If you see a different status or no server is found, use
Connection troubleshooting below.
Start a new Claude Code session by running claude, or type /mcp inside an
existing session and reconnect weather. At Claude Code's conversation prompt, paste:
- “Use the weather tool to tell me the current weather in Tokyo.”
- “Use the hourly forecast tool to show the next six hours in Tokyo.”
Expect current conditions, temperature in °F, wind in mph, and six forecast rows with local times and rain probabilities. Values change with the weather.
Updating your version
Check the release notes and
choose a published version. To replace the user-scope registration, first inspect
claude mcp get weather and save any custom settings you want to keep. Then run
the following commands, replacing 0.1.2 with your chosen version in the add command:
Removing the registration removes that client configuration, not your repository or source files. If your existing registration is in local or project scope, inspect that configuration before changing it; a same-name entry there may override the user-scope entry.
Reconnect through /mcp or start a new Claude Code session after replacing it.
For Claude Desktop, change the version in its configuration's args and restart.
Refreshing uv's cache does not change a saved version pin. If a version that is already published cannot be found, run the following with the version you selected:
If the terminal stays blank without an error, the server is waiting for a client; press Control+C, then reconnect your client. See uv's tool guide for more about running tools and selecting versions.
Connection troubleshooting
- No server named
weather: run the add command in step 2, then check again. - Failed to connect or another non-connected status: inspect the command and
arguments printed by
claude mcp get weather. Tryuvx myai-weather-mcp==0.1.2directly in your terminal and read any error. If it starts without an error and waits, press Control+C and reconnect through/mcp. A successful start checks that the package can launch; ask for weather to check the network too. uvxnot found: install uv and reopen your terminal. If the terminal finds it but your client does not, find its full path withcommand -v uvx(macOS/Linux) orwhere.exe uvx(Windows PowerShell). Use that path in place ofuvxin the registration or configuration; quote paths containing spaces.- Package download fails: check your internet connection and the exact package
name and version. If the selected release exists but uv cannot find it, use the
cache-refresh command above. For
UnknownIssuer, see the certificate-error steps below. - Connected, but tools are missing: start a new Claude Code session or use
/mcpto check whetherweatheris enabled and reconnect it. - A blank terminal after starting the server directly: it is waiting for an MCP client. This is expected; press Control+C and use the client setup above.
- Claude Code says “Not logged in”: open
claudeand run/login. - Connected, but weather requests fail: check the returned error and your internet connection. The server must reach Open-Meteo to retrieve weather.
- Location not found: try a well-known city name. An unknown place should return a readable error rather than a forecast.
PyPI certificate error (UnknownIssuer)
If the terminal shows invalid peer certificate: UnknownIssuer while uvx fetches
from pypi.org, the package launcher cannot verify that HTTPS connection. This
happens before the weather server starts and may appear in your client as
Connection closed during initialization. Other connection errors can have
different causes.
Try using the certificates already trusted by your operating system:
This can help on a managed network whose certificate is in the system trust store. It keeps certificate verification enabled. If the server starts and waits without an error, press Control+C. To use the same option in Claude Code, follow the registration replacement steps, using this add command:
For Claude Desktop's uvx setup, change args to
["--system-certs", "myai-weather-mcp==0.1.2"]. Reconnect or restart your client,
then ask for weather to check the full connection. Use your selected package
version if it differs from this guide's pin.
If uvx does not recognize the flag, update uv using its installation method.
If certificate verification still fails, consult your network administrator and
uv's certificate documentation.
Keep verification enabled; do not use --allow-insecure-host to bypass the error.
If your existing setup works, no configuration change is needed.
Help us test
Try the two questions above and a made-up location such as ZzzxqqNowhere.
If anything is confusing, open an issue
with your operating system, client, package version, steps, and the error message.
Remove passwords, authentication codes, and other private information before sharing.
The tools
Usage
The responses below are illustrative snapshots, not current weather.
Once the server is wired into a client, just ask in natural language — the model picks the tool and fills in the arguments:
You: What's the weather in Seattle right now?
Claude: (calls
get_weatherwithlocation: "Seattle") Current weather in Seattle, United States: overcast, 54.2 °F, wind 1.1 mph.
You: Will it rain in Tokyo over the next 6 hours?
Claude: (calls
get_hourly_forecastwithlocation: "Tokyo",hours: 6) Yes — drizzle every hour, precipitation probability climbing from 76 % to 89 %.
Try it without a client
With uv installed, paste this whole block into a macOS/Linux terminal using bash or zsh. It downloads the pinned package if needed and works from any folder; no clone or separate package installation is required. This shell example is not PowerShell syntax.
It sends a small JSON-RPC exchange directly to the server:
The tools/call responses look like:
An unknown place name comes back as a normal result with "isError": true:
Install
The quick start already runs the published package through uvx. The options below are alternatives; you do not need to complete all of them.
Use myai-weather-mcp as the package and launch command throughout this guide.
openmeteo-mcp is an older compatibility alias for the same server.
Run the published release with uv (recommended):
Install a persistent command with pipx:
Alternatively, install with python3 -m pip install myai-weather-mcp==0.1.2
inside an activated Python virtual environment.
Run the source from GitHub with uv:
This uses the repository's default branch, which may differ from the published release.
Run a local clone (requires Git and Python 3.8+):
Run the second command from the same folder where you ran git clone, or use
the script's full path. On Windows, use your Python launcher if it is named python
instead of python3.
All of these launch the server and wait for MCP input. A blank terminal is normal; press Control+C to stop it before configuring a client.
Configure a client
Claude Code
Use the quick start for the recommended uvx setup.
If you already registered weather there, no second registration is needed.
If you chose the persistent pipx installation instead, the alternative is:
For a local clone, replace the example path below with the script's actual full path:
When replacing an existing registration, inspect it first and follow
Updating your version. Restart Claude Code or reconnect
via /mcp, then ask it to use get_weather or get_hourly_forecast.
Claude Desktop
Install uv first, as described in the quick start. Edit claude_desktop_config.json
(macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\).
Add the weather entry under mcpServers, preserving any other servers already there:
If Desktop cannot find uvx, replace "uvx" with its full path from command -v uvx
(macOS) or where.exe uvx (Windows). In JSON, Windows backslashes must be doubled,
for example "C:\\Users\\YourName\\.local\\bin\\uvx.exe"; use your actual path.
If you installed the package with pipx instead, use "command": "myai-weather-mcp"
(or its full path) and omit args.
Quit and reopen Claude Desktop, then ask it to use the weather tools. The Desktop configuration is an alternative setup; the end-to-end client checks for this guide were performed in Claude Code.
Any other MCP client
Configure a stdio server with command uvx and argument
myai-weather-mcp==0.1.2. With a persistent installation, the command can instead
be myai-weather-mcp. The client launches the process and exchanges JSON-RPC 2.0
over its stdin/stdout. See How it works below.
Development
The suite monkeypatches the network functions, so it runs offline.
How it works
weather_mcp/server.py reads newline-delimited JSON-RPC messages from stdin
and writes responses to stdout:
Upstream calls: Open-Meteo geocoding (geocoding-api.open-meteo.com) then the
forecast endpoint (api.open-meteo.com) with current=temperature_2m,wind_speed_10m,weather_code.
Acknowledgments
Created and maintained by Mona (myAI-2025), who directed the project and tested it in Claude Code.
Developed with AI assistance from Claude and Claude Code (Anthropic) and ChatGPT and Codex (OpenAI) across planning, implementation, debugging, testing, documentation, packaging, and publication.
Weather data is provided by Open-Meteo. These acknowledgments credit the tools and services used; they do not imply sponsorship or endorsement by their providers.
License
MIT — see LICENSE.
來源:README.md,提交 252aab0
工具
0版本歷史
1- v0.1.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分