noaa-tidesandcurrents-mcp

noaa-tidesandcurrents-mcp

这是一个 MCP (模型上下文协议) 服务器,它提供与 NOAA 潮汐和洋流 API 交互的工具。

研究与数据
位置服务
TypeScript
访问服务器

Tools

get_water_levels

Get water level data for a station

get_tide_predictions

Get tide prediction data

get_currents

Get currents data for a station

get_current_predictions

Get current predictions

get_meteorological_data

Get meteorological data

get_stations

Get list of stations

get_station_details

Get detailed information about a station

README

NOAA 潮汐和洋流 MCP 服务器

smithery badge

这是一个 MCP (模型上下文协议) 服务器,它使用 FastMCP 框架提供与 NOAA 潮汐和洋流 API 交互的工具。

特性

  • 水位数据检索(实时和历史)
  • 潮汐预测(高/低或基于间隔)
  • 洋流数据(实时和历史)
  • 洋流预测
  • 站点元数据检索
  • 风、气温、水温和其他气象数据
  • 月相信息(过去、现在和未来)
  • 日出/日落和位置数据(过去、现在和未来)

前提条件

  • Node.js (v18 或更高版本)
  • npm 或 yarn

安装

通过 Smithery 安装

要通过 Smithery 为 Claude Desktop 自动安装 NOAA 潮汐和洋流:

npx -y @smithery/cli install @RyanCardin15/tidesandcurrents --client claude

手动安装

  1. 克隆此仓库
  2. 安装依赖项
npm install
  1. 基于 .env.example 文件创建一个 .env 文件:
# 服务器配置
PORT=3000

# 传输类型 (stdio 或 sse)
TRANSPORT_TYPE=stdio

# 用于标识的 NOAA API 应用程序名称(推荐)
APPLICATION_NAME=YourAppName
  1. 构建 TypeScript 代码
npm run build
  1. 启动服务器
npm start

用法

此 MCP 服务器可以与任何 MCP 主机一起使用,例如 Claude Desktop,它允许您通过 MCP 协议使用 NOAA 潮汐和洋流 API。

您也可以使用 fastmcp 命令行工具直接测试它:

npx fastmcp dev dist/index.js

或者,您可以使用 MCP Inspector:

npx fastmcp inspect dist/index.js

可用工具

水位

  • get_water_levels - 获取站点的水位数据
    • 参数:
      • station (string) - 站点 ID
      • date (string, optional) - 要检索数据的日期("today"、"latest"、"recent" 或特定日期)
      • begin_date (string, optional) - 开始日期 (YYYYMMDD 或 MM/DD/YYYY)
      • end_date (string, optional) - 结束日期 (YYYYMMDD 或 MM/DD/YYYY)
      • range (number, optional) - 要检索数据的小时数
      • datum (string, optional) - 要使用的基准面(MLLW、MSL 等)
      • units (string, optional) - 要使用的单位("english" 或 "metric")
      • time_zone (string, optional) - 时区 (gmt, lst, lst_ldt)
      • format (string, optional) - 输出格式 (json, xml, csv)

潮汐预测

  • get_tide_predictions - 获取潮汐预测数据
    • 参数:
      • station (string) - 站点 ID
      • begin_date (string) - 开始日期 (YYYYMMDD 或 MM/DD/YYYY)
      • end_date (string) - 结束日期 (YYYYMMDD 或 MM/DD/YYYY)
      • datum (string, optional) - 要使用的基准面(MLLW、MSL 等)
      • units (string, optional) - 要使用的单位("english" 或 "metric")
      • time_zone (string, optional) - 时区 (gmt, lst, lst_ldt)
      • interval (string, optional) - 间隔 (hilo, hl, h, 或分钟数)
      • format (string, optional) - 输出格式 (json, xml, csv)

洋流

  • get_currents - 获取站点的洋流数据
    • 参数:
      • station (string) - 站点 ID
      • date (string, optional) - 要检索数据的日期("today"、"latest"、"recent" 或特定日期)
      • begin_date (string, optional) - 开始日期 (YYYYMMDD 或 MM/DD/YYYY)
      • end_date (string, optional) - 结束日期 (YYYYMMDD 或 MM/DD/YYYY)
      • bin (number, optional) - Bin 编号
      • units (string, optional) - 要使用的单位("english" 或 "metric")
      • time_zone (string, optional) - 时区 (gmt, lst, lst_ldt)
      • format (string, optional) - 输出格式 (json, xml, csv)

洋流预测

  • get_current_predictions - 获取洋流预测
    • 参数:
      • station (string) - 站点 ID
      • date (string, optional) - 要检索数据的日期("today"、"latest"、"recent" 或特定日期)
      • begin_date (string, optional) - 开始日期 (YYYYMMDD 或 MM/DD/YYYY)
      • end_date (string, optional) - 结束日期 (YYYYMMDD 或 MM/DD/YYYY)
      • bin (number, optional) - Bin 编号
      • interval (string, optional) - 间隔 (MAX_SLACK 或分钟数)
      • vel_type (string, optional) - 速度类型 (speed_dir 或 default)
      • units (string, optional) - 要使用的单位("english" 或 "metric")
      • time_zone (string, optional) - 时区 (gmt, lst, lst_ldt)
      • format (string, optional) - 输出格式 (json, xml, csv)

气象数据

  • get_meteorological_data - 获取气象数据
    • 参数:
      • station (string) - 站点 ID
      • product (string) - 产品 (air_temperature, wind, 等)
      • date (string, optional) - 要检索数据的日期("today"、"latest"、"recent" 或特定日期)
      • begin_date (string, optional) - 开始日期 (YYYYMMDD 或 MM/DD/YYYY)
      • end_date (string, optional) - 结束日期 (YYYYMMDD 或 MM/DD/YYYY)
      • units (string, optional) - 要使用的单位("english" 或 "metric")
      • time_zone (string, optional) - 时区 (gmt, lst, lst_ldt)
      • format (string, optional) - 输出格式 (json, xml, csv)

站点信息

  • get_stations - 获取站点列表

    • 参数:
      • type (string, optional) - 站点类型 (waterlevels, currents, 等)
      • units (string, optional) - 要使用的单位("english" 或 "metric")
      • format (string, optional) - 输出格式 (json, xml)
  • get_station_details - 获取有关站点的详细信息

    • 参数:
      • station (string) - 站点 ID
      • units (string, optional) - 要使用的单位("english" 或 "metric")
      • format (string, optional) - 输出格式 (json, xml)

月相信息

  • get_moon_phase - 获取特定日期的月相信息

    • 参数:
      • date (string, optional) - 获取月相的日期 (YYYY-MM-DD 格式)。 默认为当前日期。
      • latitude (number, optional) - 用于特定位置计算的纬度
      • longitude (number, optional) - 用于特定位置计算的经度
      • format (string, optional) - 输出格式 (json 或 text)
  • get_moon_phases_range - 获取日期范围内的月相信息

    • 参数:
      • start_date (string) - 开始日期 (YYYY-MM-DD 格式)
      • end_date (string) - 结束日期 (YYYY-MM-DD 格式)
      • latitude (number, optional) - 用于特定位置计算的纬度
      • longitude (number, optional) - 用于特定位置计算的经度
      • format (string, optional) - 输出格式 (json 或 text)
  • get_next_moon_phase - 获取特定月相的下一次出现

    • 参数:
      • phase (string) - 要查找的月相 (New Moon, First Quarter, Full Moon, Last Quarter)
      • date (string, optional) - 开始日期 (YYYY-MM-DD 格式)。 默认为当前日期。
      • count (number, optional) - 要返回的出现次数。 默认为 1。
      • format (string, optional) - 输出格式 (json 或 text)

日出/日落信息

  • get_sun_times - 获取特定日期和位置的日出/日落和其他太阳事件时间

    • 参数:
      • date (string, optional) - 获取太阳时间的日期 (YYYY-MM-DD 格式)。 默认为当前日期。
      • latitude (number) - 用于特定位置计算的纬度
      • longitude (number) - 用于特定位置计算的经度
      • format (string, optional) - 输出格式 (json 或 text)
      • timezone (string, optional) - 结果的时区。 默认为 UTC。
  • get_sun_times_range - 获取日期范围和位置的日出/日落和其他太阳事件时间

    • 参数:
      • start_date (string) - 开始日期 (YYYY-MM-DD 格式)
      • end_date (string) - 结束日期 (YYYY-MM-DD 格式)
      • latitude (number) - 用于特定位置计算的纬度
      • longitude (number) - 用于特定位置计算的经度
      • format (string, optional) - 输出格式 (json 或 text)
      • timezone (string, optional) - 结果的时区。 默认为 UTC。
  • get_sun_position - 获取特定日期、时间和位置的太阳位置信息

    • 参数:
      • date (string, optional) - 获取太阳位置的日期 (YYYY-MM-DD 格式)。 默认为当前日期。
      • time (string, optional) - 获取太阳位置的时间 (HH:MM:SS 格式)。 默认为当前时间。
      • latitude (number) - 用于特定位置计算的纬度
      • longitude (number) - 用于特定位置计算的经度
      • format (string, optional) - 输出格式 (json 或 text)
  • get_next_sun_event - 获取特定太阳事件的下一次出现

    • 参数:
      • event (string) - 要查找的太阳事件 (sunrise, sunset, dawn, dusk, solarNoon, 等)
      • date (string, optional) - 开始日期 (YYYY-MM-DD 格式)。 默认为当前日期。
      • latitude (number) - 用于特定位置计算的纬度
      • longitude (number) - 用于特定位置计算的经度
      • count (number, optional) - 要返回的出现次数。 默认为 1。
      • format (string, optional) - 输出格式 (json 或 text)
      • timezone (string, optional) - 结果的时区。 默认为 UTC。

API 文档

NOAA 潮汐和洋流 API 文档可以在以下位置找到:

  • CO-OPS Data API: https://api.tidesandcurrents.noaa.gov/api/prod/
  • CO-OPS Metadata API: https://api.tidesandcurrents.noaa.gov/mdapi/prod/
  • CO-OPS Derived Product API: https://api.tidesandcurrents.noaa.gov/dpapi/prod/

关于 FastMCP

FastMCP 是一个 TypeScript 框架,用于构建能够处理客户端会话的 MCP 服务器。 它提供:

  • 简单的工具、资源、提示定义
  • 会话
  • 图像内容
  • 日志记录
  • 错误处理
  • SSE
  • 进度通知
  • 类型化的服务器事件
  • 还有更多

了解更多信息:https://github.com/punkpeye/fastmcp

许可证

MIT

推荐服务器

Baidu Map

Baidu Map

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

官方
精选
JavaScript
Audiense Insights MCP Server

Audiense Insights MCP Server

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

官方
精选
本地
TypeScript
graphlit-mcp-server

graphlit-mcp-server

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

官方
精选
TypeScript
Playwright MCP Server

Playwright MCP Server

提供一个利用模型上下文协议的服务器,以实现类人浏览器的自动化,该服务器使用 Playwright,允许控制浏览器行为,例如导航、元素交互和滚动。

精选
本地
TypeScript
Apple MCP Server

Apple MCP Server

通过 MCP 协议与 Apple 应用(如“信息”、“备忘录”和“通讯录”)进行交互,从而使用自然语言发送消息、搜索和打开应用内容。

精选
本地
TypeScript
contentful-mcp

contentful-mcp

在你的 Contentful Space 中更新、创建、删除内容、内容模型和资源。

精选
TypeScript
serper-search-scrape-mcp-server

serper-search-scrape-mcp-server

这个 Serper MCP 服务器支持搜索和网页抓取,并且支持 Serper API 引入的所有最新参数,例如位置信息。

精选
TypeScript
The Verge News MCP Server

The Verge News MCP Server

提供从The Verge的RSS feed获取和搜索新闻的工具,允许用户获取今日新闻、检索过去一周的随机文章,以及在最近的Verge内容中搜索特定关键词。

精选
TypeScript
Crypto Price & Market Analysis MCP Server

Crypto Price & Market Analysis MCP Server

一个模型上下文协议 (MCP) 服务器,它使用 CoinCap API 提供全面的加密货币分析。该服务器通过一个易于使用的界面提供实时价格数据、市场分析和历史趋势。 (Alternative, slightly more formal and technical translation): 一个模型上下文协议 (MCP) 服务器,利用 CoinCap API 提供全面的加密货币分析服务。该服务器通过用户友好的界面,提供实时价格数据、市场分析以及历史趋势数据。

精选
TypeScript
MCP Server Trello

MCP Server Trello

通过 Trello API 促进与 Trello 看板的交互,提供速率限制、类型安全、输入验证和错误处理等功能,以实现对卡片、列表和看板活动的无缝管理。

精选
TypeScript