Skip to main content
Glama
clarehancock

Open-Meteo MCP Server

by clarehancock

Open-Meteo MCP Server

ClaudeのようなAIアシスタントに、実際の気象データ(現在の状況と予報)を調べる機能を提供する、小さなMCP(Model Context Protocol)サーバーです。無料のOpen-Meteo APIをラップしています。APIキーは不要です。

エンドツーエンドでMCPサーバーの仕組みを理解するための学習プロジェクトとして作られました。ツールの定義、ローカルでの実行、実際のAIクライアントへの接続までを扱います。

できること

MCP互換クライアント(Claudeなど)に接続すると、次の3つのツールを公開します:

ツール

機能

geocode_location

場所の名前("London")を座標に変換する

get_current_weather

座標に対する現在の気温、風、降水量など

get_weather_forecast

座標に対する最大16日間の予報(日次/時間別、またはその両方)

つまり、ユーザーがアシスタントに「明日のリスボンの天気は?」と尋ねると、アシスタントはこれらのツールを自ら呼び出して調べ、答えることができます。天気データがあらかじめプログラムされているわけではなく、リアルタイムで取得します。

Related MCP server: Weather MCP Server

仕組み

  • src/server.ts — 3つのツールと、各ツールがOpen-Meteo APIを呼び出す方法を定義します。サーバーの実際の「頭脳」にあたる部分です。

  • src/index.tsstdio(標準入出力)でサーバーを実行します。これは、MCP Inspectorのようなローカル開発ツールや、サーバーをサブプロセスとして起動するデスクトップアプリで使用されるトランスポートです。

  • src/http.ts同じサーバーをStreamable HTTPで実行します。ネットワーク経由で到達できるようになります(例:どこかにホストする、ブラウザベースのクライアントからアクセスする)。ローカルに何もインストールせずにデモができるのはこのためです。

両方のエントリポイントはserver.tsの同じツール定義を共有するため、実際のロジックは一箇所にのみ存在します。

実行方法

npm install
npm run build

ローカル/stdioモード(サーバーをサブプロセスとして起動するツール向け):

npm start

HTTPモード(リモートクライアントを接続する場合、例:転送された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=London

AIアシスタントに接続する

  • Claude Desktop / Claude Code: クライアントの設定で、build/index.jsをstdio MCPサーバーとして指定します。

  • Claude.aiカスタムコネクタ: 実行中のHTTPインスタンスの/mcp URLを指定します(カスタムコネクタを利用できるプランが必要です)。

  • Anthropic API直接: /v1/messagesリクエストのmcp_serversパラメータに/mcp URLを渡します。これにより、事前に構築されたMCPクライアントを必要とせず、任意のカスタムアプリやページでツールを使用できます。

拡張のためのメモ

Open-Meteoには、このプロジェクトが使用しているもの以外にも、多くの変数とエンドポイントがあります(大気質、海洋予報、履歴/アーカイブデータ、アンサンブルなど)。さらに追加するには、src/server.ts内の既存ツールのパターンに従って、独自の入力スキーマとOpen-Meteoリクエストを持つ新しいserver.tool(...)ブロックを登録してください。

データ © Open-Meteo.com、CC BY 4.0。

Install Server
A
license - permissive license
A
quality
Not graded
maintenance - not tested

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

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables 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.
  • A
    license
    Not graded
    quality
    F
    maintenance
    Enables AI assistants to retrieve current weather, forecasts, and summaries for any global location using the Open-Meteo API, with no API key required.
    21
    Creative Commons Zero v1.0 Universal
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides 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

View all related MCP servers

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.

View all MCP Connectors

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/clarehancock/open-meteo-mcp'

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