MCP HubMCP Hub
ravinahp

surf-mcp

by: ravinahp

An MCP server for people who surf waves and the web.

12created 07/01/2025
Visit
surfing
web

📌Overview

Purpose: The Surf MCP Server aims to provide surfers with accurate tide information through a user-friendly interface while seamlessly integrating with web applications.

Overview: This framework allows users to fetch real-time tide data based on geographical coordinates. It is designed for both individual surfers and developers looking to enhance their applications with tide-related data.

Key Features:

  • Tide Information Fetching: Users can retrieve tide information by inputting latitude and longitude, ensuring precise location-based data.

  • Date-Specific Queries: The server supports queries for specific dates, allowing users to plan surfing trips based on forecasted tide conditions.

  • Detailed Data Outputs: Users receive comprehensive tide details, including high and low tides and associated station information, enriching their understanding of local tide patterns.

  • Automatic Time Zone Management: The system handles time zone conversions, delivering all times in UTC for consistency and ease of use.


Surf MCP Server

MCP server for surfers who want to fetch tide information.

Features

  • Fetch tide information for any location using latitude and longitude
  • Support for date-specific tide queries
  • Detailed tide data including high/low tides and station information
  • Automatic time zone handling (UTC)

Prerequisites

  • Python 3.x
  • Storm Glass API key

Getting Your Storm Glass API Key

  1. Visit Storm Glass
  2. Create an account to receive your API key

API Usage Limits

  • Free tier: 10 requests per day
  • Paid plans available for higher limits

Installation

  1. Clone the repository:

    git clone https://github.com/ravinahp/surf-mcp.git
    cd surf-mcp
    
  2. Install dependencies using uv:

    uv sync
    

Configure as MCP Server

Modify your Claude desktop configuration file to include your Storm Glass API key.

Configuration File Location

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

Configuration Example

Add the following to your JSON file:

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

Important Notes

  1. Replace YOUR_USERNAME with your actual system username.
  2. Replace your_api_key_here with your Storm Glass API key.

Deployment

Building

To prepare the package:

  1. Sync dependencies and update lockfile:
    uv sync
    
  2. Build package:
    uv build
    

Debugging

For the best debugging experience, use the MCP Inspector:

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

Usage

The service provides a FastMCP tool for getting tide information:

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

Parameters

  • latitude: Latitude of the location
  • longitude: Longitude of the location
  • date: Date string in YYYY-MM-DD format

Example Response

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

Use Cases

Finding the Best Surf Time

Determine the optimal surfing time at your favorite beach using tide information.

Error Handling

The service includes robust error handling for:

  • API request failures
  • Invalid coordinates
  • Missing or invalid API keys
  • Network timeouts