
Pulls real-time space weather data from NOAA's Space Weather Prediction Center APIs. Six tools cover geomagnetic storm scales, planetary K-index time series, OVATION aurora forecasts with coordinate lookups, DSCOVR solar wind plasma and magnetic field (including the critical Bz component), GOES solar flare probabilities with active region breakdowns, and structured SWPC alerts. All feeds are public and keyless. Responses include plain-language summaries alongside raw values so agents can reason about storm severity without re-interpreting indices. Useful when you need to answer questions about current geomagnetic conditions, aurora visibility at specific locations, or solar activity risk. Available as a public hosted instance or self-hosted via stdio.
Query NOAA SWPC space weather: geomagnetic storm scales, Kp index, aurora forecasts, solar wind, solar activity, and alerts via MCP. STDIO or Streamable HTTP.
Public Hosted Server: https://noaa-spaceweather.caseyjhand.com/mcp
Space weather from NOAA's Space Weather Prediction Center (SWPC) — geomagnetic storm scales, Kp index, aurora forecasts, solar wind, solar activity, and active alerts. Query current conditions, aurora visibility at a coordinate, or windowed plasma and magnetic-field time series from any MCP client. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
| Tool | Description |
|---|---|
noaa_spaceweather_get_conditions | Current space-weather snapshot: NOAA R/S/G storm scales, latest Kp, a plain-language status summary, and optionally SWPC's forecast discussion explaining the forecast |
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 |
noaa_spaceweather_get_aurora_forecast | OVATION model aurora forecast: global probability grid, optional local lookup by coordinates with go/no-go verdict |
noaa_spaceweather_get_solar_wind | Real-time solar wind from the active L1 spacecraft: speed, proton density, temperature, and the critical Bz component with the window's most southward reading — explains why current geomagnetic conditions exist |
noaa_spaceweather_get_solar_activity | Solar flare picture: discrete flare events with peak class and R-scale level, GOES X-ray flux, the daily F10.7 cm radio flux, 3-day flare-class probabilities, active solar regions with per-region probabilities, and solar radiation storm level |
noaa_spaceweather_get_alerts | Active SWPC alerts, watches, and warnings — structured records with product type, severity, issue time, validity window, and full message text |
noaa_spaceweather_get_conditions toolinclude_discussion (bool, default false) is the only input — otherwise a single call composing storm scales and current Kp into one snapshotinclude_discussion, the forecaster-written Forecast Discussion split into its topic sections (Solar Activity, Energetic Particle, Solar Wind, Geospace), each with its 24-hour summary and 3-day forecast textnoaa-scales.json + noaa-planetary-k-index.json feeds, plus the discussion.txt product when the discussion is requestednoaa_spaceweather_get_kp_index toolwindow_days (1–7, default 1) bounds the observed series; the forecast series is always SWPC's full 3-day forecastestimated/predicted rowsobservedCount reports how many observed readings matched the windownoaa_spaceweather_get_aurora_forecast toollatitude/longitude (WGS84, required together): nearest 1°-grid lookup, the centered-dipole geomagnetic latitude those coordinates convert to, the minimum Kp and G level needed at that geomagnetic latitude, and a plain-language go/no-go verdictinvalid_coordinates error when only one of the pair is suppliednoaa_spaceweather_get_solar_wind toolwindow_hours (1–168, default 3) slices client-side from a feed that carries roughly the last 24 hours at ~1-minute cadenceresolution (reduced default, or full) bounds each returned series to 200 records: the window is bucketed by record count and one real measurement is emitted per bucket — the bucket's fastest speed for plasma, its most southward Bz for mag — with the newest record in the window always last. A series already inside the bound comes back untouched, so a default 3-hour call is unaffected; full returns every record (~1,400 per series over 24 hours)bzStatus surfaces southward Bz (the storm driver) as a plain-language field, and bzMinInWindow with its time tag reports the window's most southward reading — both computed from the full window, before any reductionlatestFeedPlasmaTime/latestFeedMagTime/feedStalenessHours distinguish an empty window from a stale feednoaa_spaceweather_get_solar_activity toolinclude_regions (default true) toggles per-region active-solar-region detail to control response sizeflare_hours (1–168, default 24) bounds the discrete flare events returned, filtered on each flare's onset; the feed keeps a rolling 7 days, so 168 returns everything it carriesflareClassFull, derived by SWPC's truncation rule so it agrees with the published flare classes), and the unformatted flux alongside the display string; recent readings cover the past hour*1Day name and a date-neutral namegoes/primary/xrays-6-hour.json, goes/primary/xray-flares-7-day.json, f107_cm_flux.json, solar_probabilities.json, goes/primary/integral-protons-plot-3-day.json, and solar_regions.json feedsnoaa_spaceweather_get_alerts toolactive_only (default true) — in-force Warnings/Watches/Alerts only. A product stays in force until the feed says otherwise, so this also drops any product a later cancellation names by serial, and all but the newest Watch carrying THIS SUPERSEDES ANY/ALL PRIOR WATCHES IN EFFECT — alongside cancellations, Summaries, and products whose validity end has passedmax_age_hours (1–720, default 48) bounds how far back to look for candidates; the SWPC feed itself has no expiry. Under active_only=true it does not cut off a product whose validity end is still ahead, so a multi-day Watch survives until the last day it forecasts a storm for ends; under active_only=false it is a literal age cutoffcancelled flags a record that cancels a prior product rather than being active; the product it cancels is a separate record, excluded by the serial link rather than by this flagactive_only=true the response echoes the applied window and counts what it excluded, by reason — so an empty result reads as "quiet" or "everything was filtered" without a second callBuilt 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.
SWPC-specific:
SpaceWeatherService wraps every NOAA SWPC feed — the JSON products and the plain-text forecast discussion — behind one fetchWithTimeout + withRetry funnel, so both paths classify an upstream failure the same wayAgent-friendly output:
feed_unavailable → "Retry in 30–60 s"; a feed path SWPC no longer serves is feed_moved → "Retrying will not help", raised on the first attemptA public instance is available at https://noaa-spaceweather.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"noaa-spaceweather-mcp-server": {
"type": "streamable-http",
"url": "https://noaa-spaceweather.caseyjhand.com/mcp"
}
}
}
Add the following to your MCP client configuration file.
{
"mcpServers": {
"noaa-spaceweather": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/noaa-spaceweather-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with npx (no Bun required):
{
"mcpServers": {
"noaa-spaceweather": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/noaa-spaceweather-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}
Or with Docker:
{
"mcpServers": {
"noaa-spaceweather": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"ghcr.io/cyanheads/noaa-spaceweather-mcp-server:latest"
]
}
}
}
For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcp
git clone https://github.com/cyanheads/noaa-spaceweather-mcp-server.git
cd noaa-spaceweather-mcp-server
bun install
cp .env.example .env
# edit .env if needed — all defaults work out of the box
| Variable | Description | Default |
|---|---|---|
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | Port for HTTP server. | 3010 |
MCP_HTTP_HOST | Hostname for HTTP server. | 127.0.0.1 |
MCP_HTTP_ENDPOINT_PATH | Endpoint path. | /mcp |
MCP_SESSION_MODE | HTTP session mode. This project explicitly uses stateless; auto resolves to stateful. | stateless |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_LOG_LEVEL | Log level (RFC 5424). | info |
LOGS_DIR | Directory for log files (Node.js only). | <project-root>/logs |
STORAGE_PROVIDER_TYPE | Storage backend. | in-memory |
OTEL_ENABLED | Enable OpenTelemetry instrumentation. | false |
No domain-specific API keys are required. See .env.example for the full list of optional overrides.
Build and run:
# One-time build
bun run rebuild
# Run the built server
bun run start:stdio
# or
bun run start:http
Run checks and tests:
bun run devcheck # Lint, format, typecheck, security
bun run test # Vitest test suite
bun run lint:mcp # Validate MCP definitions against spec
docker build -t noaa-spaceweather-mcp-server .
docker run --rm -p 3010:3010 noaa-spaceweather-mcp-server
The 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.
| Path | Purpose |
|---|---|
src/index.ts | createApp() entry point — registers tools and inits the service. |
src/services/space-weather/ | SpaceWeatherService — fetches and normalizes all NOAA SWPC feeds. |
src/mcp-server/tools/definitions/ | Tool definitions (*.tool.ts) — one file per tool. |
tests/ | Unit and integration tests mirroring src/. |
docs/ | Design doc and directory tree. |
See CLAUDE.md/AGENTS.md for development guidelines and architectural rules. The short version:
try/catch in tool logicctx.log for request-scoped logging, ctx.state for tenant-scoped storagesrc/mcp-server/tools/definitions/index.tsIssues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run test
Apache-2.0 — see LICENSE for details.
MCP_LOG_LEVELdefault: infoSets the minimum log level for output (e.g., 'debug', 'info', 'warn').
MCP_HTTP_HOSTdefault: 127.0.0.1The hostname for the HTTP server.
MCP_HTTP_PORTdefault: 3010The port to run the HTTP server on.
MCP_HTTP_ENDPOINT_PATHdefault: /mcpThe endpoint path for the MCP server.
MCP_AUTH_MODEdefault: noneAuthentication mode to use: 'none', 'jwt', or 'oauth'.