astp-docs-server
The open documentation server for ASTP, the AI State Tree Protocol — two transports on one substrate, over the public protocol corpus:
- an MCP server adopters' coding agents (Claude Code / Codex / Copilot) point at to implement the protocol from its normative text, and
- a web-chat head ("Clotho-lite") backing a docs-site assistant.
Both consume the shared astp-docs core and cite identical
chunks, so the two heads can't drift. This repo serves only the open corpus;
the proprietary corpus is a separate, private server.
This release serves SPEC 7.0.0, vendored from astp commit a1127ae. Each
release pins one snapshot of the protocol docs; the exact commit and file list
ship in the package as corpus/open/vendor_manifest.json.
Install (for your coding agent)
The MCP server runs locally over stdio; there is no hosted endpoint.
pip install 'astp-docs-server[mcp]'
claude mcp add astp-docs -- astp-docs-open # Claude Code
For any other MCP client, register a stdio server whose command is
astp-docs-open. If you installed into a virtualenv, give the client the
command's absolute path (which astp-docs-open), since clients don't
activate virtualenvs. To run it without installing: uvx --from 'astp-docs-server[mcp]' astp-docs-open.
The server indexes the bundled corpus at startup and needs no API key or network access.
Layout
src/astp_docs_server/
open_corpus.py # the OPEN CorpusSpec (points at the astp protocol docs)
mcp_server.py # FastMCP transport — search_spec / get_governance_rule /
# get_conformance_vectors / get_section / get_hash_preimage /
# get_test_vectors / get_license_terms / corpus_info
atlas_manifest.py # Atlas registration (read-only)
web/ # HTTP transport: /chat, /search, /license-terms, /healthz + a reference demo
The retrieval engine, chunker, index, vector search, and the shared tool logic
(astp_docs.toolkit) live in the core library — this repo is a thin transport
layer on top. mcp (MCP transport) and fastapi/uvicorn/anthropic (web head)
are separate extras, so the web head deploys without the MCP SDK and vice-versa.
The corpus is vendored
The open docs are copied into the package (src/astp_docs_server/corpus/open/) by
scripts/vendor_corpus.py, and ship in the wheel/image — so a built server is
self-contained (no sibling protocol checkout at runtime). Corpus
resolution precedence: explicit arg → ASTP_PROTOCOL_DIR (dev override) →
vendored package corpus → ~/projects/astp (dev fallback; a local checkout of scorched-earth-labs/astp).
Refresh the snapshot when the protocol docs change:
python scripts/vendor_corpus.py /path/to/astp
Run (dev)
pip install -e ../astp-docs-core # the core library (editable)
pip install -e '.[mcp,web,dev]' # this server + both transports
python -m astp_docs_server # MCP server (stdio) [needs .[mcp]]
python -m astp_docs_server.web # web-chat head (http://127.0.0.1:8080) [needs .[web]]
ASTP_CHAT_MODE=extractive python -m astp_docs_server.web # keyless (no LLM)
python -m pytest tests/ -q # self-contained (runs off the vendored corpus)
The web head answers with Claude by default (ANTHROPIC_API_KEY or an
ant auth login profile; model via ASTP_CHAT_MODEL, default claude-sonnet-5-5);
ASTP_CHAT_MODE=extractive runs without an LLM.
Deploy
The web head containerizes — see DEPLOY.md. Short version:
python scripts/vendor_corpus.py /path/to/astp
docker build --build-context core=../astp-docs-core \
--build-context protocol=../astp -t astp-docs-server .
docker run -p 8080:8080 astp-docs-server
Stateless (index rebuilds from the vendored corpus at startup) → host-agnostic,
scales by replicas. llms.txt and AGENTS.md (repo root) point coding agents at
the corpus and these tools.
Metadata
Release files for astp-docs-server 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| astp_docs_server-0.1.1.tar.gz | 1.2 MB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| astp_docs_server-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.5 MB
Release files / astp_docs_server-0.1.1.tar.gz
| Download URL | astp_docs_server-0.1.1.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f76c8442c9467f8401a36391b398f4d0621748b0753b3d7e0f6bc9209412626
|
|
BLAKE2b-256 checksum How to use checksums |
d5a338955015278940dfb421c344855429d33d23ce0dcee323c9ded90725f95d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / astp_docs_server-0.1.1-py3-none-any.whl
| Download URL | astp_docs_server-0.1.1-py3-none-any.whl |
|---|---|
| Size | 311.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54823fa9b00c71cb3a7a21ad69d9d6c0cc2606135a4228d61abf19905b739c2b
|
|
BLAKE2b-256 checksum How to use checksums |
1bf2af6bd732e01abcfea366b2385721d7e11281d51973cefd286b09afbd17e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logSecurity for astp-docs-server 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for astp_docs_server-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.