space-weather-mcp

space-weather-mcp

Enables space-aware daily briefings, stargazing condition reports, and astronomy picture exploration from within the IDE by connecting to NASA and weather APIs.

Category
访问服务器

README

Space Weather MCP

A custom MCP (Model Context Protocol) server that connects Kiro to NASA and weather APIs, enabling space-aware daily briefings, stargazing condition reports, and astronomy picture exploration — all from within your IDE.

Demo

Video: Space Weather MCP Demo (mp4)

Repo: github.com/pyraenix/space-weather-mcp

What It Connects To

API What it provides Auth
NASA APOD Astronomy Picture of the Day — title, explanation, image URLs Free key (or DEMO_KEY)
OpenMeteo Weather Current conditions, 7-day forecast, sunrise/sunset No key needed
OpenMeteo Geocoding City name → coordinates No key needed

MCP Tools Provided

Tool Description
get_astronomy_picture Fetch NASA's Astronomy Picture of the Day (optional date param for archive)
get_weather Current weather + 7-day forecast for any city worldwide
get_stargazing_conditions Stargazing score (0-100) based on cloud cover, humidity, wind, and daylight
get_space_weather_briefing Combined report: APOD + weather + stargazing in a single call

What I Built With It

A Space Weather Journal Generator that produces daily Markdown briefings combining:

  1. What's happening in space today (NASA's picture of the day with full explanation)
  2. Ground-level weather conditions for your city
  3. A computed stargazing score telling you whether tonight is worth going outside

This is something Kiro cannot do without the MCP integration — it has no native access to live weather data or NASA's daily content. The MCP server gives Kiro real-time awareness of both astronomical events and local sky conditions.

Example Output

# 🌤️ Space Weather Journal — 2026-07-17
**Location:** Seattle, Washington, United States

## 🔭 Today in Space: The Dust Trail of Comet Tempel 2
Comet 10P/Tempel 2 orbits the Sun once every 5.4 years...

## 🌡️ Ground Conditions
| Temperature | 19°C (feels like 20.5°C) |
| Conditions  | Mainly clear              |
| Cloud Cover | 25%                       |

## 🌤️ Stargazing Score: 55/100 — Fair
⚠️ Partial clouds — some stars visible
✅ Low humidity — crisp atmosphere
✅ Calm winds — stable for telescopes
⏰ Wait for sunset to observe

Setup

Prerequisites

  • Node.js 18+
  • (Optional) NASA API key from api.nasa.gov — works without one using DEMO_KEY

Installation

git clone <repo-url>
cd space-weather-mcp

# Install dependencies
npm install

# Build the MCP server
npm run build

Environment Variables

cp .env.example .env
# Optional — the server works without this (uses DEMO_KEY with rate limits)
NASA_API_KEY=your_nasa_api_key_here

Configure in Kiro

The .kiro/settings/mcp.json is already included. If you're adding this to an existing project, add to your MCP config:

{
  "mcpServers": {
    "space-weather": {
      "command": "node",
      "args": ["dist/index.js"],
      "cwd": "/path/to/space-weather-mcp",
      "env": {
        "NASA_API_KEY": "${env:NASA_API_KEY}"
      },
      "disabled": false
    }
  }
}

Run the Demo

# Generate a space weather journal for any city
npx tsx demo/generate-briefing.ts "San Francisco"
npx tsx demo/generate-briefing.ts Tokyo
npx tsx demo/generate-briefing.ts London

Use in Kiro

Once the MCP server is configured, ask Kiro things like:

  • "What's NASA's astronomy picture today?"
  • "What are the stargazing conditions in Tucson tonight?"
  • "Give me a full space weather briefing for my location"
  • "Show me the APOD from my birthday (1995-06-16)"

Project Structure

space-weather-mcp/
├── .kiro/
│   ├── settings/mcp.json      # MCP server configuration
│   └── steering/space-weather.md  # Agent behavior guidance
├── src/
│   └── index.ts               # MCP server implementation (4 tools)
├── demo/
│   └── generate-briefing.ts   # Demo script — generates Markdown journals
├── dist/                      # Compiled output (after npm run build)
├── .env.example               # Environment variable template
├── .gitignore
├── package.json
├── tsconfig.json
└── README.md

How It Works

The MCP server runs on stdio transport (standard for Kiro MCP integrations). When Kiro starts, it launches the server as a child process and communicates via JSON-RPC over stdin/stdout.

┌─────────┐  stdio (JSON-RPC)  ┌──────────────────┐  HTTPS  ┌──────────────┐
│  Kiro   │ ◄────────────────► │  Space Weather   │ ◄──────► │  NASA APOD   │
│  IDE    │                     │  MCP Server      │          │  OpenMeteo   │
└─────────┘                     └──────────────────┘          └──────────────┘

The stargazing score is computed locally by the server using a weighted formula:

  • Cloud cover (0-60 point penalty)
  • Humidity (0-20 point penalty)
  • Wind speed (0-20 point penalty)
  • Daytime (30 point penalty)

Tech Stack

  • Runtime: Node.js 18+, TypeScript
  • MCP SDK: @modelcontextprotocol/sdk ^1.12.1
  • APIs: NASA APOD (free), OpenMeteo (free, no key)
  • Dev Tools: Kiro (MCP, steering, specs)

Kiro Birthday Challenge — Day 5

Built for the Kiro Birthday Challenge Day 5: "Build a custom MCP integration." This MCP server connects Kiro to real-time space and weather data it has no native access to, then uses that connection to generate contextual astronomy briefings that combine what's happening in space with conditions on the ground.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选