Surfline MCP Server

Surfline MCP Server

Enables access to comprehensive surf forecasts from Surfline including current conditions, swell analysis, forecaster insights, tides, and timing information for Santa Cruz surf spots. Provides detailed 8-hour forecasts with expert observations through secure Google OAuth authentication.

Category
访问服务器

README

Surfline MCP Server

A Model Context Protocol (MCP) server that provides comprehensive surf forecasts from Surfline's API. Access detailed surf conditions, swell analysis, forecaster insights, tides, and more directly through Claude or any MCP-compatible client.

Features

🌊 Comprehensive Surf Data

  • Current conditions for 11 Santa Cruz spots (easily extensible to other regions)
  • Detailed swell breakdown (height, period, direction, power for each swell component)
  • 8-hour hourly forecasts showing how conditions evolve
  • Expert forecaster observations with AM/PM specific timing advice
  • Wind conditions (speed, direction, offshore/onshore classification)
  • Quality ratings (1-5 stars)

🌅 Timing Information

  • Sunrise, sunset, dawn, and dusk times
  • Tide schedule with high/low times and heights
  • All times properly converted to Pacific timezone

🔐 Secure Authentication

  • Google OAuth integration for secure access
  • Works seamlessly with claude.ai web and mobile
  • No Surfline API keys required (uses public endpoints)

Quick Start

Prerequisites

  • Node.js 18+
  • A Cloudflare account (free tier works)
  • A Google Cloud project for OAuth (free)

Installation

  1. Clone and install dependencies: ```bash cd surfline-mcp-server npm install ```

  2. Set up Google OAuth:

    • Go to Google Cloud Console
    • Create a new OAuth 2.0 Client ID (Web application type)
    • Add authorized redirect URIs:
      • `https://your-worker-name.your-subdomain.workers.dev/callback`
      • `https://claude.ai/api/mcp/auth_callback`
    • Note your Client ID and Client Secret
  3. Create a KV namespace: ```bash npx wrangler kv namespace create OAUTH_KV ``` Update `wrangler.jsonc` with the returned KV ID.

  4. Set secrets: ```bash echo 'YOUR_GOOGLE_CLIENT_ID' | npx wrangler secret put GOOGLE_CLIENT_ID echo 'YOUR_GOOGLE_CLIENT_SECRET' | npx wrangler secret put GOOGLE_CLIENT_SECRET echo $(openssl rand -hex 32) | npx wrangler secret put COOKIE_ENCRYPTION_KEY ```

  5. Deploy: ```bash npm run deploy ```

Connect to Claude

  1. Go to claude.ai
  2. Navigate to Settings → Integrations
  3. Add your deployed worker URL: `https://your-worker-name.your-subdomain.workers.dev/mcp`
  4. Authenticate with Google
  5. Ask Claude: "How's the surf in Santa Cruz?"

Available Tools

`get_complete_surf_report`

Primary tool - Returns everything in one call:

  • Forecaster notes with expert observations
  • Sunrise/sunset times
  • Tide schedule
  • Current conditions for all spots
  • Swell breakdown
  • 8-hour forecasts

Secondary Tools

Individual data fetchers available if you need specific information:

  • `get_surf_forecast` - Basic spot conditions only
  • `get_forecaster_notes` - Human observations only
  • `get_tides` - Tide information only
  • `get_best_spot` - Ranked recommendations

Spots Covered

North County: Davenport, Waddell Creek, Four Mile, Three Mile
Central: Steamer Lane, Cowells, 26th Ave
East Side: Pleasure Point, Jack's, The Hook
South: Capitola

Data Source

This server uses Surfline's undocumented public API endpoints - the same ones their website uses. No API keys or authentication required for basic forecast data. The endpoints have been stable for years and are widely used by the surf community.

Important: Webcams and premium features are not available through these endpoints.

Extending to Other Regions

To add more spots, edit `src/index.ts` and add to the `SANTA_CRUZ_SPOTS` object:

```typescript const SANTA_CRUZ_SPOTS: Record<string, string> = { "Your Spot Name": "spotIdFromSurfline", // ... }; ```

Find spot IDs by inspecting network requests on surfline.com.

Architecture

  • Cloudflare Workers: Serverless hosting (free tier: 100k requests/day)
  • Durable Objects: OAuth state management
  • KV Storage: Token persistence
  • Google OAuth: Secure authentication
  • MCP Protocol: Standard tool interface for AI assistants

Development

Run locally: ```bash npm run dev ```

The server will be available at `http://localhost:8788`

Test with MCP Inspector: ```bash npx @modelcontextprotocol/inspector ```

License

MIT

Acknowledgments

  • Surfline for providing accessible surf forecast data
  • Cloudflare for the MCP and OAuth libraries
  • The surf community for documenting the API endpoints

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选