The Surf MCP Server provides a convenient way to fetch tide information for any location using the Model Context Protocol. This tool integrates with Claude AI to deliver accurate tide data based on latitude, longitude, and date specifications.
Note on API Usage Limits:
git clone https://github.com/ravinahp/surf-mcp.git
cd surf-mcp
uv sync
To add this tool as an MCP server, you'll need to modify your Claude desktop configuration file:
~/Library/Application\ Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
Add the following configuration 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:
YOUR_USERNAME
with your actual system usernameyour_api_key_here
with your actual Storm Glass API keyThe 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."""
latitude
: Float value representing the location's latitudelongitude
: Float value representing the location's longitudedate
: Date string in YYYY-MM-DD formatTide 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
You can use this tool to determine the optimal surfing time at your favorite beach & the closest station. Generally, the best surfing conditions are during incoming (rising) tides, about 2 hours before high tide.
Example prompt to Claude: Ask Claude to check the tide information for your favorite surfing location by providing the coordinates and date.
Note: Different beaches may have different optimal tide conditions based on their specific geography and break type. The station distance information should be considered alongside tide information, as longer station distances may result in less accurate predictions.
For debugging assistance, use the MCP Inspector:
npx @modelcontextprotocol/inspector uv --directory /path/to/surf-mcp run surf-mcp
The Inspector will display a URL to access in your browser for monitoring:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "surf-mcp" '{"command":"uv","args":["--directory","/Users/YOUR_USERNAME/Code/surf-mcp","run","surf-mcp"],"env":{"STORMGLASS_API_KEY":"your_api_key_here"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"surf-mcp": {
"command": "uv",
"args": [
"--directory",
"/Users/YOUR_USERNAME/Code/surf-mcp",
"run",
"surf-mcp"
],
"env": {
"STORMGLASS_API_KEY": "your_api_key_here"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"surf-mcp": {
"command": "uv",
"args": [
"--directory",
"/Users/YOUR_USERNAME/Code/surf-mcp",
"run",
"surf-mcp"
],
"env": {
"STORMGLASS_API_KEY": "your_api_key_here"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect