mcp-noaa-tides
The NOAA Tides MCP Server is designed to provide access to NOAA's oceanographic data, allowing users to access water levels, tide predictions, and station metadata through a Model Context Protocol interface. It supports functionalities like querying for water levels and tide information for specified stations.
NOAA Tides MCP Server
This MCP server provides access to NOAA CO-OPS (Center for Operational Oceanographic Products and Services) data through the Model Context Protocol.
Features
- Get water level data for specific stations
- Get tide predictions (high/low tides)
- Get station information and metadata
Installation
uv add mcp[cli]
uv add httpx
Development Setup
To set up the development environment with test dependencies:
# Install test dependencies
uv add pytest pytest-asyncio pytest-httpx pytest-mock
Testing
The project uses pytest for testing. The test suite includes:
- Unit tests for all API endpoints
- Error handling tests
- Parameter validation tests
- Mock HTTP responses using pytest-httpx
To run the tests:
# Run all tests with verbose output
pytest -v
# Run a specific test file
pytest tests/test_server.py -v
# Run a specific test function
pytest tests/test_server.py::test_get_water_levels -v
Usage
The server provides three main tools:
-
get_water_levels
: Get water level data for a specific station- Parameters:
station_id
: 7-digit station IDbegin_date
: Start date in yyyyMMdd format (optional)end_date
: End date in yyyyMMdd format (optional)datum
: Vertical datum (default: MLLW)time_zone
: Time zone (default: gmt)units
: Units of measurement (default: english)
- Parameters:
-
get_tide_predictions
: Get tide predictions for a specific station- Parameters:
station_id
: 7-digit station IDbegin_date
: Start date in yyyyMMdd format (optional)end_date
: End date in yyyyMMdd format (optional)datum
: Vertical datum (default: MLLW)time_zone
: Time zone (default: gmt)units
: Units of measurement (default: english)interval
: Prediction interval (default: hilo for high/low tides)
- Parameters:
-
get_station_info
: Get information about a specific station- Parameters:
station_id
: 7-digit station ID
- Parameters:
Example Station IDs
- 9414290: San Francisco, CA
- 8518750: The Battery, NY
- 8557863: Rehoboth Beach, MD
Running the Server
python server.py
Using with Claude Desktop
To use this server with Claude Desktop, add it using the following configuration string:
python:/path/to/your/server.py
Replace /path/to/your/server.py
with the actual path to your server.py
file.
License
MIT