{
  "markdown": "<div align=\"center\">\n  <h1>@cyanheads/noaa-spaceweather-mcp-server</h1>\n  <p><b>Query NOAA SWPC space weather: geomagnetic storm scales, Kp index, aurora forecasts, solar wind, solar activity, and alerts via MCP. STDIO or Streamable HTTP.</b>\n  <div>6 Tools</div>\n  </p>\n</div>\n\n<div align=\"center\">\n\n[![Version](https://img.shields.io/badge/Version-0.1.12-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-spaceweather-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-spaceweather-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/noaa-spaceweather-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.4.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-spaceweather-mcp-server/releases/latest/download/noaa-spaceweather-mcp-server.mcpb) [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=noaa-spaceweather-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvbm9hYS1zcGFjZXdlYXRoZXItbWNwLXNlcnZlciJdfQ==) [![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-spaceweather-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Fnoaa-spaceweather-mcp-server%22%5D%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-spaceweather.caseyjhand.com/mcp](https://noaa-spaceweather.caseyjhand.com/mcp)\n\n</div>\n\n---\n\n## Tools\n\nSix tools covering the full NOAA SWPC space weather surface — from a quick status heartbeat to deep solar and geomagnetic data:\n\n| Tool | Description |\n|:-----|:------------|\n| `noaa_spaceweather_get_conditions` | Current space-weather snapshot: NOAA R/S/G storm scales, latest Kp, and a plain-language status summary |\n| `noaa_spaceweather_get_kp_index` | Planetary K-index (0–9) — recent observed 3-hour values with G-scale equivalents and aurora-latitude guidance, plus 3-day forecast |\n| `noaa_spaceweather_get_aurora_forecast` | OVATION model aurora forecast: global probability grid, optional local lookup by coordinates with go/no-go verdict |\n| `noaa_spaceweather_get_solar_wind` | Real-time solar wind from the active L1 spacecraft: speed, proton density, temperature, and the critical Bz component — explains why current geomagnetic conditions exist |\n| `noaa_spaceweather_get_solar_activity` | Solar flare picture: GOES X-ray flux, 3-day flare-class probabilities, active solar regions with per-region probabilities, and solar radiation storm level |\n| `noaa_spaceweather_get_alerts` | Active SWPC alerts, watches, and warnings — structured records with product type, severity, issue time, validity window, and full message text |\n\n### `noaa_spaceweather_get_conditions`\n\nThe heartbeat tool. Use it first — it composes storm scales + current Kp into a single snapshot with a plain-language summary.\n\n- Returns today's R/S/G storm scales plus a 3-day forecast\n- Current Kp with G-scale equivalent and aurora-visibility latitude guidance\n- Plain-language summary: \"Quiet conditions\" vs. \"G2 moderate geomagnetic storm in progress\"\n- Data sourced from `noaa-scales.json` + `noaa-planetary-k-index.json`\n\n---\n\n### `noaa_spaceweather_get_kp_index`\n\nPlanetary K-index time series for geomagnetic activity tracking.\n\n- `window_days` parameter (1–7, default 1) — recent 3-hour observed values\n- Each record includes Kp value, G-scale equivalent, aurora-latitude guidance, and observation time\n- Separate 3-day forecast series with predicted Kp and NOAA G-scale labels\n\n---\n\n### `noaa_spaceweather_get_aurora_forecast`\n\nOVATION model aurora probability at 1° resolution, updated every ~5 minutes.\n\n- Without coordinates: global metadata — grid point count, global peak probability, peak region\n- With coordinates (`latitude`, `longitude`): nearest-grid-point lookup, minimum Kp required at that latitude, and a plain-language verdict (\"Good aurora chance (42%) — Kp≥6 needed at this latitude\")\n- Covers both hemispheres; coordinates are geographic (WGS84)\n\n---\n\n### `noaa_spaceweather_get_solar_wind`\n\nReal-time solar wind plasma and magnetic field from SWPC's RTSW feeds.\n\n- Reads the spacecraft SWPC flags as active; every record names its `source`, so no satellite is assumed\n- `window_hours` parameter (1–168, default 3) — sliced client-side from a feed that carries roughly the last 24 hours at 1-minute cadence\n- Reports `latestFeedPlasmaTime`, `latestFeedMagTime`, and `feedStalenessHours` so an empty window is distinguishable from a stale feed\n- Plasma: speed (km/s), proton density (n/cm³), temperature\n- Bz component (southward Bz = storm driver) surfaced prominently in output and format\n- Bt (total field magnitude) and GSM vector components\n\n---\n\n### `noaa_spaceweather_get_solar_activity`\n\nSolar flare and radiation storm picture from GOES and SWPC probabilities.\n\n- GOES primary X-ray flux in the 0.1–0.8 nm band (R-scale driver)\n- 3-day C/M/X flare-class probabilities\n- Active solar regions with per-region flare and proton probabilities when `include_regions: true` (default)\n- Solar radiation storm (S-scale) level from ≥10 MeV integral proton flux\n\n---\n\n### `noaa_spaceweather_get_alerts`\n\nActive SWPC alerts, watches, and warnings from the `products/alerts.json` feed.\n\n- Structured product metadata: type (Watch/Warning/Alert/Summary), issue time, and ISO 8601 validity window parsed from the message body (`Valid From`/`To`, `Now Valid Until`, or `Begin`/`End Time`)\n- Severity read from the NOAA scale stated in the message body (`noaaScale` e.g. `\"G1\"`, plus `level` 0–5); products stating no scale report level `0`\n- Cancellation notices flagged (`cancelled`) and excluded from the active set\n- Filtered to active-only by default (`active_only: true`); set `false` for recent history, including cancellations\n- Full raw message text preserved for downstream display\n\n---\n\n## Features\n\nBuilt on [`@cyanheads/mcp-ts-core`](https://www.npmjs.com/package/@cyanheads/mcp-ts-core):\n\n- Declarative tool definitions — single file per tool, framework handles registration and validation\n- Unified error handling — handlers throw, framework catches, classifies, and formats\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- STDIO and Streamable HTTP transports\n\nSpace weather domain:\n\n- All SWPC feeds are public and keyless — no API keys required\n- Single `SpaceWeatherService` wraps all six NOAA SWPC JSON feeds with `fetchWithTimeout` + `withRetry`\n- Heterogeneous feed normalization: interleaved multi-spacecraft records (solar wind), keyed objects (storm scales), coordinate triples (OVATION)\n- NOAA scale interpretation: raw Kp 6 → \"G2 moderate storm — aurora possible to ~55° geomagnetic latitude\"\n- Feed freshness surfaced per-response: solar wind updates ~1 min, aurora ~5 min, Kp 3-hour intervals\n\nAgent-friendly output:\n\n- Observed timestamps on every response so agents can reason about data freshness\n- Plain-language summaries and verdicts alongside raw values — agents can display or reason without re-interpreting indices\n- Bz component surfaced as a first-class field in solar wind output (southward Bz = primary storm driver)\n- Typed error contracts with recovery hints: `feed_unavailable` → \"Retry in 30–60 s\"\n\n---\n\n## Getting started\n\n### Public Hosted Instance\n\nA public instance is available at `https://noaa-spaceweather.caseyjhand.com/mcp` — no installation required. Point any MCP client at it via Streamable HTTP:\n\n```json\n{\n  \"mcpServers\": {\n    \"noaa-spaceweather-mcp-server\": {\n      \"type\": \"streamable-http\",\n      \"url\": \"https://noaa-spaceweather.caseyjhand.com/mcp\"\n    }\n  }\n}\n```\n\n### Self-Hosted / Local\n\nAdd the following to your MCP client configuration file.\n\n```json\n{\n  \"mcpServers\": {\n    \"noaa-spaceweather\": {\n      \"type\": \"stdio\",\n      \"command\": \"bunx\",\n      \"args\": [\"@cyanheads/noaa-spaceweather-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\"\n      }\n    }\n  }\n}\n```\n\nOr with npx (no Bun required):\n\n```json\n{\n  \"mcpServers\": {\n    \"noaa-spaceweather\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@cyanheads/noaa-spaceweather-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\"\n      }\n    }\n  }\n}\n```\n\nOr with Docker:\n\n```json\n{\n  \"mcpServers\": {\n    \"noaa-spaceweather\": {\n      \"type\": \"stdio\",\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\", \"-i\", \"--rm\",\n        \"-e\", \"MCP_TRANSPORT_TYPE=stdio\",\n        \"ghcr.io/cyanheads/noaa-spaceweather-mcp-server:latest\"\n      ]\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 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 v24+).\n- No API keys required — all SWPC feeds are public.\n\n### Installation\n\n1. **Clone the repository:**\n\n```sh\ngit clone https://github.com/cyanheads/noaa-spaceweather-mcp-server.git\n```\n\n2. **Navigate into the directory:**\n\n```sh\ncd noaa-spaceweather-mcp-server\n```\n\n3. **Install dependencies:**\n\n```sh\nbun install\n```\n\n4. **Configure environment:**\n\n```sh\ncp .env.example .env\n# edit .env if needed — all defaults work out of the box\n```\n\n---\n\n## Configuration\n\n| Variable | Description | Default |\n|:---------|:------------|:--------|\n| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |\n| `MCP_HTTP_PORT` | Port for HTTP server. | `3010` |\n| `MCP_HTTP_HOST` | Hostname for HTTP server. | `127.0.0.1` |\n| `MCP_HTTP_ENDPOINT_PATH` | Endpoint path. | `/mcp` |\n| `MCP_SESSION_MODE` | HTTP session mode. This project explicitly uses `stateless`; `auto` resolves to `stateful`. | `stateless` |\n| `MCP_AUTH_MODE` | Auth mode: `none`, `jwt`, or `oauth`. | `none` |\n| `MCP_LOG_LEVEL` | Log level (RFC 5424). | `info` |\n| `LOGS_DIR` | Directory for log files (Node.js only). | `<project-root>/logs` |\n| `STORAGE_PROVIDER_TYPE` | Storage backend. | `in-memory` |\n| `OTEL_ENABLED` | Enable [OpenTelemetry instrumentation](https://github.com/cyanheads/mcp-ts-core/tree/main/docs/telemetry). | `false` |\n\nNo domain-specific API keys are required. See [`.env.example`](./.env.example) for the full list of optional overrides.\n\n---\n\n## Running the server\n\n### Local development\n\n- **Build and run:**\n\n  ```sh\n  # One-time build\n  bun run rebuild\n\n  # Run the built server\n  bun run start:stdio\n  # or\n  bun run start:http\n  ```\n\n- **Run checks and tests:**\n\n  ```sh\n  bun run devcheck   # Lint, format, typecheck, security\n  bun run test       # Vitest test suite\n  bun run lint:mcp   # Validate MCP definitions against spec\n  ```\n\n### Docker\n\n```sh\ndocker build -t noaa-spaceweather-mcp-server .\ndocker run --rm -p 3010:3010 noaa-spaceweather-mcp-server\n```\n\nThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to `/var/log/noaa-spaceweather-mcp-server`. OpenTelemetry peer dependencies are installed by default — build with `--build-arg OTEL_ENABLED=false` to omit them.\n\n---\n\n## Project structure\n\n| Path | Purpose |\n|:-----|:--------|\n| `src/index.ts` | `createApp()` entry point — registers tools and inits the service. |\n| `src/services/space-weather/` | `SpaceWeatherService` — fetches and normalizes all NOAA SWPC feeds. |\n| `src/mcp-server/tools/definitions/` | Tool definitions (`*.tool.ts`) — one file per tool. |\n| `tests/` | Unit and integration tests mirroring `src/`. |\n| `docs/` | Design doc and directory tree. |\n\n---\n\n## Development guide\n\nSee [`CLAUDE.md`/`AGENTS.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 request-scoped logging, `ctx.state` for tenant-scoped storage\n- Register new tools via the barrel in `src/mcp-server/tools/definitions/index.ts`\n- Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields\n\n---\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---\n\n## License\n\nApache-2.0 — see [LICENSE](LICENSE) for details.\n",
  "bytes": 13360,
  "sha": "2ce85e1c362699bc1fb6c237712f28932a8ebda3af73c5bc1653e374762375cf",
  "repo_slug": "cyanheads/noaa-spaceweather-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_cyanheads_noaa_spaceweather_mc_6e60ccf8/readme"
}