Noaa Spaceweather Mcp Server

io.github.cyanheads由 GitHub 帳號 cyanheads 發布v0.4.0更新於 Oct 29, 2026

NOAA SWPC space weather: storm scales, Kp index, aurora forecasts, solar wind, activity, alerts.

已驗證Streamable HTTP可網頁執行位置與生活資料與分析

概覽

AI 產生的概覽

提供 NOAA SWPC 太空天氣資料,讓助理查詢風暴等級、Kp 指數、極光預報、太陽風、太陽活動與警報。

可以做什麼
  • 取得目前狀況快照:NOAA R/S/G 風暴等級、最新 Kp,可選預報員討論
  • 讀取近期與預報 Kp 值,附 G 等級換算與極光可見緯度指引
  • 查詢全球或指定座標的 OVATION 極光機率,並給出考量日照的可見與否判定
  • 取得太陽風電漿與磁場時間序列,含 Bz 分量與區間內極值
  • 檢視閃焰事件、X 射線通量、F10.7 通量、閃焰機率與活動太陽區域
  • 列出生效中的 SWPC 警報、觀察與警告,含結構化欄位與完整內文
適用情境
適合回答地磁風暴、某地能否看到極光、太陽閃焰或無線電中斷等問題,也適合掌握目前太空天氣狀況並解讀 NOAA 官方預警。
執行需求
可使用託管遠端端點,或透過 npx(Node.js)或 Docker 在本機執行。所有 SWPC 資料來源公開且免金鑰,不需要帳號或 API key。MCP_TRANSPORT_TYPE、MCP_HTTP_PORT、MCP_HTTP_HOST、MCP_HTTP_ENDPOINT_PATH、MCP_AUTH_MODE、MCP_LOG_LEVEL 等設定皆有預設值。
安裝前請注意
僅為唯讀資料查詢,不寫入、不涉及付款。資料來自公開的 NOAA SWPC 來源,結果受上游可用性與更新頻率影響(太陽風約 1 分鐘、極光約 5 分鐘、Kp 每 3 小時)。若開啟 LOG_TOOL_FAILURE_PAYLOADS,失敗呼叫的參數與結果會被記錄,自由文字中的密鑰不會被遮蔽。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Noaa Spaceweather Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.cyanheads%2Fnoaa-spaceweather-mcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

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

README

@cyanheads/noaa-spaceweather-mcp-server

Query NOAA SWPC space weather: geomagnetic storm scales, Kp index, aurora forecasts, solar wind, solar activity, and alerts via MCP. STDIO or Streamable HTTP.

6 Tools


Overview

Space weather from NOAA's Space Weather Prediction Center: geomagnetic storms, Kp index, aurora forecasts, solar wind, solar activity, and active alerts. Check current conditions, see whether the aurora is visible where you are, or pull solar wind time series.

Tools

ToolDescription
noaa_spaceweather_get_conditionsCurrent space-weather snapshot: NOAA R/S/G storm scales for yesterday, today, and the 3-day forecast, latest Kp, a plain-language status summary, and optionally SWPC's forecast discussion explaining the forecast
noaa_spaceweather_get_kp_indexPlanetary 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_forecastOVATION model aurora forecast: global probability grid, optional local lookup by coordinates with a daylight-aware go/no-go verdict and a poleward horizon reading
noaa_spaceweather_get_solar_windReal-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_activitySolar 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 same-day flare counts and next-day probabilities, and solar radiation storm level
noaa_spaceweather_get_alertsActive SWPC alerts, watches, and warnings — structured records with product type, severity, issue time, validity window, and full message text

Capability reference

noaa_spaceweather_get_conditions tool

  • include_discussion (bool, default false) is the only input; one call composes the noaa-scales.json and noaa-planetary-k-index.json feeds, plus the discussion.txt product when the discussion is requested
  • Returns current Kp with its G-scale equivalent and aurora-latitude guidance, today's observed R/S/G levels, yesterday (the previous UTC day's assessed levels, null when the feed carries none), and SWPC's 3-day forecast starting today — forecast R and S carry probabilities rather than levels, and a null level means none was forecast, not level 0
  • With include_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 text

noaa_spaceweather_get_kp_index tool

  • window_days (1–7, default 1) bounds the observed series, and observedCount reports how many readings matched; the forecast is always SWPC's full 3-day series of forward-looking estimated/predicted rows
  • Each record carries Kp, its G level and label, and aurora-latitude guidance. G levels follow SWPC's minus-third band floors — G1 starts at Kp 4.67 (5−), and only Kp 9 is G5

noaa_spaceweather_get_aurora_forecast tool

  • latitude/longitude (WGS84) are optional but required together — one alone fails invalid_coordinates. Without them the call returns global metadata only: grid point count, global peak probability, and peak region
  • With coordinates, localLookup carries the nearest 1°-grid probability, the geomagnetic latitude, the minimum Kp and G level needed there, the sun's elevation and darkness state (day, civil_twilight, nautical_twilight, dark) at the forecast time, the strongest reading within 1000 km poleward (horizonMaxPercent, horizonMaxLatitude, horizonDistanceKm), and a go/no-go verdict — not visible in daylight, whatever the model probability
  • The OVATION model updates every ~5 minutes and forecasts ~30–90 minutes ahead (the solar wind's travel time from L1 to Earth)

noaa_spaceweather_get_solar_wind tool

  • window_hours (1–168, default 3) slices a feed that carries roughly the last 24 hours at ~1-minute cadence. resolution sets series detail: reduced (default) caps each series at 200 records, keeping each bucket's fastest speed and most southward Bz; full returns every record (~1,400 per series over 24 hours); summary returns empty series and every headline field, about 2 KB
  • Returns oldest-first plasma (speed, density, temperature) and magnetic-field (Bx/By/Bz/Bt GSM) series, each record naming its spacecraft, plus headline fields computed over the full window at every resolution: bzStatus, bzMinInWindow, speedMaxInWindow, densityMaxInWindow, btMaxInWindow, and bzSouthMinutesInWindow
  • latestFeedPlasmaTime/latestFeedMagTime/feedStalenessHours distinguish an empty window from a stale feed

noaa_spaceweather_get_solar_activity tool

  • flare_hours (1–168, default 24) bounds the flare events returned by onset over the feed's rolling 7 days; include_regions (default true) toggles per-region detail to control response size
  • Returns discrete flare events with onset, peak, and decay classes, peak flux, and the NOAA R level (0–5) it implies (decay is null while a flare is in progress; peak fields are null when SWPC recorded no peak); GOES X-ray flux with its flare class (flareClassFull); the daily F10.7 cm radio flux with its observation time; 3-day C/M/X flare and proton-event probabilities (cClassProbability, mClassProbability, xClassProbability, protonEventProbability — the deprecated *1Day names still carry them in structuredContent); and the S level from ≥10 MeV proton flux
  • With include_regions, each active region's sunspot area, the C/M/X flare counts SWPC attributed to it on its observation day, and its next-day flare probabilities

noaa_spaceweather_get_alerts tool

  • active_only (default true) keeps in-force Warnings/Watches/Alerts, dropping cancelled and superseded products, Summaries, and products whose validity has ended. max_age_hours (1–720, default 48) bounds how far back candidates reach — under active_only a product whose validity end is still ahead survives it; otherwise it is a literal age cutoff
  • Each record carries product type, NOAA scale and level (0 means "no scale stated," not zero severity), serial number, parsed validity window, cancelled, and full message text. Under active_only the response also counts what it excluded, by reason, so an empty result reads as "quiet" or "everything was filtered"

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.

SWPC-specific:

  • All SWPC feeds are public and keyless — no API keys required
  • Single 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 way — and every retry ladder runs inside one 45-second budget, so a hung upstream still returns the classified error before a 60-second client timeout
  • Heterogeneous feed normalization: interleaved multi-spacecraft records (solar wind), keyed objects (storm scales), coordinate triples (OVATION), section-delimited text (forecast discussion)
  • NOAA scale interpretation: raw Kp 6 → "G2 moderate storm — aurora possible to ~55° geomagnetic latitude"
  • Feed freshness surfaced per-response: solar wind updates ~1 min, aurora ~5 min, Kp 3-hour intervals

Agent-friendly output:

  • Observed timestamps on every response so agents can reason about data freshness
  • Plain-language summaries and verdicts alongside raw values — agents can display or reason without re-interpreting indices
  • Bz component surfaced as a first-class field in solar wind output (southward Bz = primary storm driver)
  • Typed error contracts with recovery hints, split on whether retrying can help: a transient feed failure is 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 attempt

Getting started

Connect to the hosted instance, no install:

sh
claude mcp add --transport http noaa-spaceweather-mcp-server https://noaa-spaceweather.caseyjhand.com/mcp

Or run it locally:

sh
claude mcp add noaa-spaceweather-mcp-server -- npx -y @cyanheads/noaa-spaceweather-mcp-server

For other clients, add this to the MCP config file:

json
{  "mcpServers": {    "noaa-spaceweather-mcp-server": {      "command": "npx",      "args": ["-y", "@cyanheads/noaa-spaceweather-mcp-server"]    }  }}

No API key is needed — every SWPC feed is public. For Docker or a source build, see Running the server.


Configuration

VariableDescriptionDefault
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_PORTPort for HTTP server.3010
MCP_HTTP_HOSTHostname for HTTP server.127.0.0.1
MCP_HTTP_ENDPOINT_PATHEndpoint path./mcp
MCP_SESSION_MODEHTTP session mode. This project explicitly uses stateless; auto resolves to stateful.stateless
MCP_AUTH_MODEAuth mode: none, jwt, or oauth.none
MCP_LOG_LEVELLog level (RFC 5424).info
LOGS_DIRDirectory for log files (Node.js only).<project-root>/logs
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
STORAGE_PROVIDER_TYPEStorage backend.in-memory
OTEL_ENABLEDEnable OpenTelemetry instrumentation.false

No domain-specific API keys are required. See .env.example for the full list of optional overrides.


Running the server

Local development

Requires Bun v1.4.0 or higher (or Node.js v24+).

  • Clone and install:

    sh
    git clone https://github.com/cyanheads/noaa-spaceweather-mcp-server.gitcd noaa-spaceweather-mcp-server && bun installcp .env.example .env   # all defaults work out of the box
  • Build and run:

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

    sh
    bun run devcheck   # Lint, format, typecheck, securitybun run test       # Vitest test suitebun run lint:mcp   # Validate MCP definitions against spec

Docker

sh
docker run --rm -p 3010:3010 ghcr.io/cyanheads/noaa-spaceweather-mcp-server:latest

The image defaults to HTTP transport, stateless session mode, and logs to /var/log/noaa-spaceweather-mcp-server. To run it over stdio from an MCP client, use "command": "docker" with "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/noaa-spaceweather-mcp-server:latest"]. To build locally, docker build -t noaa-spaceweather-mcp-server .; OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.


Project structure

PathPurpose
src/index.tscreateApp() 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.

Development guide

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

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for request-scoped logging, ctx.state for tenant-scoped storage
  • Register new tools via the barrel in src/mcp-server/tools/definitions/index.ts
  • Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields

Contributing

Issues are welcome. Run checks and tests before submitting:

sh
bun run devcheckbun run test

License

Apache-2.0 — see LICENSE for details.

來源:README.md,提交 dc7bbb3

工具

6

noaa_spaceweather_get_conditions

Get Space Weather Conditions

Current space-weather snapshot: NOAA R/S/G storm scales (the previous UTC day, today, and the 3-day forecast), latest Kp index with its G-scale equivalent and aurora-visibility latitude, and a plain-language status summary. Optionally includes the SWPC forecast discussion explaining what is driving the forecast. The quickest way to answer "is anything happening right now?" — use before deciding whether to drill into solar wind (noaa_spaceweather_get_solar_wind), aurora (noaa_spaceweather_get_aurora_forecast), or alert details (noaa_spaceweather_get_alerts).

輸入參數include_discussion

noaa_spaceweather_get_alerts

Get Space Weather Alerts

Active SWPC alerts, watches, and warnings — parsed into structured records with product type, NOAA scale and level, issue time, serial number, validity window, and plain text. Covers geomagnetic storms, radio blackouts, and radiation storms. With active_only=false, also returns informational summaries, expired notices, and cancellations. max_age_hours controls how far back to look for candidates (default 48 h) — under active_only=true it does not cut off a product whose validity end is still in the future, and under active_only=false it is a literal age cutoff. The SWPC feed holds roughly the last 30 days of products.

輸入參數active_onlymax_age_hours

noaa_spaceweather_get_kp_index

Get Kp Index

Planetary K-index (0–9 geomagnetic activity scale) — recent observed 3-hour values with their NOAA G-scale equivalents and aurora-latitude guidance, plus the 3-day Kp forecast series. Kp is the primary driver of aurora visibility and geomagnetic storm severity. SWPC reports Kp in thirds and starts each G level at that level’s "minus" value: Kp 4.67 (5−) is G1, Kp 6.67 (7−) is G3 (aurora to ~50° geomagnetic), Kp 8.67 (9−) is still G4, and only Kp 9 is G5 extreme. Use noaa_spaceweather_get_conditions for a combined snapshot including storm scales; use this tool when you need the Kp time series or forecast detail.

輸入參數window_days

noaa_spaceweather_get_solar_wind

Get Solar Wind

Real-time solar wind measurements from the active spacecraft at L1: proton speed (km/s), density (n/cm³), temperature (K), and the critical Bz component (southward Bz = negative = storm driver). Returns the recent plasma and magnetic field time series within the requested window, oldest first, each record tagged with the reporting spacecraft and bounded to 200 records per series unless resolution is set to "full" — or omitted entirely under "summary", which keeps the latest readings, Bz status, and window extremes (peak speed, density, and Bt; most southward Bz; minutes of southward Bz) for "what is Bz doing now" questions. Bz < −10 nT for sustained periods is a primary geomagnetic storm trigger — use alongside noaa_spaceweather_get_kp_index to see whether elevated solar wind has translated into a geomagnetic storm.

輸入參數resolutionwindow_hours

noaa_spaceweather_get_solar_activity

Get Solar Activity

Solar flare and radiation storm picture: discrete flare events from the past week with peak class and R-scale level, recent GOES X-ray flux with flare-class labels (A/B/C/M/X) and class magnitude, the daily F10.7 cm solar radio flux, 3-day flare-class probabilities (C/M/X), active solar regions with per-region flare probabilities, and GOES integral proton flux at ≥10 MeV with NOAA S-scale. For operators tracking HF radio blackout (R-scale, driven by X-ray) and radiation storm risk (S-scale, driven by protons). Each active region carries the C/M/X flare counts SWPC attributed to it that UTC day, which identify the region driving current activity — the flare events themselves carry no region.

輸入參數flare_hoursinclude_regions

noaa_spaceweather_get_aurora_forecast

Get Aurora Forecast

OVATION model aurora forecast for the next ~30–90 min: global grid of aurora probability percentages by latitude/longitude (1° resolution). With optional coordinates, returns the local aurora probability at the nearest grid point, the geomagnetic latitude those coordinates convert to, the minimum Kp and G level needed for aurora at that geomagnetic latitude, the sun’s elevation there at the forecast time (aurora is not visible in daylight), the strongest aurora within 1000 km poleward (visible low on the horizon when bright), and a plain-language go/no-go verdict. Without coordinates, returns only global metadata. Data updates every ~5 minutes. Supply coordinates as geographic (WGS84); aurora bands are geomagnetic, and the tool converts between them.

輸入參數latitudelongitude

版本歷史

6
  1. v0.4.0最新Oct 29, 2026
  2. v0.3.3Oct 25, 2026
  3. v0.3.2Oct 9, 2026
  4. v0.3.1Sep 23, 2026
  5. v0.2.0Sep 17, 2026
  6. v0.1.13Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分