Surf MCP Server

by ravinahp

Integrations

  • Retrieves tide information for specific locations and dates using the Storm Glass API, providing high/low tide times, heights, and nearby station information to help determine optimal surfing conditions.

サーフィンMCPサーバー

サーフィンやウェブをする人のための MCP サーバー。

ビデオデモ

https://github.com/user-attachments/assets/0a4453e2-66df-4bf5-8366-8538cda366ed

特徴

  • 緯度と経度を使用して任意の場所の潮汐情報を取得します
  • 日付指定の潮汐クエリのサポート
  • 満潮・干潮や観測所情報を含む詳細な潮汐データ
  • 自動タイムゾーン処理(UTC)

前提条件

  • Python 3.x
  • ストームグラスAPIキー

ストームグラスAPIキーの取得

  1. ストームグラスを訪問
  2. 「無料で試す」または「サインイン」をクリックしてアカウントを作成してください
  3. 登録するとAPIキーが届きます

API 使用制限に関する注意:

  • 無料枠: 1日あたり10リクエスト
  • 利用可能な有料プラン:
    • 小規模: 1日あたり500リクエスト (月額19ユーロ)
    • 中規模: 5000 リクエスト/日 (月額 49 ユーロ)
    • 大規模: 25,000 リクエスト/日 (月額 129 ユーロ)
    • エンタープライズ: カスタムプランも利用可能

ご利用要件に応じてプランをお選びください。無料プランはテストや個人利用に適しています。

インストール

  1. リポジトリをクローンします。
git clone https://github.com/ravinahp/surf-mcp.git cd surf-mcp
  1. uv を使用して依存関係をインストールします。
uv sync

注: プロジェクトでは依存関係の管理にpyproject.toml使用しているため、pip ではなくuvを使用します。

MCPサーバーとして構成する

このツールをMCPサーバーとして追加するには、Claudeデスクトップの設定ファイルを変更する必要があります。この設定にはStorm Glass APIキーが含まれているため、別途設定する必要はありません。

構成ファイルの場所は、オペレーティング システムによって異なります。

  • MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json

次の構成を JSON ファイルに追加します。

{ "surf-mcp": { "command": "uv", "args": [ "--directory", "/Users/YOUR_USERNAME/Code/surf-mcp", "run", "surf-mcp" ], "env": { "STORMGLASS_API_KEY": "your_api_key_here" } } }

⚠️ 重要:

  1. YOUR_USERNAME実際のシステムユーザー名に置き換えます
  2. your_api_key_here実際の Storm Glass API キーに置き換えます。
  3. ディレクトリパスがローカルインストールと一致していることを確認してください

展開

建物

パッケージを準備するには:

  1. 依存関係を同期し、ロックファイルを更新します。
uv sync
  1. ビルドパッケージ:
uv build

これにより、 dist/ディレクトリにディストリビューションが作成されます。

デバッグ

MCPサーバーはstdio経由で実行されるため、デバッグが困難になる場合があります。最適なデバッグエクスペリエンスを得るには、MCP Inspectorの使用を強くお勧めします。

次のコマンドで MCP Inspector を起動できます。

npx @modelcontextprotocol/inspector uv --directory /path/to/surf-mcp run surf-mcp

起動すると、ブラウザでアクセスしてデバッグを開始できる URL がインスペクタに表示されます。

検査官は以下を提供します:

  • リアルタイムのリクエスト/レスポンス監視
  • 入力/出力検証
  • エラー追跡
  • パフォーマンス指標

使用法

このサービスでは、潮汐情報を取得するための FastMCP ツールを提供しています。

@mcp.tool() async def get_tides(latitude: float, longitude: float, date: str) -> str: """Get tide information for a specific location and date."""

パラメータ:

  • latitude : 場所の緯度を表す浮動小数点値
  • longitude : 場所の経度を表す浮動小数点値
  • date : YYYY-MM-DD形式の日付文字列

応答例:

Tide Times: Time: 2024-01-20T00:30:00+00:00 (UTC) Type: HIGH tide Height: 1.52m Time: 2024-01-20T06:45:00+00:00 (UTC) Type: LOW tide Height: 0.25m Station Information: Name: Sample Station Distance: 20.5km from requested location

ユースケース

例1:サーフィンに最適な時間を見つける

このツールを使えば、お気に入りのビーチと最寄りのステーションでサーフィンに最適な時間を調べることができます。一般的に、サーフィンに最適なコンディションは、満潮の約2時間前の上げ潮時です。

クロードへのプロンプトの例:

注:ビーチによって、地形や波の種類によって最適な潮汐条件が異なる場合があります。このツールは、潮汐情報と併せて考慮すべき測点距離情報も提供します。(測点距離が長いほど、不正確さが増します。クロードに質問する際に、この点についても尋ねることができます。)

エラー処理

このサービスには、次のような堅牢なエラー処理が含まれています。

  • APIリクエストの失敗
  • 無効な座標
  • APIキーが見つからないか無効です
  • ネットワークタイムアウト

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

緯度と経度を使用して任意の場所の潮汐情報を取得し、UTC タイムゾーンの自動処理により、満潮/干潮や観測所情報などの詳細な潮汐データを提供します。

    1. ビデオデモ
      1. 特徴
        1. 前提条件
          1. ストームグラスAPIキーの取得
            1. インストール
              1. MCPサーバーとして構成する
                1. 展開
                  1. 建物
                  2. デバッグ
                2. 使用法
                  1. パラメータ:
                  2. 応答例:
                3. ユースケース
                  1. 例1:サーフィンに最適な時間を見つける
                4. エラー処理

                  Related MCP Servers

                  • A
                    security
                    A
                    license
                    A
                    quality
                    Provides hourly weather forecasts using the AccuWeather API, enabling users to access current weather conditions and detailed 12-hour forecasts tailored to specific locations.
                    Last updated -
                    1
                    3
                    Python
                    The Unlicense
                  • A
                    security
                    F
                    license
                    A
                    quality
                    Provides weather forecast data for locations in China using the HeFeng Weather API, with real-time, hourly, or daily forecasts and location-based queries.
                    Last updated -
                    1
                    7
                    2
                    TypeScript
                  • A
                    security
                    A
                    license
                    A
                    quality
                    This is an MCP (Model Context Protocol) server that provides tools for interacting with the NOAA Tides and Currents API.
                    Last updated -
                    7
                    TypeScript
                    MIT License
                  • A
                    security
                    A
                    license
                    A
                    quality
                    An MCP server that provides real-time weather information including temperature, humidity, wind speed, and sunrise/sunset times through the OpenWeatherMap API.
                    Last updated -
                    1
                    Python
                    MIT License
                    • Linux
                    • Apple

                  View all related MCP servers

                  ID: rog4v53kgl