rrenebostic/ai-coastal-guardian
If you are the rightful owner of ai-coastal-guardian and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Model Context Protocol (MCP) server connects Claude AI to NOAA tide data, enabling real-time environmental condition alerts and activity recommendations for coastal areas.
ai-coastal-guardian
Model Context Protocol (MCP) server connecting Claude AI to NOAA tide data with AI Agent workflows for automated coastal environmental condition alerts.
The AI Coastal Guardian Project
Leveraging Claude AI, NOAA Tide Data through the Model Context Protocol (MCP) with integrated AI Agents for Enhanced Beach Experiences
Project Overview
The AI Coastal Guardian Project aims to transform your coastal adventures by combining the intelligence of Claude AI with real-time National Oceanic and Atmospheric Administration (NOAA) tide data. This project implements a Model Context Protocol (MCP) server that enables Claude AI to access and interpret oceanic information, enabling a more coordinated and efficient response to the issues caused by sargassum accumulation. Additionally, AI Agents will be utilized to automate email alerts to the public.
No more arriving at the beach only to find unfavorable environmental conditions (See image below). In the near future, the AI Coastal Guardian Project will help you plan the perfect coastal getaway by providing intelligent insights with predictions and alerts when conditions pose a high health risk.
For more details about the launch of the project visit Medium.com.
Key Features
• Real-Time Tide Information: Access current tide data from NOAA's extensive network of coastal stations
• Intelligent Activity Planning: Receive personalized recommendations for the best times to visit beaches for specific activities
• Natural Language Interface: Interact with tide data through Claude's conversational AI
• Location-Aware: Find nearby tide stations and get localized information
• Safety First: Get safety alerts about potentially dangerous tide conditions
• Seaweed Bloom Alerts: Receive automated email notifications about seaweed bloom predictions
• AI Agent Workflows: Leverage an AI Agent Workflow Automation tool for orchestrating Claude AI and NOAA data integrations
How It Works
The AI Coastal Guardian Project leverages Anthropic's Model Context Protocol (MCP) to connect Claude AI with NOAA's Tides and Currents data system:
- MCP Server: The core of the project is an MCP server that interfaces between Claude AI and NOAA's tide data APIs
- NOAA Integration: The server communicates with NOAA's Tides and Currents API to retrieve real-time water level data, tide predictions, and station information
- Intelligent Processing: The system applies algorithms to interpret tide data and generate activity recommendations
- Claude AI Interface: Users interact with the system through natural language conversations with Claude
- AI Agent Workflow Automation: AI Agent workflows to orchestrate the integration between Claude AI and the NOAA Tides MCP Server
- Automated Alerting: The system monitors for conditions that may lead to seaweed blooms and sends email alerts via Gmail
Example Interactions
• "What are the tide conditions at Malibu Beach tomorrow?"
• "When is the best time to go surfing in San Diego this weekend?"
• "Is it safe to take kids tide pooling at La Jolla Cove on Saturday morning?"
• "I'm planning a beach picnic at Coronado Beach. What time should I avoid?"
• "What's the best beach near me for shell collecting based on current tide conditions?"
• "Can you alert me if there's a risk of seaweed blooms at Miami Beach this week?"
• "Set up weekly tide reports for my local beach by email."
Technical Implementation
The AI Coastal Guardian Project uses several key technologies:
• Model Context Protocol (MCP): Enables Claude AI to access external data sources and tools
• NOAA CO-OPS API: Provides access to water level data, tide predictions, and station metadata
• Python FastMCP Framework: Simplifies MCP server implementation
• Claude AI: Powers the natural language understanding and response generation
• JSON: Used for the integration between Claude Desktop and NOAA Tides MCP Server
• AI Agent Workflow Automation: Integrates Claude AI and NOAA Tides MCP Server prediction capabilities within an AI Agent workflow
• Email Integration: Generates and sends automated seaweed bloom alerts via Gmail
NOAA Data Integration
The project connects to several NOAA data endpoints:
• Water Level Measurements: Real-time and historical water levels
• Tide Predictions: Future tide predictions for planning
• Water Temperature: Real-time and forecasted ocean temperature data
• Station Metadata: Information about tide stations including location and capabilities
• Nearby Station Search: Finding relevant tide stations based on geolocation
Getting Started
The implementation requires a specific technical configuration. This approach leverage no-code/low-code methods:
Step 1: Install the Claude for Desktop.
Step 2: Ryan Cardin is acknowledged for creating the most automated method for installing the NOAA Tides MCP Server. Install the NOAA Tides MCP Server for the Claude Desktop using Smithery.
note: If the Smithery server is down and your project is urgent, the NOAA Tides and Currents MCP Server installation instructions can be found on MCP Market.
Step 3: Switch to the Claude Desktop. From the toolbar, select Settings -> Developer -> Edit Config.
Step 4: Navigate to Rayan Cardin's Smithery page and click on the JSON tab to copy the JSON script.
Step 5: Paste the copied JSON script into your editor.
Step 6: Close the Claude Desktop. Reopen. You will now see the noaa-tidesandcurrents listed.
Step 7: Use the prompt "What information is provided from NOAA Tides?" Claude AI responds with several thought-provoking questions.
Future Enhancements
• Integration with weather data for comprehensive beach planning
• Mobile app for on-the-go tide checking
• Image recognition for beach conditions from user photos
• Crowd sourcing of real-time beach conditions from users
• Integration with beach safety warnings and surf conditions
• Expansion of the AI Agent workflows to include additional data sources and alerts
• Advanced seaweed bloom prediction using machine learning models
• Integration with smart home systems for automated morning beach reports
Sample Output
Prompt
Summary: Claude AI communicates with the noaa-tidesandcurrents MCP Server via JSON scripts. You can prompt Claude in natural language or directly using JSON. Communicating with Claude via JSON was confirmed via a prompt. See image below.
Prompt 1: What is the water temperature at station id 8724580?
Observation 1: Claude leverages the NOAA tides data via the noaa-tidesandcurrents MCP Server. Claude’s first attempt is to determine the correct JSON script necessary to retrieve the requested information. Once Claude is successful, it provides a comprehensive answer. See image below.
Prompt 2: Is the weather conducive for seaweed bloom?
Observation 2: Claude responded in three (3) parts:
Part 1 Observation: To answer the question, Claude “reasoned” and determined it required (1) both meteorological and ocean data, and (2) multiple factors that influence seaweed bloom including water temperature, nutrient, levels, wind patterns, and ocean currents. See response below.
Part 2 Observation: Claude provides a synopsis of the water temperature, air temperature, wind conditions, and water levels at Station 8724580. See response below.
Part 3 Observation: Claude justifies reaching its conclusion. Details regarding its justification are important when validating the accuracy of the response. See response below.
Prompt 3: Please write an email to Miami Citizen about the water temperature at station id 8723214. . The tone should be respectful but urgent. Include if the water temperature is conducive for seaweed bloom. The email should be short put complete.
Observation: Claude leverages the NOAA tides data and its email writing capabilities to craft the email. After several iterations the following email was generated by Claude. See image below.
Conclusion: These are my initial findings.
Sample AI Workflow to Identify Seaweed Bloom Conditions and Create an SMS Alert
The AI Workflow Prompt
Lessons Learned As I explored different prompts for Claude AI to access NOAA data using either a natural language prompt versus JSON scripts, I determined that incorporating the JSON script directly into the prompt was much more efficient. Below is an example when using a natural language prompt only without a JSON script. You will notice that Claude AI iterates to generate the optimal JSON script.
Using a natural language prompt can lead to unnecessary processing time, which can increase carbon emissions. Therefore, incorporating the JSON script directly into the prompt is much more environmentally friendly and produces faster response times. Let’s review the prompt I used to create the SMS text alert.
The goal is to create an AI Workflow to combine the tasks of identifying conditions for seaweed bloom and sending an SMS message to beachgoers. Therefore, the prompt utilizes a two-step workflow to create distinct processing phases that significantly improve output quality.
<Step 1>: Data Acquisition Parameters: The precise specification of the NOAA data source (Station ID 8723214), data product (water_temperature), and format (JSON) established clear technical boundaries for the initial environmental assessment phase, eliminating ambiguity in data source selection.
<Step 2>: Character-Constrained Optimization: The explicit 160-character limitation for the SMS alert created a well-defined technical constraint that forced algorithmic optimization of message content while maintaining critical information density.
CLAUDE AI STEP 1
Immediately, you notice how easily and much faster Claude AI communicated via the NOAA tides and currents API using the JSON script. This technical determination included:
-
Comparative Threshold Analysis: The 83.7°F reading exceeds the established 80°F threshold for accelerated seaweed growth by 4.6%, placing it firmly within high-probability conditions for bloom formation.
-
Temporal Context Implementation: The May 15th timestamp positions this reading during a seasonal transition period known to correlate with increased nutrient availability, further amplifying bloom probability when combined with elevated temperatures.
-
Geospatial Parameter Consideration: Virginia Key’s position (25.7314, -80.1618) represents a monitoring location with established historical correlation to broader coastal conditions affecting Miami’s recreational beaches.
CLAUDE AI STEP 2
Claude AI utilized a multi-layered processing pipeline optimized for both information density and character conservation to generate the following 160-character SMS text alert:
ALERT: High-risk for seaweed bloom at Virginia Key today! Avoid respiratory/skin irritation risks. Skip the beach — explore Vizcaya Museum’s gardens instead! #StaySafe
Note that I did not recommend an alternative vacation activity. Claude AI made the determination. If there are specific city-sponsored events, including that information in the prompt would be helpful. Another step could include iterating on the text message to note Miami Beach as the location versus the Virginia Key station.
Conclusion of AI Workflow Once the integration between Claude AI and the NOAA Tides and Currents MCP Server is established, you can begin ideation and testing scenarios. This specific AI Workflow was easier to create than expected. The next goal is to automate the alerts using and AI Agent.
Learn More
This project was born from a passion for both AI technology and beach activities. Read more about the development journey and technical details by subscribing to René Bostic Medium articles.
Resources
• Securing Generative AI for Dummies
License
This project is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0) License - see the LICENSE file for details.
Made with ❤️ by Rene Bostic