[Integrations](https://spiral.ai/integrations) › [VS Code](https://spiral.ai/integrations/vscode) › [NOAA Kp index](https://spiral.ai/integrations/vscode/noaa-kp-index)

# How to Use NOAA Kp index in VS Code

Returns planetary Kp readings and forecast values for comparing geomagnetic activity over time. Use it to identify stronger three-hour periods; choose the three-day forecast when you also need the forecaster's explanation.

|  |  |
| --- | --- |
| Model | NOAA Kp index |
| Available through | Alexandria |
| Category | News & Media |
| Price | $0.00873 per call. |
| Returns | json |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with NOAA Kp index in VS Code

- Use NOAA Kp index to add a chart of available observed and forecast Kp to this project, clearly separating the two.
- Use NOAA Kp index to look this up and give me the result as a table. Save the result in ./assets.
- Pull the latest numbers from NOAA Kp index and tell me what changed since last week.
- Check NOAA Kp index and summarize what you find in three bullet points.
- Pull the newest data from NOAA Kp index and give me the result as a table.

## How to set up NOAA Kp index in VS Code

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the hosted server**: Use Add to VS Code on the console's Agents & MCP page, or run:

```bash
code --add-mcp '{"name":"spiral","type":"http","url":"https://api.spiral.ai/mcp"}'
```

2. **Sign in**: VS Code asks you to sign in when it first starts the server: sign in to Spiral and click Authorize. No API key. Run MCP: List Servers from the Command Palette to check that Spiral is running.

### Use the Spiral skill

1. **Send VS Code this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run NOAA Kp index**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "alexandria",
    "model": "services-swpc-noaa-gov/space-weather/kp_index",
    "input": {
      "days": 2
    }
  }'
```

Then paste one of the prompts above: VS Code finds NOAA Kp index on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/vscode

## NOAA Kp index tools and prices

- [NOAA Space Weather Prediction Center · Kp index](https://spiral.ai/tools/alexandria/services-swpc-noaa-gov/space-weather/kp_index) (Alexandria): $0.00873 per call.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| days | 1 to 7 | 2 | Days of observed and estimated history before the latest value. |

## What can you do with NOAA Kp index in VS Code?

Build a space weather display that keeps NOAA observations and forecasts in separate views. A coding agent can add three-hour Kp charts, forecast explanations, or official notices to the project's interface.

### Write a daily space weather news brief

Build a briefing with issued notices, current severity, upcoming conditions, auroral activity, Kp, incoming solar wind, and recent flares. Keep each observation or forecast attached to its own time period.

### Prepare a planetarium's live sky presentation

Give presenters current NOAA data for explaining what the Sun and Earth's magnetic environment are doing. Use the aurora outlook, flare events, measurements, notices, and forecast explanations as distinct parts of the presentation.

### Populate an observatory's space weather display

Show visitors a conditions summary with separate panels for NOAA notices, forecasts, auroral activity, geomagnetic readings, solar wind, and flares. Label forecast horizons so a near-term aurora estimate cannot be mistaken for tomorrow's outlook.

### Build a prospective storm timeline

Save successive NOAA responses during an unfolding event. Assemble a timeline showing how notices, forecast expectations, auroral activity, Kp, solar wind, and flare reports changed, without assuming every change had the same cause.

### Plan an aurora photography check

Use forecast Kp windows to choose when to check again, then consult the near-term aurora outlook before heading out. Present these as space weather inputs to a viewing decision.

### Explain an official storm notice

Turn a NOAA bulletin into a short explanation of what was issued and the accompanying geomagnetic readings. Add the forecaster's rationale when discussing expected activity.

## Overview

- [Alexandria](https://spiral.ai/providers/alexandria)
- [All VS Code guides](https://spiral.ai/integrations/vscode)

## NOAA Kp index in other agents

- [Amp](https://spiral.ai/integrations/amp/noaa-kp-index)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/noaa-kp-index)
- [Claude](https://spiral.ai/integrations/claude-desktop/noaa-kp-index)
- [Claude Code](https://spiral.ai/integrations/claude-code/noaa-kp-index)
- [Cline](https://spiral.ai/integrations/cline/noaa-kp-index)
- [Codex](https://spiral.ai/integrations/codex/noaa-kp-index)
- [Cursor](https://spiral.ai/integrations/cursor/noaa-kp-index)
- [Devin](https://spiral.ai/integrations/devin/noaa-kp-index)
- [dots](https://spiral.ai/integrations/dots/noaa-kp-index)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/noaa-kp-index)
- [Gemini](https://spiral.ai/integrations/gemini/noaa-kp-index)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/noaa-kp-index)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/noaa-kp-index)
- [goose](https://spiral.ai/integrations/goose/noaa-kp-index)
- [Grok](https://spiral.ai/integrations/grok/noaa-kp-index)
- [Grok Build](https://spiral.ai/integrations/grok-build/noaa-kp-index)
- [Hermes](https://spiral.ai/integrations/hermes/noaa-kp-index)
- [Instinct](https://spiral.ai/integrations/instinct/noaa-kp-index)
- [Manus](https://spiral.ai/integrations/manus/noaa-kp-index)
- [Muse](https://spiral.ai/integrations/muse/noaa-kp-index)
- [Muse Code](https://spiral.ai/integrations/muse-code/noaa-kp-index)
- [n8n](https://spiral.ai/integrations/n8n/noaa-kp-index)
- [Notion](https://spiral.ai/integrations/notion/noaa-kp-index)
- [OpenClaw](https://spiral.ai/integrations/openclaw/noaa-kp-index)
- [opencode](https://spiral.ai/integrations/opencode/noaa-kp-index)
- [Perplexity](https://spiral.ai/integrations/perplexity/noaa-kp-index)
- [Raycast](https://spiral.ai/integrations/raycast/noaa-kp-index)
- [Windsurf](https://spiral.ai/integrations/windsurf/noaa-kp-index)
- [Zapier](https://spiral.ai/integrations/zapier/noaa-kp-index)

## More VS Code guides

- [NHPR stories by tag](https://spiral.ai/integrations/vscode/nhpr-stories-by-tag)
- [NOAA aurora forecast](https://spiral.ai/integrations/vscode/noaa-aurora-forecast)
- [NHPR news search](https://spiral.ai/integrations/vscode/nhpr-news-search)
- [NOAA solar X-ray flares](https://spiral.ai/integrations/vscode/noaa-solar-x-ray-flares)
- [NHPR latest stories](https://spiral.ai/integrations/vscode/nhpr-latest-stories)
- [NOAA solar wind measurements](https://spiral.ai/integrations/vscode/noaa-solar-wind-measurements)

## Questions about NOAA Kp index in VS Code

**Can VS Code use NOAA Kp index?**

Yes. Add Spiral to VS Code as an MCP server, and VS Code can find and run NOAA Kp index like any built-in tool.

**How much does NOAA Kp index cost in VS Code?**

$0.00873 per call. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your VS Code plan is separate.

**Do I need an Alexandria account to use NOAA Kp index in VS Code?**

No. Spiral runs NOAA Kp index on its own Alexandria account. You sign in to Spiral once and never paste a key.

**How long does it take to set up NOAA Kp index in VS Code?**

About two minutes: add the hosted server, then sign in.

**Does VS Code wait while NOAA Kp index runs?**

NOAA Kp index runs in the background. VS Code starts the run, checks on it and gives you the json when it's ready.

**Does NOAA report one overall space weather severity?**

NOAA separates three event types: geomagnetic storms, solar radiation storms, and radio blackouts. A report about one type should not be read as a severity rating for all three.

**Does NOAA's aurora coverage include the Southern Hemisphere?**

Yes. NOAA's aurora forecast covers both hemispheres, including the southern auroral oval.

**How far ahead does NOAA forecast space weather?**

The horizon depends on the product. The OVATION aurora outlook normally covers 30 to 90 minutes, while the three-day space weather forecast covers the next three days.

**How often does NOAA revise its three-day forecast?**

NOAA issues it every 12 hours, at 0030 and 1230 UTC. Each category includes the forecaster's explanation of the expected conditions.

**Does a new Kp reading describe just the latest minute?**

No. NOAA's chart refreshes every minute, but its estimated planetary Kp represents a three-hour interval.

