Open-Meteo MCP Server
Open-Meteo MCP Server
ClaudeのようなAIアシスタントに、実際の気象データ(現在の状況と予報)を調べる機能を提供する、小さなMCP(Model Context Protocol)サーバーです。無料のOpen-Meteo APIをラップしています。APIキーは不要です。
エンドツーエンドでMCPサーバーの仕組みを理解するための学習プロジェクトとして作られました。ツールの定義、ローカルでの実行、実際のAIクライアントへの接続までを扱います。
できること
MCP互換クライアント(Claudeなど)に接続すると、次の3つのツールを公開します:
ツール | 機能 |
| 場所の名前("London")を座標に変換する |
| 座標に対する現在の気温、風、降水量など |
| 座標に対する最大16日間の予報(日次/時間別、またはその両方) |
つまり、ユーザーがアシスタントに「明日のリスボンの天気は?」と尋ねると、アシスタントはこれらのツールを自ら呼び出して調べ、答えることができます。天気データがあらかじめプログラムされているわけではなく、リアルタイムで取得します。
Related MCP server: Weather MCP Server
仕組み
src/server.ts— 3つのツールと、各ツールがOpen-Meteo APIを呼び出す方法を定義します。サーバーの実際の「頭脳」にあたる部分です。src/index.ts— stdio(標準入出力)でサーバーを実行します。これは、MCP Inspectorのようなローカル開発ツールや、サーバーをサブプロセスとして起動するデスクトップアプリで使用されるトランスポートです。src/http.ts— 同じサーバーをStreamable HTTPで実行します。ネットワーク経由で到達できるようになります(例:どこかにホストする、ブラウザベースのクライアントからアクセスする)。ローカルに何もインストールせずにデモができるのはこのためです。
両方のエントリポイントはserver.tsの同じツール定義を共有するため、実際のロジックは一箇所にのみ存在します。
実行方法
npm install
npm run buildローカル/stdioモード(サーバーをサブプロセスとして起動するツール向け):
npm startHTTPモード(リモートクライアントを接続する場合、例:転送されたCodespacesポートやホスティングプロバイダ経由):
node build/http.jsこれにより、ポート3000(PORTで設定可能)でプレーンなHTTPサーバーが起動し、POST /mcpに単一のMCPエンドポイント、さらにGET /healthのヘルスチェックが用意されます。
クライアントなしで試す
ブラウザ不要でターミナルから直接試すには、MCP InspectorのCLIモードが最速です:
# See what tools are available
npx @modelcontextprotocol/inspector --cli node build/index.js --method tools/list
# Actually call one
npx @modelcontextprotocol/inspector --cli node build/index.js \
--method tools/call --tool-name geocode_location --tool-arg name=LondonAIアシスタントに接続する
Claude Desktop / Claude Code: クライアントの設定で、
build/index.jsをstdio MCPサーバーとして指定します。Claude.aiカスタムコネクタ: 実行中のHTTPインスタンスの
/mcpURLを指定します(カスタムコネクタを利用できるプランが必要です)。Anthropic API直接:
/v1/messagesリクエストのmcp_serversパラメータに/mcpURLを渡します。これにより、事前に構築されたMCPクライアントを必要とせず、任意のカスタムアプリやページでツールを使用できます。
拡張のためのメモ
Open-Meteoには、このプロジェクトが使用しているもの以外にも、多くの変数とエンドポイントがあります(大気質、海洋予報、履歴/アーカイブデータ、アンサンブルなど)。さらに追加するには、src/server.ts内の既存ツールのパターンに従って、独自の入力スキーマとOpen-Meteoリクエストを持つ新しいserver.tool(...)ブロックを登録してください。
データ © Open-Meteo.com、CC BY 4.0。
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to fetch current weather conditions and forecasts for any city using the Open-Meteo API. Provides temperature, precipitation, and hourly forecast data through natural language queries.
- AlicenseNot gradedqualityFmaintenanceEnables AI assistants to retrieve current weather, forecasts, and summaries for any global location using the Open-Meteo API, with no API key required.21Creative Commons Zero v1.0 Universal
- FlicenseNot gradedqualityDmaintenanceEnables AI agents like GitHub Copilot to retrieve real-time weather data for any city using the Open-Meteo API, no API key required.9
- AlicenseNot gradedqualityCmaintenanceProvides live weather data (current conditions, forecasts) and city geocoding through Open-Meteo API, enabling AI assistants to answer weather queries without an API key.MIT
Related MCP Connectors
Real-time weather conditions and multi-day forecasts via Open-Meteo — free, no API key required
Global weather via Open-Meteo: forecast, ERA5 archive, marine, air quality, geocoding, elevation.
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/clarehancock/open-meteo-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server