Metadata-Version: 2.4
Name: skynet-mars
Version: 0.1.0
Summary: MARS, the MCP Astronomy Research Suite: astronomy tools for LLM agents and Python, built on algorithms extracted from Skynet.
Author-email: James Atkisson <james@atkisson.net>
Maintainer: SkynetRTN
License-Expression: GPL-3.0-only
Project-URL: Homepage, https://github.com/SkynetRTN/MARS
Project-URL: Repository, https://github.com/SkynetRTN/MARS
Project-URL: Issues, https://github.com/SkynetRTN/MARS/issues
Project-URL: Releases, https://github.com/SkynetRTN/MARS/releases
Project-URL: Documentation, https://github.com/SkynetRTN/MARS/tree/main/docs
Keywords: astronomy,mcp,llm,agents,photometry,pulsar,skynet
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Astronomy
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: anthropic~=0.121
Requires-Dist: anyio~=4.14
Requires-Dist: astropy~=8.0
Requires-Dist: astroquery~=0.4.11
Requires-Dist: certifi>=2026.10.18,~=2026.10
Requires-Dist: httpx~=0.28
Requires-Dist: keyring~=25.7
Requires-Dist: matplotlib~=3.11
Requires-Dist: numba~=0.66
Requires-Dist: numpy~=2.4
Requires-Dist: pandas~=3.0
Requires-Dist: photutils~=3.0
Requires-Dist: pillow~=13.0
Requires-Dist: psrqpy~=1.3
Requires-Dist: pydantic~=2.13
Requires-Dist: PyYAML~=6.0
Requires-Dist: rich~=15.0
Requires-Dist: scipy~=1.18
Requires-Dist: sep~=1.4
Requires-Dist: soupsieve~=4.0
Requires-Dist: textual~=8.2
Requires-Dist: textual-image~=0.13
Requires-Dist: werkzeug>=3.1.9,~=3.1
Provides-Extra: mcp
Requires-Dist: jsonschema~=4.26; extra == "mcp"
Requires-Dist: mcp~=2.2; extra == "mcp"
Requires-Dist: opentelemetry-api>=1.45.2,~=1.45; extra == "mcp"
Dynamic: license-file

<p align="center">
  <img src="https://raw.githubusercontent.com/SkynetRTN/MARS/main/docs/assets/mars-banner.png" alt="MARS — MCP Astronomy Research Suite" width="880">
</p>

<p align="center">
  <a href="https://github.com/SkynetRTN/MARS/actions/workflows/ci.yml"><img src="https://github.com/SkynetRTN/MARS/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI"></a>
  <a href="https://github.com/SkynetRTN/MARS/actions/workflows/ci.yml"><img src="https://img.shields.io/github/check-runs/SkynetRTN/MARS/main?nameFilter=runtime%20containment%20%28windows-11-arm%29&label=Windows%20ARM64" alt="Windows ARM64"></a>
  <a href="https://github.com/SkynetRTN/MARS/actions/workflows/ci.yml"><img src="https://img.shields.io/github/check-runs/SkynetRTN/MARS/main?nameFilter=runtime%20containment%20%28macos-latest%29&label=macOS" alt="macOS"></a>
  <a href="https://github.com/SkynetRTN/MARS/actions/workflows/ci.yml"><img src="https://img.shields.io/github/check-runs/SkynetRTN/MARS/main?nameFilter=python%20tests%20%283.13%29&label=Linux" alt="Linux"></a>
  <img src="https://img.shields.io/badge/python-3.12%20%7C%203.13-blue" alt="Python 3.12 | 3.13">
</p>

MARS (MCP Astronomy Research Suite) is an agentic, tool-enabled system for
automated astronomy: a registry of purpose-built tools — SIMBAD, NED, VizieR,
ATNF, MAST, MPC, CASDA and ADS queries, plus local pulsar, variable-star,
optical photometry, plate-solving, HR-diagram and radio-source pipelines —
that an LLM agent plans and executes research tasks with. Serve them over MCP
to your own coding agent, or drive them from the `mars` console.

The algorithms behind the tools come from two production systems built around
the [Skynet Robotic Telescope Network](https://skynet.unc.edu/) at the
University of North Carolina at Chapel Hill: Skynet itself, extracted
directly into Python, and [Astromancer](https://astromancer.skynet.unc.edu/home),
its light-curve, periodogram and star-cluster web application, ported from
TypeScript. The extractions preserve upstream algorithms and recorded
behavior, with documented corrections for verified defects. Note that upon the first
stable release of MARS, future development will occur in the Skynet 2 monorepo.

## Quick Start

**From an MCP host** (Claude Code, Claude Desktop, Codex, Cursor, …), with no
checkout — install [`skynet-mars`](https://pypi.org/project/skynet-mars/) on
Python 3.13 and register its server:

```bash
uv tool install --python 3.13 "skynet-mars[mcp]"
mars-mcp self-test                                   # runs a pulsar detection end to end
claude mcp add --scope user mars -- /full/path/to/mars-mcp
```

Other hosts, the optional data bundles (`mars-mcp fetch-data`), credentials
and where files go are in [`docs/guides/installation/README.md`](https://github.com/SkynetRTN/MARS/blob/main/docs/guides/installation/README.md).

**From a checkout**, run the console. It needs a model backend — Anthropic by
default (`ANTHROPIC_API_KEY`), or OpenAI-compatible, Gemini, or a local Ollama
daemon, switchable in the session with `/backend`:

```bash
uv sync
uv run mars
```

The console's commands, keys and flags are in
[`docs/architecture/tool-architecture.md` §10.2](https://github.com/SkynetRTN/MARS/blob/main/docs/architecture/tool-architecture.md#102-the-mars-console);
backend settings are in [§10](https://github.com/SkynetRTN/MARS/blob/main/docs/architecture/tool-architecture.md#10-the-agent-loop-and-model-port).
Every tool is also a plain Python function (`from tools.simbad import
search_simbad`), listed in
[§2](https://github.com/SkynetRTN/MARS/blob/main/docs/architecture/tool-architecture.md#2-public-tool-layer).
MARS installs these as top-level `tools` and `algorithms` packages, so a
project with its own package or module by either name shadows them; and it
reads its `MARS_*` settings once, when first imported.
Three optional optical frames are Git LFS objects (`git lfs pull`); see
[`data/README.md`](https://github.com/SkynetRTN/MARS/blob/main/data/README.md).

## What's Here

| Path | What it holds |
| --- | --- |
| `tools/` | The public tool surface: plain Python wrappers, the tool registry, the agent loop (`agent/`), the model port (`llm/`), the `mars` console (`tui/`), the MCP server (`mcp/`), and the benchmark harness (`bench/`). |
| `algorithms/` | The extracted Skynet packages (`wcs/`, `photometry/`, `fieldcal/`, `catalogs/`, `query/`, shared `skylib_lite/`), the Astromancer ports (`pulsar/`, `variable_star/`, `hrdiagram_py/`), and the new `radio/`. |
| `skills/mars-tools/` | The agent skill for using the tools, generated from `tools/skill/source/`. |
| `tests/` | Algorithm-preservation and tool-smoke tests; no network by default. |
| `data/` | Fixture frames, pulsar scans and recorded reference solves. |
| `benchmarks/`, `docs/` | The model benchmark corpus; the documentation. |

## Documentation

- [`0.1.0` release notes](https://github.com/SkynetRTN/MARS/blob/main/docs/releases/0.1.0.md) — the first official stable release, its corrections and retained limitations.
- [`docs/README.md`](https://github.com/SkynetRTN/MARS/blob/main/docs/README.md) — the documentation map.
- [`docs/guides/installation/README.md`](https://github.com/SkynetRTN/MARS/blob/main/docs/guides/installation/README.md) — installing with no checkout, registering `mars-mcp`, data bundles.
- [`docs/guides/limitations.md`](https://github.com/SkynetRTN/MARS/blob/main/docs/guides/limitations.md) — what MARS does not do, or does only under a condition, with links to the details.
- [`docs/architecture/tool-architecture.md`](https://github.com/SkynetRTN/MARS/blob/main/docs/architecture/tool-architecture.md) — the architecture: public tools, algorithm ownership, the agent loop, console, benchmark and MCP server.
- [`docs/architecture/repository-folders.md`](https://github.com/SkynetRTN/MARS/blob/main/docs/architecture/repository-folders.md) — every folder, its important files, and its configuration (WCS solver and ATLAS catalog setup, VizieR settings).
- [`docs/architecture/extraction.md`](https://github.com/SkynetRTN/MARS/blob/main/docs/architecture/extraction.md) — upstream provenance, severed dependencies and preserved parity quirks, per package.
- [`docs/guides/pulsar-tool-pipeline.md`](https://github.com/SkynetRTN/MARS/blob/main/docs/guides/pulsar-tool-pipeline.md) — the four-stage pulsar chain.
- [`docs/benchmarks/README.md`](https://github.com/SkynetRTN/MARS/blob/main/docs/benchmarks/README.md) — the model benchmark and its results.
- [`docs/development/releasing.md`](https://github.com/SkynetRTN/MARS/blob/main/docs/development/releasing.md) — how releases and data bundles are cut.
- [`tests/README.md`](https://github.com/SkynetRTN/MARS/blob/main/tests/README.md) — what the test suite proves and what it does not cover.

## Contributing

Target `main`, keep changes narrow, and run the checks CI enforces
(`uv run pytest`, `python3 -m compileall tools algorithms tests`,
`git diff --check`). See
[`CONTRIBUTING.md`](https://github.com/SkynetRTN/MARS/blob/main/CONTRIBUTING.md),
and [`AGENTS.md`](https://github.com/SkynetRTN/MARS/blob/main/AGENTS.md) for
agentic contributors.

## License

Copyright (C) 2026 Skynet Robotic Telescope Network.

MARS is licensed under the **GNU General Public License v3.0 only**
(`GPL-3.0-only`); the full text is [`LICENSE`](https://github.com/SkynetRTN/MARS/blob/main/LICENSE). It is the licence of
the Skynet projects it grew from: Astromancer and Skycat carry the same text.

The code under `algorithms/` comes from three places (provenance per file in
[`docs/architecture/extraction.md`](https://github.com/SkynetRTN/MARS/blob/main/docs/architecture/extraction.md)):

- **Skynet**, by the same group as MARS: `skylib` and the optical processing
  in `skynet-db`, extracted into `algorithms/skylib_lite/`, `wcs/`,
  `photometry/`, `fieldcal/` and `catalogs/`.
- **[Astromancer](https://github.com/SkynetRTN/astromancer)**, by the same
  group, GPL-3.0: ported to Python in `algorithms/pulsar/`,
  `algorithms/variable_star/` and `algorithms/hrdiagram_py/`.
- **Afterglow Core**, Apache-2.0: parts of the query layer in
  `algorithms/query/`. Apache-2.0 code may be combined into a GPL-3.0 work.

Files that carry their own third-party notice — for example the BSD-3-Clause
header in `algorithms/skylib_lite/util/overlap.py` — keep it, and those terms
apply to those files as well.
