LocalTides MCP 服务器
这是一个 MCP(模型上下文协议)服务器,它提供使用 FastMCP 框架与 NOAA 潮汐和洋流 API 交互的工具。
特征
水位数据检索(实时和历史)
潮汐预测(高/低或间隔)
电流数据(实时和历史)
目前的预测
站点元数据检索
风、气温、水温等气象数据
月相信息(过去、现在和未来)
日出/日落和位置数据(过去、现在和未来)
先决条件
Node.js(v18 或更高版本)
npm 或 yarn
设置
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 NOAA Tides and Currents:
手动安装
克隆此存储库
安装依赖项
构建 TypeScript 代码
启动服务器
用法
该 MCP 服务器可以与任何 MCP 主机(例如 Claude Desktop)一起使用,这允许您通过 MCP 协议使用 NOAA 潮汐和洋流 API。
您也可以直接使用fastmcp
命令行工具进行测试:
或者,您可以使用 MCP 检查器:
可用工具
参数定义
get_parameter_definitions
- 获取有关 NOAA API 请求的有效参数值的信息参数:
parameter
(字符串,可选)- 需要获取相关信息的参数类型(time_zones、datums、units、tide_intervals、current_intervals、velocity_types、products、station_types、date_formats、output_formats)。若未提供,则返回所有参数类型的信息。
水位
get_water_levels
- 获取站点的水位数据参数:
station
(字符串)- 车站 IDdate
(字符串,可选) - 检索数据的日期(“今天”、“最新”、“最近”或特定日期)begin_date
(字符串,可选) - 开始日期(YYYYMMDD 或 MM/DD/YYYY)end_date
(字符串,可选) - 结束日期(YYYYMMDD 或 MM/DD/YYYY)range
(数字,可选) - 检索数据的小时数datum
(字符串,可选) - 要使用的基准(MLLW、MSL 等)units
(字符串,可选) - 使用的单位(“英制”或“公制”)time_zone
(字符串,可选) - 时区 (gmt、lst、lst_ldt)format
(字符串,可选)- 输出格式(json、xml、csv)
潮汐预报
get_tide_predictions
- 获取潮汐预测数据参数:
station
(字符串)- 车站 IDbegin_date
(字符串) - 开始日期 (YYYYMMDD 或 MM/DD/YYYY)end_date
(字符串) - 结束日期 (YYYYMMDD 或 MM/DD/YYYY)datum
(字符串,可选) - 要使用的基准(MLLW、MSL 等)units
(字符串,可选) - 使用的单位(“英制”或“公制”)time_zone
(字符串,可选) - 时区 (gmt、lst、lst_ldt)interval
(字符串,可选) - 间隔(hilo、hl、h 或分钟数)format
(字符串,可选)- 输出格式(json、xml、csv)
电流
get_currents
- 获取站点的电流数据参数:
station
(字符串)- 车站 IDdate
(字符串,可选) - 检索数据的日期(“今天”、“最新”、“最近”或特定日期)begin_date
(字符串,可选) - 开始日期(YYYYMMDD 或 MM/DD/YYYY)end_date
(字符串,可选) - 结束日期(YYYYMMDD 或 MM/DD/YYYY)bin
(数字,可选)- 箱号units
(字符串,可选) - 使用的单位(“英制”或“公制”)time_zone
(字符串,可选) - 时区 (gmt、lst、lst_ldt)format
(字符串,可选)- 输出格式(json、xml、csv)
当前预测
get_current_predictions
- 获取当前预测参数:
station
(字符串)- 车站 IDdate
(字符串,可选) - 检索数据的日期(“今天”、“最新”、“最近”或特定日期)begin_date
(字符串,可选) - 开始日期(YYYYMMDD 或 MM/DD/YYYY)end_date
(字符串,可选) - 结束日期(YYYYMMDD 或 MM/DD/YYYY)bin
(数字,可选)- 箱号interval
(字符串,可选) - 间隔(MAX_SLACK 或分钟数)vel_type
(字符串,可选) - 速度类型 (speed_dir 或默认)units
(字符串,可选) - 使用的单位(“英制”或“公制”)time_zone
(字符串,可选) - 时区 (gmt、lst、lst_ldt)format
(字符串,可选)- 输出格式(json、xml、csv)
气象数据
get_meteorological_data
- 获取气象数据参数:
station
(字符串)- 车站 IDproduct
(字符串) - 产品(气温、风等)date
(字符串,可选) - 检索数据的日期(“今天”、“最新”、“最近”或特定日期)begin_date
(字符串,可选) - 开始日期(YYYYMMDD 或 MM/DD/YYYY)end_date
(字符串,可选) - 结束日期(YYYYMMDD 或 MM/DD/YYYY)units
(字符串,可选) - 使用的单位(“英制”或“公制”)time_zone
(字符串,可选) - 时区 (gmt、lst、lst_ldt)format
(字符串,可选)- 输出格式(json、xml、csv)
车站信息
get_stations
- 获取车站列表参数:
type
(字符串,可选) - 站点类型(水位、水流等)units
(字符串,可选) - 使用的单位(“英制”或“公制”)format
(字符串,可选)- 输出格式(json,xml)
get_station_details
- 获取有关车站的详细信息参数:
station
(字符串)- 车站 IDunits
(字符串,可选) - 使用的单位(“英制”或“公制”)format
(字符串,可选)- 输出格式(json,xml)
月相信息
get_moon_phase
- 获取特定日期的月相信息参数:
date
(字符串,可选)- 获取月相的日期(格式为 YYYY-MM-DD)。默认为当前日期。latitude
(数字,可选) - 用于特定位置计算的纬度longitude
(数字,可选) - 用于特定位置计算的经度format
(字符串,可选)- 输出格式(json 或文本)
get_moon_phases_range
- 获取某个日期范围内的月相信息参数:
start_date
(字符串) - 开始日期(YYYY-MM-DD 格式)end_date
(字符串) - 结束日期(YYYY-MM-DD 格式)latitude
(数字,可选) - 用于特定位置计算的纬度longitude
(数字,可选) - 用于特定位置计算的经度format
(字符串,可选)- 输出格式(json 或文本)
get_next_moon_phase
- 获取特定月相的下一次出现参数:
phase
(字符串) - 要查找的月相(新月、上弦月、满月、下弦月)date
(字符串,可选)- 开始日期(格式为 YYYY-MM-DD)。默认为当前日期。count
(数字,可选)- 返回的次数。默认为 1。format
(字符串,可选)- 输出格式(json 或文本)
日出/日落信息
get_sun_times
- 获取特定日期和地点的日出/日落时间以及其他太阳事件时间参数:
date
(字符串,可选)- 获取日照时间的日期(格式为 YYYY-MM-DD)。默认为当前日期。latitude
(数字)- 用于特定位置计算的纬度longitude
(数字)- 用于特定位置计算的经度format
(字符串,可选)- 输出格式(json 或文本)timezone
(字符串,可选)- 结果的时区。默认为 UTC。
get_sun_times_range
- 获取特定日期范围和位置的日出/日落时间以及其他太阳事件时间参数:
start_date
(字符串) - 开始日期(YYYY-MM-DD 格式)end_date
(字符串) - 结束日期(YYYY-MM-DD 格式)latitude
(数字)- 用于特定位置计算的纬度longitude
(数字)- 用于特定位置计算的经度format
(字符串,可选)- 输出格式(json 或文本)timezone
(字符串,可选)- 结果的时区。默认为 UTC。
get_sun_position
- 获取特定日期、时间和地点的太阳位置信息参数:
date
(字符串,可选)- 获取太阳位置的日期(格式为 YYYY-MM-DD)。默认为当前日期。time
(字符串,可选)- 获取太阳位置的时间(HH:MM:SS 格式)。默认为当前时间。latitude
(数字)- 用于特定位置计算的纬度longitude
(数字)- 用于特定位置计算的经度format
(字符串,可选)- 输出格式(json 或文本)
get_next_sun_event
- 获取特定太阳事件的下一次发生参数:
event
(字符串) - 要查找的太阳事件(日出、日落、黎明、黄昏、太阳正午等)date
(字符串,可选)- 开始日期(格式为 YYYY-MM-DD)。默认为当前日期。latitude
(数字)- 用于特定位置计算的纬度longitude
(数字)- 用于特定位置计算的经度count
(数字,可选)- 返回的次数。默认为 1。format
(字符串,可选)- 输出格式(json 或文本)timezone
(字符串,可选)- 结果的时区。默认为 UTC。
API 文档
NOAA 潮汐和洋流 API 文档可在以下位置找到:
CO-OPS 数据 API: https://api.tidesandcurrents.noaa.gov/api/prod/
CO-OPS 元数据 API: https://api.tidesandcurrents.noaa.gov/mdapi/prod/
CO-OPS 衍生产品 API: https://api.tidesandcurrents.noaa.gov/dpapi/prod/
执照
麻省理工学院
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
该服务器提供与 NOAA 潮汐和洋流 API 交互的工具,可以访问水位数据、潮汐预测、洋流数据、站点信息以及月相和太阳时间等天文信息。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityThis is an MCP (Model Context Protocol) server that provides tools for interacting with the NOAA Tides and Currents API.Last updated -2444MIT License
- AsecurityAlicenseAqualityFetches tide information for any location using latitude and longitude, providing detailed tide data including high/low tides and station information with automatic UTC time zone handling.Last updated -115MIT License
- -securityFlicense-qualityA standardized API server that enables AI agents and client applications to fetch current weather information for any location without directly interacting with external weather APIs.Last updated -
- AsecurityFlicenseAqualityProvides tools to fetch real-time weather data from the National Weather Service API, allowing users to retrieve weather alerts by state and detailed forecasts by coordinates.Last updated -2126