Noaa Cdo Mcp Server

io.github.cyanheads由 GitHub 账号 cyanheads 发布v0.1.15更新于 Oct 24, 2026

Search NOAA CDO stations and datasets, fetch historical weather observations.

已验证Streamable HTTP可网页运行位置与生活数据与分析

概览

AI 生成的概览

向助手提供 NOAA 气候数据:检索 CDO 数据集、地点与气象站,获取历史观测、风暴事件及十亿美元级灾害记录。

可以做什么
  • 浏览 CDO 数据集、数据类别、数据类型与地点类别
  • 按类别、名称、边界框、数据集或数据类型查找地点和气象站
  • 按 ID 读取气象站元数据
  • 按数据集、站点、地点和日期范围获取历史观测记录,可选公制或英制单位
  • 按年份检索 NCEI 风暴事件数据库,含损失、伤亡与事件叙述
  • 查询 1980–2024 年十亿美元级灾害档案,可逐条列出或按年份汇总
适用场景
适合需要美国历史天气与气候事实的场景:站点级气温、降水或风速记录,强天气事件详情,或灾害损失数据。适用于研究、报告和数据探索,而非实时天气预报。
运行要求
可使用公开托管的 Streamable HTTP 端点,或通过 bunx、npx、Docker 在本地运行;需 Bun 1.4.0 以上或 Node.js 24 以上。CDO 请求需要免费的 NOAA CDO API 令牌,通过 NOAA_CDO_TOKEN 提供;风暴事件与十亿美元级灾害数据无需令牌。需能访问 NOAA 服务。
安装前请注意
NOAA_CDO_TOKEN 凭据通过环境变量传入,须妥善保密。可选配置可启用 JWT 或 OAuth 认证、外部存储后端和 OpenTelemetry 导出,这些会把数据发送给第三方。LOG_TOOL_FAILURE_PAYLOADS 会记录失败工具调用的参数与结果,自由文本值中的密钥不会被脱敏。所有工具均为对 NOAA 数据的只读查询。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Noaa Cdo Mcp Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.cyanheads%2Fnoaa-cdo-mcp-server/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "noaa-cdo": {
      "type": "http",
      "url": "https://noaa-cdo.caseyjhand.com/mcp"
    }
  }
}

README

@cyanheads/noaa-climate-mcp-server

Search NOAA climate stations and datasets, fetch historical weather observations via MCP. STDIO or Streamable HTTP.

10 Tools • 2 Resources


Overview

Historical weather and climate records from NOAA: station observations from Climate Data Online, the Storm Events Database, and Billion-Dollar Weather and Climate Disasters. Find stations, pull observations in the units you want, and look up storm damage or disaster costs.

Tools

ToolDescription
noaa_climate_list_datasetsList available CDO datasets with IDs, names, and temporal coverage
noaa_climate_list_data_categoriesList data category groups (Temperature, Precipitation, Wind, etc.)
noaa_climate_list_data_typesList specific measurement labels (TMAX, TMIN, PRCP, SNOW, etc.) by dataset or category
noaa_climate_list_location_categoriesList the 12 location categories that scope location search
noaa_climate_find_locationsSearch geographic locations by category (states, cities, counties, zip codes, climate regions), with an optional name filter
noaa_climate_find_stationsSearch weather stations by location, bounding box, dataset, and data type
noaa_climate_get_stationFetch full metadata for a single station by ID
noaa_climate_fetch_dataFetch historical observation records for a dataset and date range
noaa_climate_search_storm_eventsSearch the NCEI Storm Events Database for one year — tornadoes, hail, floods, hurricanes, with damage, casualties, and narratives
noaa_climate_get_billion_dollar_disastersQuery NOAA's retired 1980–2024 Billion-Dollar Weather and Climate Disasters archive — CPI-adjusted costs and deaths per disaster, or per-year totals by disaster class

Resources

ResourceDescription
noaa://datasetsAll CDO datasets with IDs and temporal coverage — injectable context for orienting an agent before querying data
noaa://stations/{stationId}Station metadata by ID — name, coordinates, elevation, and data coverage date range

Capability reference

noaa_climate_list_datasets tool

  • No required inputs; optional data type, location, station, and date-range filters; limit 1–1000 (default 25) with offset, sortable by id, name, mindate, maxdate, or datacoverage
  • Returns each dataset's ID, name, and date span — GHCND (daily, 1763–present), GSOM (monthly), GSOY (annual), NORMAL_DLY/MLY/ANN/HLY (1981–2010 normals)
  • Date filters use inclusive coverage overlap: maxdate >= startDate and mindate <= endDate for each supplied bound. The complete catalog matching the other filters is retrieved before filtering and pagination; totals describe that filtered view.

noaa_climate_list_data_categories tool

  • Optional dataset, location, station, and date-range filters; limit 1–1000 (default 25) with offset, sortable by id or name
  • Returns the 42 measurement categories (Temperature, Precipitation, Wind, Pressure, Sunshine, and more), whose IDs narrow noaa_climate_list_data_types as datacategoryId

noaa_climate_list_data_types tool

  • Filter by datasetId (e.g. GHCND) or datacategoryId (e.g. TEMP); limit 1–1000 (default 25) with offset
  • Returns the datatype IDs noaa_climate_fetch_data takes — common GHCND types are TMAX, TMIN, PRCP, SNOW, SNWD, AWND — with coverage and date range when CDO carries them

noaa_climate_list_location_categories tool

  • Pagination and sort only: limit 1–1000 (default 25) with offset, sortable by id or name
  • Returns the 12 category IDs noaa_climate_find_locations accepts as locationCategoryId: CITY, ST, CNTY, CNTRY, ZIP, US_TERR, CLIM_REG, CLIM_DIV, HYD_ACC, HYD_CAT, HYD_REG, HYD_SUB

noaa_climate_find_locations tool

  • locationCategoryId scopes the search (e.g. ST returns all 51 states); optional datasetId, datacategoryId, and date-range filters; limit 1–1000 (default 25) with offset
  • Returns the location IDs noaa_climate_find_stations and noaa_climate_fetch_data take — FIPS:37, CITY:US530018, ZIP:98101
  • nameContains adds a case-insensitive name match within one category of at most 4,000 locations (every category but ZIP); it fails as name_filter_requires_category without a category and name_filter_category_too_large past the cap

noaa_climate_find_stations tool

  • Filter by locationId, extent (lat/lon bounding box), datasetId, datatypeId (array), and date range; limit 1–1000 (default 25) with offset
  • extent is minLat,minLon,maxLat,maxLon: four finite signed decimal or scientific numbers, with surrounding whitespace allowed, latitude within ±90 and longitude within ±180. Equal coordinates work; reversed axes return no matches and are forwarded unchanged, without antimeridian wrapping.
  • Returns station IDs (GHCND:USW00024233, COOP:010008), names, coordinates, elevation, and data-coverage dates — the IDs feed noaa_climate_fetch_data as stationId

noaa_climate_get_station tool

  • Single required input: stationId, from noaa_climate_find_stations; the tool form of the noaa://stations/{stationId} resource
  • Returns name, coordinates, elevation, and the full data-coverage date range; fails as not_found when a well-formed ID resolves to nothing

noaa_climate_fetch_data tool

  • Requires datasetId, startDate, endDate; optional stationId, locationId, datatypeId arrays. The span cap is 1 year for GHCND, PRECIP_15, PRECIP_HLY, NORMAL_DLY, NORMAL_HLY, NEXRAD2, NEXRAD3 and 10 years for GSOM, GSOY, NORMAL_MLY, NORMAL_ANN; any NORMAL_* dataset takes startDate=2010-01-01 / endDate=2010-12-31
  • Returns flat { date, datatype, station, value, attributes } records plus an effectiveQuery echo; date_range_exceeded names the latest maxEndDate CDO will accept
  • units: "metric" or "standard" is strongly recommended — without it, GHCND values are raw tenths-of-unit integers (e.g. TMAX=256 is 25.6°C)

noaa_climate_search_storm_events tool

  • No token required; year selects one export (1950 through the current partial year); filter by episodeId (exact digit string from a returned event; whitespace is trimmed, blank means unset, leading zeros remain significant), state (the full NCEI name, e.g. "FLORIDA"), eventType, month, startDate/endDate, and minDamageInUsd; page ceiling 100 (default 50) with offset
  • Optional startDate/endDate are real YYYY-MM-DD dates and match inclusive event-span overlap before damage accounting, totals, and pagination. One-sided, equal, and cross-year intervals work; only year selects the export. Active date bounds exclude missing, invalid, or reversed source spans; without bounds those rows remain visible. appliedDateRange echoes supplied bounds on both surfaces. Reversed request dates fail as invalid_date_range before downloading.
  • Each distinct episode narrative appears once in episodeNarratives, linked from events by episodeNarrativeRef; individual eventNarrative text stays on each event. Rendered narratives preserve literal punctuation and line breaks. Optional local ISO beginDate/endDate values can feed CDO date filters alongside the unchanged NCEI date-time and timezone fields.
  • Damage arrives as the raw magnitude-suffixed string ("1.20M") and a parsed dollar amount, omitted rather than zeroed when NCEI reported none; a zero-match response names the event types and states the year contains
  • Fails as year_unavailable when NCEI publishes no file for the year, and malformed_export when a downloaded file is not the expected table

noaa_climate_get_billion_dollar_disasters tool

  • Individual disasters by default, or summary=true for per-year counts and costs by disaster class; filter by startYear/endYear, disasterType (one of seven NCEI classes), minCostInUsd, and state (two-letter postal code); limit 1–100 (default 50) with offset
  • Every cost is whole US dollars whatever unit the export declares (echoed as declaredCostUnit); a state scope reports national costs (costBasis: "national") and binned per-year costRangeInUsd
  • NOAA retired the product after 2024; the 1980–2024 archive remains available with no later years added. coveredYears reports the span actually present in the selected export. Every successful response carries this archive notice alongside any clamp or paging guidance.
  • CPI-adjusted costs preserve the archived export’s adjustment; the server does not rebase them to current prices or infer a CPI base year.

noaa://datasets resource

  • All CDO datasets as application/json — IDs, names, temporal coverage
  • Equivalent to noaa_climate_list_datasets with no filters and a high limit — injectable, zero-fetch context

noaa://stations/{stationId} resource

  • stationId from noaa_climate_find_stations; the resource form of noaa_climate_get_station
  • Returns station metadata; fails as not_found when a well-formed ID resolves to nothing

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

NOAA-specific:

  • Full CDO API v2 coverage — datasets, data categories, data types, locations, stations, and observations — plus two separate NCEI bulk-CSV corpora requiring no token: severe-weather events (Storm Events Database) and billion-dollar disaster costs
  • Client-side date-range validation enforced per dataset before hitting the API, reporting the exact upstream limit back to the caller
  • Discovery date intervals reject startDate > endDate before any request, with validation_error and a hint to swap the values. Equal and single-ended dates remain valid; compact YYYYMMDD, unpadded dashed dates, and supported second-precision datetime forms are normalized for comparison.
  • Unit normalization via CDO's units parameter avoids raw tenths-of-unit integer confusion
  • CDO's own rejection message is recovered and surfaced — an over-long date range, malformed date, or missing parameter reports the reason CDO gave instead of a bare status line
  • Billion-Dollar Disasters costs are converted to whole US dollars from whichever unit each NCEI export declares in its own preamble, since the unit differs by export

Agent-friendly output:

  • Paginated results across every list and search tool — zero-based offset in inputs and returned metadata. Locally filtered dataset and location views synthesize metadata from the filtered results; other CDO pages preserve absent upstream metadata. Coordinates and coverage retain upstream precision; coverage text uses raw fractions labeled 0–1.
  • Positive integer read limits are clamped to the page ceiling: 1000 for CDO, 100 for Storm Events and Billion-Dollar Disasters. A notice names the requested and applied limits alongside any empty-page or exhaustion guidance; use the applied limit to advance offset. Each clamp is logged and counted as noaa.pagination.limit_clamped.
  • Station, location, and dataset IDs flow naturally between tools — find a location, find stations in it, fetch data from those stations
  • Structured error contracts with typed reason codes and recovery hints — agents branch on data, not string parsing
  • Damage and cost fields are honest about upstream gaps — an unreported NCEI figure is omitted rather than reported as a confirmed zero

Getting started

Public Hosted Instance

A public instance is available at https://noaa-climate.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:

json
{  "mcpServers": {    "noaa-climate-mcp-server": {      "type": "streamable-http",      "url": "https://noaa-climate.caseyjhand.com/mcp"    }  }}

Self-Hosted / Local

Add the following to your MCP client configuration file.

json
{  "mcpServers": {    "noaa-climate-mcp-server": {      "type": "stdio",      "command": "bunx",      "args": ["@cyanheads/noaa-climate-mcp-server@latest"],      "env": {        "MCP_TRANSPORT_TYPE": "stdio",        "MCP_LOG_LEVEL": "info",        "NOAA_CDO_TOKEN": "your-token-here"      }    }  }}

Or with npx (no Bun required):

json
{  "mcpServers": {    "noaa-climate-mcp-server": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@cyanheads/noaa-climate-mcp-server@latest"],      "env": {        "MCP_TRANSPORT_TYPE": "stdio",        "MCP_LOG_LEVEL": "info",        "NOAA_CDO_TOKEN": "your-token-here"      }    }  }}

Or with Docker:

json
{  "mcpServers": {    "noaa-climate-mcp-server": {      "type": "stdio",      "command": "docker",      "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "-e", "NOAA_CDO_TOKEN=your-token-here", "ghcr.io/cyanheads/noaa-climate-mcp-server:latest"]    }  }}

For Streamable HTTP, set the transport and start the server:

sh
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 NOAA_CDO_TOKEN=your-token-here bun run start:http# Server listens at http://localhost:3010/mcp

Prerequisites

  • Bun v1.4.0 or higher (or Node.js ≥24.0.0).
  • A free NOAA CDO API token — required for CDO requests; Storm Events and Billion-Dollar Disasters need no token.

Installation

  1. Clone the repository:
sh
git clone https://github.com/cyanheads/noaa-climate-mcp-server.git
  1. Navigate into the directory:
sh
cd noaa-climate-mcp-server
  1. Install dependencies:
sh
bun install
  1. Configure environment:
sh
cp .env.example .env# edit .env and set required vars

Configuration

Server-specific configuration uses Zod schemas in src/config/server-config.ts. The page-limit policy is validated at startup; the CDO token is required when a CDO request runs. Key environment variables:

VariableDescriptionDefault
NOAA_CDO_TOKENRequired for CDO. Obtain free at ncdc.noaa.gov/cdo-web/token; the two bulk corpora need no token—
NOAA_CLAMP_LIMITStrue clamps positive integer read limits to the page ceiling; false restores schema rejection above it. Only the exact strings true and false are accepted; other nonempty values fail startup. Restart after changing this setting.true
MCP_TRANSPORT_TYPETransport: stdio or httpstdio
MCP_HTTP_PORTHTTP server port3010
MCP_HTTP_ENDPOINT_PATHHTTP endpoint path where the MCP server is mounted/mcp
MCP_SESSION_MODEHTTP session posture: stateful, stateless, or auto. Ships as stateless — no tool asks the caller for input mid-handlerstateless
MCP_PUBLIC_URLPublic origin override for TLS-terminating reverse-proxy deploymentsnone
MCP_AUTH_MODEAuthentication: none, jwt, or oauthnone
MCP_LOG_LEVELLog level (debug, info, warning, error, etc.)info
MCP_GC_PRESSURE_INTERVAL_MSOpt-in Bun-only forced-GC pressure loop (ms). Try 60000 if heap growth is observed under sustained HTTP load.0 (disabled)
STORAGE_PROVIDER_TYPEStorage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1in-memory
OTEL_ENABLEDEnable OpenTelemetryfalse
OTEL_EXPORTER_OTLP_ENDPOINTOTLP base URL; traces go to /v1/traces and metrics to /v1/metrics. Nothing is exported without itnone
LOG_TOOL_FAILURE_PAYLOADSLog each failed tool call's arguments and result, redacted by key name and capped at LOG_TOOL_FAILURE_PAYLOAD_MAX_BYTES (default 16384). A secret inside a free-form value is not redacted.false

See .env.example for the full list of optional overrides.

Running the server

Local development

  • Build and run the production version:

    sh
    # One-time buildbun run rebuild
    # Run the built serverbun run start:http# orbun run start:stdio
  • Run checks and tests:

    sh
    bun run devcheck  # Lints, formats, type-checks, and morebun run test      # Runs the test suitebun run test:live # Opt-in: resolves every documented example identifier against the live CDO API

Docker

sh
docker build -t noaa-climate-mcp-server .docker run --rm -e NOAA_CDO_TOKEN=your-token-here -p 3010:3010 noaa-climate-mcp-server

The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/noaa-climate-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.

Project structure

DirectoryPurpose
src/mcp-server/toolsTool definitions (*.tool.ts). Ten tools across datasets, locations, stations, observations, storm events, and disaster costs.
src/mcp-server/resourcesResource definitions. Datasets catalog and station metadata resources.
src/services/cdoCDO HTTP client with retry, backoff, camelCase→lowercase parameter translation, and recovery of CDO's own rejection message.
src/services/csvIncremental RFC 4180 CSV reader shared by the two NCEI bulk-CSV corpora.
src/services/storm-eventsNCEI Storm Events bulk-CSV client — filename discovery, streamed decompression, damage parsing.
src/services/billion-dollar-disastersNCEI Billion-Dollar Disasters client — declared-unit resolution and conversion to whole US dollars.
src/configServer-specific environment variable parsing and validation with Zod.
tests/Unit and integration tests, mirroring the src/ structure.

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for logging, ctx.state for storage
  • Register new tools and resources in the createApp() arrays
  • Wrap external API calls as validate raw → normalize to domain types → return the output schema; never fabricate missing fields

Contributing

Issues are welcome. Run checks and tests before submitting:

sh
bun run devcheckbun run test

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

来源:README.md,提交 9232b01

工具

0
SourceWeft 尚未读取此服务器的工具。

版本历史

1
  1. v0.1.15最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式必需10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分