Surf Forecast MCP

Surf Forecast MCP

Provides surf forecast data including swell height, period, direction, and wind conditions for any location worldwide using the Open-Meteo Marine API. It also includes tools to find the best day to surf and integrates with MCP clients via a Python server.

Category
Visit Server

README

Surf Forecast MCP

A Python-based MCP that uses the Open-Meteo Marine API (free, no API key required) to forecast swell height, swell period, swell direction, and wind conditions. Search for any city name and the system will automatically convert it to latitude and longitude coordinates to retrieve weather data and wave forecasts. Includes a surf forecast MCP server that provides wave and surf conditions for any location worldwide.

You can use the backend or view the results for better understanding using Streamlit.

Running the MCP Server 🔥

Surf Forecast MCP

Here is how you activate following the mcp json example

{
  "mcpServers": {
    "surf-forecast": {
      "command": "python",
      "args": ["server.py"]
    }
  }
}

Activate MCP

Example of forecasting

Forecasting

Example of bestday

Best day to surf

How to start

# 1) criar e ativar venv (opcional)
python -m venv .venv
source .venv/bin/activate  # mac/linux
# .venv\Scripts\activate  # windows

# 2) instalar deps
pip install -r requirements.txt

# 3) run the Surf Forecast API
uvicorn backend.main:app --reload

# 4) run the frontend (Streamlit)
python -m streamlit run frontend/app.py

Key Makefile targets (use make help to see in terminal)

  make help          - Show this help message
  make setup         - Create virtual environment and install dependencies
  make install       - Install dependencies
  make install-dev   - Install dependencies + dev tools (black, ruff)
  make venv          - Create virtual environment
  make format        - Format code with black
  make lint          - Lint code with ruff
  make check         - Format and lint code
  make server        - Run FastAPI backend (uvicorn)
  make mcp           - Run MCP server
  make frontend      - Run Streamlit frontend
  make test          - Run tests (if available)
  make clean         - Remove cache and temporary files
  make clean-all     - Clean everything including virtual environment
  make dev           - Setup development environment

Error Handling

The service includes robust error handling for:

  • API request failures
  • Invalid coordinates
  • Network timeouts

Response Example: Using Pydantic principles and FastAPI

{
  "location": "Monte de Caparica, Almada, Setúbal, 2825-096, Portugal",
  "latitude": 38.6637429,
  "longitude": -9.198197,
  "current_conditions": {
    "timestamp": "2026-01-31T00:00",
    "wave_height_m": 4.5,
    "swell_wave_height_m": 4.42,
    "wind_wave_height_m": 0.8,
    "wave_direction_deg": 289,
    "swell_wave_direction_deg": 289,
    "wave_period_s": 12.15,
    "swell_wave_period_s": 10.4,
    "wind_speed_knots": 9,
    "wind_direction_deg": 288,
    "wind_gusts_knots": 23.1,
    "temperature_c": 12.5
  },
  "hourly_forecast": [
    {
      "timestamp": "2026-01-31T03:00",
      "wave_height_m": 4.4,
      "swell_wave_height_m": 4.36,
      "wind_wave_height_m": 0.48,
      "wave_direction_deg": 291,
      "swell_wave_direction_deg": 291,
      "wave_period_s": 12.4,
      "swell_wave_period_s": 10.45,
      "wind_speed_knots": 5.9,
      "wind_direction_deg": 278,
      "wind_gusts_knots": 15.9,
      "temperature_c": 11.7
    },
    {
      "timestamp": "2026-01-31T06:00",
      "wave_height_m": 4.24,
      "swell_wave_height_m": 4.22,
      "wind_wave_height_m": 0.42,
      "wave_direction_deg": 292,
      "swell_wave_direction_deg": 292,
      "wave_period_s": 12.5,
      "swell_wave_period_s": 10.55,
      "wind_speed_knots": 4.1,
      "wind_direction_deg": 275,
      "wind_gusts_knots": 13.6,
      "temperature_c": 10.9
    },
    {
      "timestamp": "2026-01-31T09:00",
      "wave_height_m": 4.06,
      "swell_wave_height_m": 4.04,
      "wind_wave_height_m": 0.32,
      "wave_direction_deg": 293,
      "swell_wave_direction_deg": 293,
      "wave_period_s": 12.5,
      "swell_wave_period_s": 10.5,
      "wind_speed_knots": 4.5,
      "wind_direction_deg": 263,
      "wind_gusts_knots": 11.3,
      "temperature_c": 11.7
    },
    {
      "timestamp": "2026-01-31T12:00",
      "wave_height_m": 3.9,
      "swell_wave_height_m": 3.88,
      "wind_wave_height_m": 0.3,
      "wave_direction_deg": 294,
      "swell_wave_direction_deg": 294,
      "wave_period_s": 12.5,
      "swell_wave_period_s": 10.5,
      "wind_speed_knots": 7.3,
      "wind_direction_deg": 279,
      "wind_gusts_knots": 18.9,
      "temperature_c": 14.6
    }
  ],
  "forecast_5day": [
    {
      "date": "2026-01-31",
      "wave_height_max_m": 4.5,
      "swell_wave_height_max_m": 4.42,
      "wind_wave_height_max_m": 0.8,
      "wave_direction_dominant_deg": 292,
      "swell_wave_direction_dominant_deg": 292,
      "wave_period_max_s": 12.6,
      "swell_wave_period_max_s": 10.6,
      "wind_speed_max_knots": 9,
      "wind_direction_dominant_deg": 262,
      "wind_gusts_max_knots": 23.1,
      "temperature_max_c": 15.2,
      "temperature_min_c": 10.9
    },
    {
      "date": "2026-02-01",
      "wave_height_max_m": 3.16,
      "swell_wave_height_max_m": 3.12,
      "wind_wave_height_max_m": 1.28,
      "wave_direction_dominant_deg": 283,
      "swell_wave_direction_dominant_deg": 289,
      "wave_period_max_s": 12.35,
      "swell_wave_period_max_s": 11.2,
      "wind_speed_max_knots": 12.5,
      "wind_direction_dominant_deg": 223,
      "wind_gusts_max_knots": 30.7,
      "temperature_max_c": 15.1,
      "temperature_min_c": 13.3
    },
    {
      "date": "2026-02-02",
      "wave_height_max_m": 3.8,
      "swell_wave_height_max_m": 3.78,
      "wind_wave_height_max_m": 2.3,
      "wave_direction_dominant_deg": 274,
      "swell_wave_direction_dominant_deg": 284,
      "wave_period_max_s": 11.15,
      "swell_wave_period_max_s": 11.85,
      "wind_speed_max_knots": 16.1,
      "wind_direction_dominant_deg": 254,
      "wind_gusts_max_knots": 48,
      "temperature_max_c": 13.9,
      "temperature_min_c": 9.8
    },
    {
      "date": "2026-02-03",
      "wave_height_max_m": 4.82,
      "swell_wave_height_max_m": 4.26,
      "wind_wave_height_max_m": 2.32,
      "wave_direction_dominant_deg": 279,
      "swell_wave_direction_dominant_deg": 283,
      "wave_period_max_s": 12.1,
      "swell_wave_period_max_s": 10.95,
      "wind_speed_max_knots": 12,
      "wind_direction_dominant_deg": 247,
      "wind_gusts_max_knots": 32.5,
      "temperature_max_c": 14,
      "temperature_min_c": 9.4
    },
    {
      "date": "2026-02-04",
      "wave_height_max_m": 4.98,
      "swell_wave_height_max_m": 4.48,
      "wind_wave_height_max_m": 2.4,
      "wave_direction_dominant_deg": 270,
      "swell_wave_direction_dominant_deg": 281,
      "wave_period_max_s": 11.05,
      "swell_wave_period_max_s": 10.6,
      "wind_speed_max_knots": 15.9,
      "wind_direction_dominant_deg": 248,
      "wind_gusts_max_knots": 38.7,
      "temperature_max_c": 15.4,
      "temperature_min_c": 14.8
    }
  ],
  "surf_quality_notes": "big waves - advanced surfers only | light breeze - good conditions | long period swell - clean waves expected | swell dominant - cleaner conditions"
}

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured