spacedata
Aggregated public space data — satellite orbits, catalogs and launches — as a single AI-friendly CLI.
README
spacedata
Aggregated public space data — satellite orbits, catalogs and launches — as a single AI-friendly CLI.
Instead of teaching an agent (or yourself) four different APIs, query languages and data formats, spacedata exposes one command vocabulary and always answers with a single JSON document. Caching and circuit breakers are built in so heavy automated use never violates the upstream sources' usage policies.
Status
v0.2 — CelesTrak (orbital elements, catalog search) and Launch Library 2 (upcoming launches) with no account needed, plus Space-Track (SATCAT, element history, conjunctions, re-entry predictions) using your own free account. Planned next: ESA DISCOSweb (physical metadata) and a cross-source sat info.
Usage
spacedata tle 25544 # latest orbital elements for the ISS
spacedata sat search STARLINK-32000 # search the catalog by name
spacedata launches upcoming --limit 5 # next 5 orbital launches
spacedata launches upcoming --search starlink # filter launches
spacedata --pretty tle 25544 # human-readable JSON
spacedata --fresh tle 25544 # bypass the local cache
spacedata sat catalog 25544 # full SATCAT record: type, status, owner, launch, RCS
spacedata conjunctions --limit 20 # upcoming close approaches (CelesTrak SOCRATES)
Two datasets only exist behind a free Space-Track account (set SPACEDATA_SPACETRACK_IDENTITY and SPACEDATA_SPACETRACK_PASSWORD):
spacedata sat history 25544 --limit 30 # orbital element history (orbit evolution/decay)
spacedata reentries --limit 10 # re-entry predictions (TIP)
spacedata conjunctions --source spacetrack # official public CDMs instead of SOCRATES
MCP server
spacedata serve runs the same data layer as an MCP server over stdio, for Claude Desktop, Claude Code, Cursor and any other MCP client. Seven tools: get_orbit, search_satellites, get_satellite_catalog, get_conjunctions, get_upcoming_launches, get_orbit_history, get_reentries — with the same caching and rate-limit protection as the CLI.
Claude Code:
claude mcp add spacedata -- npx -y spacedata serve
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"spacedata": {
"command": "npx",
"args": ["-y", "spacedata", "serve"]
}
}
}
To enable the two Space-Track tools, add "env": {"SPACEDATA_SPACETRACK_IDENTITY": "...", "SPACEDATA_SPACETRACK_PASSWORD": "..."} to the server entry.
Tip: if your agent can run shell commands (like Claude Code), the plain CLI is cheaper in context tokens than loading MCP tool schemas — serve shines in clients without a shell (Claude Desktop, claude.ai).
Using with AI agents
spacedata is designed to be driven by AI agents: single JSON document per invocation, semantic exit codes, no interactive prompts, and built-in caching/rate limiting so an agent in a loop can never get you banned from an upstream source.
For Claude Code, add this to your ~/.claude/CLAUDE.md (or a project CLAUDE.md); other agents (Cursor, etc.) have equivalent instruction files:
- `spacedata` — CLI for public space data (no API keys needed). Use it via the shell
for anything about satellites, orbits, conjunctions or launches:
`spacedata tle <norad-id>`, `spacedata sat search <name>`, `spacedata sat catalog <norad-id>`,
`spacedata conjunctions [--norad id]`, `spacedata launches upcoming [--search text]`.
Always outputs one JSON document; exit 2 = not found. Run `spacedata --help` for details.
Example output (spacedata tle 25544):
{"ok":true,"source":"celestrak","cached":false,"fetchedAt":"2026-07-03T14:20:17.278Z",
"data":[{"noradId":25544,"name":"ISS (ZARYA)","internationalDesignator":"1998-067A",
"epoch":"2026-07-01T12:11:46.289760","meanMotionRevPerDay":15.49503254,
"eccentricity":0.00042241,"inclinationDeg":51.6311,
"derived":{"semiMajorAxisKm":6796.315,"perigeeAltitudeKm":415.307,
"apogeeAltitudeKm":421.049,"periodMinutes":92.933}}]}
Output contract
Stable, designed for AI agents:
- stdout: one JSON document —
{ok: true, source, cached, fetchedAt, data} - stderr: one JSON document —
{ok: false, error: {code, message, ...}} - exit codes:
0ok ·1usage error ·2not found ·3upstream/network error ·4circuit open or rate limited ·5unexpected upstream schema ·6missing or rejected credentials
tle and sat search include derived geometry per object: perigee/apogee altitude (km), period (minutes) and semi-major axis, computed from the mean elements.
Caching and upstream policies
Responses are cached in ~/.cache/spacedata (override with --cache-dir or XDG_CACHE_HOME):
| Source | TTL | Why |
|---|---|---|
| CelesTrak | 2 h | GP data updates every 2 h; policy asks for one download per cycle |
| Launch Library 2 | 1 h | Free tier allows 15 calls/hour per IP |
On any non-200 response the source's circuit breaker opens and spacedata refuses to query it again until the cooldown expires (CelesTrak's M2M policy requires stopping immediately on errors; ignoring it gets your IP firewalled).
Environment variables
SPACEDATA_LL2_TOKEN— Launch Library 2 API token (Patreon tiers) for higher rate limits.SPACEDATA_LL2_BASE_URL— override the LL2 base URL, e.g.https://lldev.thespacedevs.com/2.3.0(no rate limits, stale data) while developing.
Development
Bun monorepo (packages/*), TypeScript, Biome, Zod for all external data, neverthrow for results.
make setup # install deps
make build # typecheck + bundle to packages/cli/dist
make test # bun test
make check # biome lint
Run from source without building:
cd packages/cli && bun src/cli.ts tle 25544
Data sources & credits
- Orbital data: CelesTrak (Dr. T.S. Kelso)
- Launch data: Launch Library 2 by The Space Devs
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。