{
  "markdown": "<div align=\"center\">\n  <h1>@cyanheads/noaa-climate-mcp-server</h1>\n  <p><b>Search NOAA climate stations and datasets, fetch historical weather observations via MCP. STDIO or Streamable HTTP.</b>\n  <div>10 Tools • 2 Resources</div>\n  </p>\n</div>\n\n<div align=\"center\">\n\n[![Version](https://img.shields.io/badge/Version-0.6.2-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/noaa-climate-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/noaa-climate-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/noaa-climate-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.0-blueviolet.svg?style=flat-square)](https://bun.sh/)\n\n</div>\n\n<div align=\"center\">\n\n[![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge&logo=anthropic&logoColor=white)](https://github.com/cyanheads/noaa-climate-mcp-server/releases/latest/download/noaa-climate-mcp-server.mcpb) [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=noaa-climate-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvbm9hYS1jbGltYXRlLW1jcC1zZXJ2ZXIiXSwiZW52Ijp7Ik5PQUFfQ0RPX1RPS0VOIjoieW91ci10b2tlbi1oZXJlIn19) [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22noaa-climate-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Fnoaa-climate-mcp-server%22%5D%2C%22env%22%3A%7B%22NOAA_CDO_TOKEN%22%3A%22your-token-here%22%7D%7D)\n\n[![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)\n\n</div>\n\n<div align=\"center\">\n\n**Public Hosted Server:** [https://noaa-climate.caseyjhand.com/mcp](https://noaa-climate.caseyjhand.com/mcp)\n\n</div>\n\n---\n\n## Tools\n\n10 tools — 8 over the NOAA Climate Data Online (CDO) API v2, plus two over separate NCEI bulk-CSV corpora: severe-weather event search over the Storm Events Database, and disaster costs over Billion-Dollar Weather and Climate Disasters:\n\n| Tool | Description |\n|:---|:---|\n| `noaa_climate_list_datasets` | List available CDO datasets with IDs, names, and temporal coverage |\n| `noaa_climate_list_data_categories` | List data category groups (Temperature, Precipitation, Wind, etc.) |\n| `noaa_climate_list_data_types` | List specific measurement labels (TMAX, TMIN, PRCP, SNOW, etc.) by dataset or category |\n| `noaa_climate_list_location_categories` | List the 12 location categories that scope location search |\n| `noaa_climate_find_locations` | Search geographic locations by category (states, cities, counties, zip codes, climate regions), with an optional name filter |\n| `noaa_climate_find_stations` | Search weather stations by location, bounding box, dataset, and data type |\n| `noaa_climate_get_station` | Fetch full metadata for a single station by ID |\n| `noaa_climate_fetch_data` | Fetch historical observation records for a dataset and date range |\n| `noaa_climate_search_storm_events` | Search the NCEI Storm Events Database for one year — tornadoes, hail, floods, hurricanes, with damage, casualties, and narratives |\n| `noaa_climate_get_billion_dollar_disasters` | Query NOAA's Billion-Dollar Weather and Climate Disasters — CPI-adjusted costs and deaths per disaster, or per-year totals by disaster class |\n\n### `noaa_climate_list_datasets`\n\nList all available NOAA CDO datasets — approximately 11 in total.\n\n- Returns dataset IDs, names, data coverage fraction, and temporal range\n- No required parameters — returns everything by default\n- Optionally filter by data type, location, station, or date range\n- Common datasets: GHCND (daily, 1763–present), GSOM (monthly), GSOY (annual), NORMAL_DLY/MLY/ANN/HLY (1981–2010 climate normals)\n- Start here to orient before calling `noaa_climate_fetch_data`\n\n---\n\n### `noaa_climate_list_data_categories`\n\nList data category groups that organize related measurement types.\n\n- ~41 categories including Temperature, Precipitation, Wind, Pressure, Sunshine, Sky cover, Weather Type\n- Optionally filter by dataset, location, station, or date range\n- Use before `noaa_climate_list_data_types` to narrow by measurement domain\n\n---\n\n### `noaa_climate_list_data_types`\n\nList specific measurement labels for a dataset or category.\n\n- Hundreds of data types across all datasets\n- Filter by dataset (e.g., `GHCND`) or category (e.g., `TEMP`) to narrow results\n- Common GHCND types: `TMAX` (max temperature), `TMIN` (min temperature), `PRCP` (precipitation), `SNOW` (snowfall), `SNWD` (snow depth), `AWND` (average wind speed)\n- Returns ID, name, coverage fraction, and date range per type\n\n---\n\n### `noaa_climate_list_location_categories`\n\nList the location categories that scope `noaa_climate_find_locations` — 12 in total.\n\n- Returns category IDs (`CITY`, `ST`, `CNTY`, `CNTRY`, `ZIP`, `US_TERR`, `CLIM_REG`, `CLIM_DIV`, `HYD_ACC`, `HYD_CAT`, `HYD_REG`, `HYD_SUB`) and their names\n- Call it when you do not know which `locationCategoryId` to pass\n- Pagination and sort only — the CDO endpoint ignores dataset, location, station, and date filters, so none are offered\n\n---\n\n### `noaa_climate_find_locations`\n\nSearch geographic locations by category.\n\n- Category types: `ST` (US states, 51), `CNTY` (counties), `CITY` (cities), `CNTRY` (countries), `ZIP` (zip codes), `US_TERR` (US territories), `CLIM_REG` (NOAA climate regions), `CLIM_DIV` (climate divisions), hydrological categories — `noaa_climate_list_location_categories` returns the authoritative set\n- Use `locationCategoryId=ST` to list all states in one call\n- `nameContains` gives the name search the CDO API lacks: the server enumerates the requested category and matches the substring case-insensitively, so `locationCategoryId=CITY` with `nameContains=seattle` resolves a city in one call. It is a size rule, not a category list — the category must hold at most 4,000 locations, which is every category but `ZIP` (30,415), and a `datasetId` or `datacategoryId` filter can bring a larger one back under the limit. Past it, page alphabetically with `sortField=name`\n- Returns location IDs (`FIPS:37`, `CITY:US530018`, `ZIP:98101`) used in station search and data queries\n\n---\n\n### `noaa_climate_find_stations`\n\nSearch weather observation stations.\n\n- Filter by location ID, bounding box (lat/lon), dataset, data type, and date range\n- Returns station IDs, names, coordinates, elevation, and data coverage dates\n- A station must have data for the dataset and date range you want — pass `datasetId` and date range to ensure compatibility\n- Common station ID formats: `GHCND:USW00024233`, `COOP:010008`\n- Station IDs returned here feed directly into `noaa_climate_fetch_data`\n\n---\n\n### `noaa_climate_get_station`\n\nFetch full metadata for a single weather station by ID.\n\n- Returns name, coordinates (decimal degrees), elevation, and full data coverage date range\n- Use to verify a station before querying data, or to check its temporal coverage\n- Mirrors the `noaa://stations/{stationId}` resource as a direct lookup\n\n---\n\n### `noaa_climate_fetch_data`\n\nFetch historical observation records from a NOAA CDO dataset.\n\n- Requires `datasetId`, `startDate`, and `endDate`; optionally scoped by station, location, and data type\n- **Date range limits:** sub-daily, daily, and radar datasets (GHCND, PRECIP_15, PRECIP_HLY, NORMAL_DLY, NORMAL_HLY, NEXRAD2, NEXRAD3) — 1 year max per request; monthly and annual datasets (GSOM, GSOY, NORMAL_MLY, NORMAL_ANN) — 10 years max\n- **Unit selection:** strongly recommended — pass `units=metric` (SI) or `units=standard` (Fahrenheit/inches). Without it, GHCND values are raw tenths-of-unit integers (TMAX=256 = 25.6°C, PRCP=12 = 1.2mm); GSOM/GSOY are already scaled\n- **Climate normals:** for any NORMAL_* dataset, use `startDate=2010-01-01` and `endDate=2010-12-31` — that is the API proxy year regardless of which 30-year period is described\n- Returns flat tuples of `{ date, datatype, station, value, attributes }` with pagination metadata\n\n---\n\n### `noaa_climate_search_storm_events`\n\nSearch the NCEI Storm Events Database — a different NOAA corpus from the CDO tools above.\n\n- Discrete severe-weather events (tornado, hail, flood, hurricane, winter storm, heat, and every other NWS Storm Data type) rather than station observations, back to 1950\n- Returns event type, state and county/zone, begin and end times, magnitude, tornado F/EF scale with track length and width, direct and indirect deaths and injuries, property and crop damage, and the episode and event narratives\n- **No token required** — this corpus is published as bulk CSV, not through CDO, so `NOAA_CDO_TOKEN` is irrelevant to this tool\n- **`year` is required.** NCEI publishes one gzip file per year (~12 MB, ~70k events for a recent year), so an unscoped search would download every year back to 1950\n- **`state` takes the full name NCEI writes** — `\"FLORIDA\"`, not `\"FL\"`. `eventType` is matched case-insensitively against the exact NWS label (`\"Tornado\"`, `\"Flash Flood\"`, `\"Hurricane (Typhoon)\"`); a miss comes back with the labels that year actually contains\n- **Damage is honest about what NCEI reported.** Values arrive as magnitude-suffixed strings (`\"75.00K\"`, `\"1.20M\"`, `\"1.00B\"`) and are returned as both the raw cell and a parsed dollar amount. An unreported figure — about a fifth of a recent year — is omitted entirely rather than reported as `0`, so it can never be read as confirmed zero damage. `minDamageInUsd` therefore excludes those rows and reports how many it dropped\n- **Filenames are discovered, never constructed.** Each year's file carries a publish-date suffix that changes when NCEI republishes it, so the tool reads the directory index every time its cache lapses\n- The server caches two years of compressed bytes for six hours — under 30 MB, since a bundle runs 12 MB for a recent year and 15 MB for the largest (2011). Each search streams the decompression, so the ~70 MB decompressed form is never materialized. That bounds what is *retained*, not peak memory: the transient chunks still cost headroom, and a cold full-year 2024 scan measured 129 MB RSS at baseline against a 269 MB peak\n\n---\n\n### `noaa_climate_get_billion_dollar_disasters`\n\nQuery NOAA/NCEI's [Billion-Dollar Weather and Climate Disasters](https://www.ncei.noaa.gov/access/billions/) — the curated record of US weather and climate disasters whose damage passed $1 billion.\n\n- Two shapes from one tool: individual disasters by default (name, class, span, CPI-adjusted and unadjusted cost, deaths), or `summary=true` for per-year counts and costs by disaster class plus an `All Disasters` total\n- Seven disaster classes, written exactly as NCEI writes them: `Drought`, `Flooding`, `Freeze`, `Severe Storm`, `Tropical Cyclone`, `Wildfire`, `Winter Storm`. `disasterType` rejects any other spelling rather than coercing it\n- **No token required** — this corpus is published as static CSV, not through CDO\n- **Every cost is in whole US dollars.** NCEI does not use one unit across these exports: the per-event file states millions, the national per-year file states billions, and a per-state per-year file states millions again. The server reads the unit each file declares in its own preamble, converts once, and reports what it read back as `declaredCostUnit`. Conflating the two would misreport by a factor of 1,000 while still looking plausible — Hurricane Helene is `78721` in a millions file, which is $78.7 billion, not $78,721 billion\n- **Coverage is whatever NCEI has finished assessing**, not the current calendar year — `coveredYears` reports the span actually present (1980–2024 as of writing). A query for this year returns nothing rather than an error\n- `startYear`/`endYear` match by overlap, so a disaster running across a New Year is returned from either side of it\n- **A `state` scope reads NCEI's per-state exports and behaves differently in two ways.** Its per-event rows are national disasters that reached that state and carry the **national** cost, never a state share — summing states double-counts, which the response says for itself with `costBasis: \"national\"`. Its per-year rows carry a binned cost range (`costRangeInUsd`) instead of the point estimate and 75/90/95% confidence bands the national export publishes\n- Not every two-letter code has an export: the 50 states, DC, PR, VI, and GU do; AS and MP do not, and a code without one fails with `unknown_state` rather than silently falling back to national totals\n\n---\n\n## Resources\n\n| Type | Name | Description |\n|:---|:---|:---|\n| Resource | `noaa://datasets` | All CDO datasets with IDs and temporal coverage — injectable context for orienting an agent before querying data |\n| Resource | `noaa://stations/{stationId}` | Station metadata by ID — name, coordinates, elevation, and data coverage date range |\n\n## Features\n\nBuilt on [`@cyanheads/mcp-ts-core`](https://github.com/cyanheads/mcp-ts-core):\n\n- Declarative tool definitions — single file per tool, framework handles registration and validation\n- Unified error handling across all tools\n- Pluggable auth (`none`, `jwt`, `oauth`)\n- Swappable storage backends: `in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2/D1`\n- Structured logging with optional OpenTelemetry tracing\n- Runs locally (stdio/HTTP) or on Cloudflare Workers from the same codebase\n\nNOAA CDO-specific:\n\n- Full CDO API v2 coverage — datasets, data categories, data types, locations, stations, and observations\n- Client-side date range validation with per-dataset limits enforced before hitting the API\n- Unit normalization via the CDO `units` parameter — avoids raw tenths-of-unit integer confusion\n- CDO's own rejection message is recovered and surfaced: an over-long date range, a malformed date, a missing parameter, and an over-large `limit` each report the reason CDO gave, instead of an identical bare status line\n- Retry with exponential backoff for transient API failures\n\nAgent-friendly output:\n\n- Paginated results across all list and search tools — `limit`, `offset`, and total count in every response\n- Station and dataset IDs flow naturally between tools — find a location, find stations in it, fetch data from those stations\n- Structured error contracts with `reason` codes and recovery hints — agents can branch on data, not string parsing\n- Dataset and station resources for injectable, zero-fetch context\n\n## Getting started\n\n### Self-Hosted / Local\n\nAdd the following to your MCP client configuration file.\n\n```json\n{\n  \"mcpServers\": {\n    \"noaa-climate-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"bunx\",\n      \"args\": [\"@cyanheads/noaa-climate-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\",\n        \"NOAA_CDO_TOKEN\": \"your-token-here\"\n      }\n    }\n  }\n}\n```\n\nOr with npx (no Bun required):\n\n```json\n{\n  \"mcpServers\": {\n    \"noaa-climate-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@cyanheads/noaa-climate-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\",\n        \"NOAA_CDO_TOKEN\": \"your-token-here\"\n      }\n    }\n  }\n}\n```\n\nOr with Docker:\n\n```json\n{\n  \"mcpServers\": {\n    \"noaa-climate-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"docker\",\n      \"args\": [\"run\", \"-i\", \"--rm\", \"-e\", \"MCP_TRANSPORT_TYPE=stdio\", \"-e\", \"NOAA_CDO_TOKEN=your-token-here\", \"ghcr.io/cyanheads/noaa-climate-mcp-server:latest\"]\n    }\n  }\n}\n```\n\nFor Streamable HTTP, set the transport and start the server:\n\n```sh\nMCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 NOAA_CDO_TOKEN=your-token-here bun run start:http\n# Server listens at http://localhost:3010/mcp\n```\n\n### Prerequisites\n\n- [Bun v1.3.0](https://bun.sh/) or higher (or Node.js ≥24.0.0).\n- A free [NOAA CDO API token](https://www.ncdc.noaa.gov/cdo-web/token) — required for all requests.\n\n### Installation\n\n1. **Clone the repository:**\n\n```sh\ngit clone https://github.com/cyanheads/noaa-climate-mcp-server.git\n```\n\n2. **Navigate into the directory:**\n\n```sh\ncd noaa-climate-mcp-server\n```\n\n3. **Install dependencies:**\n\n```sh\nbun install\n```\n\n## Configuration\n\nAll configuration is validated at startup via Zod schemas in `src/config/server-config.ts`. Key environment variables:\n\n| Variable | Description | Default |\n|:---|:---|:---|\n| `NOAA_CDO_TOKEN` | **Required.** NOAA CDO API token — obtain free at [ncdc.noaa.gov/cdo-web/token](https://www.ncdc.noaa.gov/cdo-web/token) | — |\n| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http` | `stdio` |\n| `MCP_HTTP_PORT` | HTTP server port | `3010` |\n| `MCP_HTTP_ENDPOINT_PATH` | HTTP endpoint path where the MCP server is mounted | `/mcp` |\n| `MCP_PUBLIC_URL` | Public origin override for TLS-terminating reverse-proxy deployments | none |\n| `MCP_AUTH_MODE` | Authentication: `none`, `jwt`, or `oauth` | `none` |\n| `MCP_LOG_LEVEL` | Log level (`debug`, `info`, `warning`, `error`, etc.) | `info` |\n| `MCP_GC_PRESSURE_INTERVAL_MS` | Opt-in Bun-only forced-GC pressure loop (ms). Try `60000` if heap growth is observed under sustained HTTP load. | `0` (disabled) |\n| `STORAGE_PROVIDER_TYPE` | Storage backend: `in-memory`, `filesystem`, `supabase`, `cloudflare-kv/r2/d1` | `in-memory` |\n| `OTEL_ENABLED` | Enable OpenTelemetry | `false` |\n\n## Running the server\n\n### Local development\n\n- **Build and run the production version**:\n\n  ```sh\n  # One-time build\n  bun run rebuild\n\n  # Run the built server\n  bun run start:http\n  # or\n  bun run start:stdio\n  ```\n\n- **Run checks and tests**:\n  ```sh\n  bun run devcheck  # Lints, formats, type-checks, and more\n  bun run test      # Runs the test suite\n  bun run test:live # Opt-in: resolves every documented example identifier against the live CDO API\n  ```\n\n## Project structure\n\n| Directory | Purpose |\n|:---|:---|\n| `src/mcp-server/tools` | Tool definitions (`*.tool.ts`). Ten tools across datasets, locations, stations, observations, storm events, and disaster costs. |\n| `src/mcp-server/resources` | Resource definitions. Datasets catalog and station metadata resources. |\n| `src/services/cdo` | CDO HTTP client with retry, backoff, camelCase→lowercase parameter translation, and recovery of CDO's own rejection message. |\n| `src/services/csv` | Incremental RFC 4180 CSV reader shared by the two NCEI bulk-CSV corpora. |\n| `src/services/storm-events` | NCEI Storm Events bulk-CSV client — filename discovery, streamed decompression, damage parsing. |\n| `src/services/billion-dollar-disasters` | NCEI Billion-Dollar Disasters client — declared-unit resolution and conversion to whole US dollars. |\n| `src/config` | Server-specific environment variable parsing and validation with Zod. |\n| `tests/` | Unit and integration tests, mirroring the `src/` structure. |\n\n## Development guide\n\nSee [`CLAUDE.md`](./CLAUDE.md) for development guidelines and architectural rules. The short version:\n\n- Handlers throw, framework catches — no `try/catch` in tool logic\n- Use `ctx.log` for logging, `ctx.state` for storage\n- Register new tools and resources in the `createApp()` arrays\n- Wrap external API calls as validate raw → normalize to domain types → return the output schema; never fabricate missing fields\n\n## Contributing\n\nIssues and pull requests are welcome. Run checks and tests before submitting:\n\n```sh\nbun run devcheck\nbun run test\n```\n\n## License\n\nThis project is licensed under the Apache 2.0 License. See the [LICENSE](./LICENSE) file for details.\n",
  "bytes": 20109,
  "sha": "5ed23c0b2d84f09af69ee518d23650fd307c557a350aa64e76d9102e1fa606a9",
  "repo_slug": "cyanheads/noaa-climate-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_cyanheads_noaa_climate_mcp_ser_91669239/readme"
}