Skip to main content

Span

Persistent codebase understanding for coding agents.

Span is a local MCP server that keeps what your agent learned about your repository tied to the code it came from, and marks it stale when the supporting evidence changes.

MCP server CI Apache-2.0 Python 3.12+ Linux verified Beta GitHub stars

Quick start · How it works · Docs

The problem

Coding agents either trust documentation and memory that may no longer match the repository, or they re-read the same source, tests, contracts, and configuration every session and reconstruct the same understanding.

Nothing normally fails when a note becomes wrong. The file still looks valid, the agent still reads it, and the next session starts from the same uncertainty.

Span gives the agent a third option: established understanding, stored with the evidence that supports it, and an explicit answer about whether that support is still current.

See it

This is a real exchange from the current build, against a two-file fixture. The client is a scripted MCP client, not a model; it shows the wire and freshness behaviour, not model judgement. Raw records: current MCP acceptance evidence.

> explain src/alpha.py
Pending cont-1  CQ-01
  "VALUE = 1"

> submit_interpretation cont-1
PURPOSE  alpha computes the value
  CURRENT

> explain src/alpha.py
PURPOSE  alpha computes the value
  CURRENT

# edit src/alpha.py

> status src/alpha.py
PURPOSE  alpha computes the value
  STALE
  evidence changed
  scope: src/alpha.py

> refresh src/alpha.py
Pending cont-6  CQ-01
  "VALUE = 1 # touched"

> submit_interpretation cont-6
PURPOSE  alpha computes the value
  CURRENT
predecessor  STALE

The first call suspends with a bounded task. The submission establishes the purpose, and the next explain reads it back as current. After the file changes, status reports the purpose as stale, with the changed file and the scope to re-check. Refresh re-examines that one scope; the new result becomes current while the predecessor stays recorded as stale.

Stale means the supporting evidence changed. It does not mean Span has proved the old conclusion false.

The edit did not invalidate the whole repository, and it did not leave the old conclusion looking current. Span does not remove the first investigation; it keeps that work from being discarded when the session ends.

How it works

Like tests give code a feedback loop, Span gives codebase understanding one.

  1. Establish. The agent investigates a bounded area. Span keeps the conclusion together with the evidence and authority it used.
  2. Reuse. Later agents get the established understanding while its support is still current.
  3. Invalidate narrowly. When supporting evidence changes, only the understanding that depended on it becomes STALE.
  4. Re-check. The agent investigates the affected scope and submits a new result. Unaffected understanding stays current; the predecessor remains as history.
State Meaning
CURRENT The recorded understanding is still supported by the evidence and premises it depends on.
STALE Relevant support changed after the understanding was established. Re-check it before treating it as current.
UNVERIFIABLE A conclusion exists, but the support needed to confirm it could not be obtained: a recorded source is absent from the inventory, an authority seed is missing, an inventory fingerprint is unavailable, or a bounded premise walk did not complete. It is neither current nor known-stale. A provider or store failure is not this state — the operation fails instead.

Quick start

Span currently requires Linux (the verified installation path), Python 3.12 or newer, and Node.js with npm.

pipx install span-mcp        # or: pip install span-mcp
span-install --repo /path/to/your/repo

span-install creates Span's runtime environment, provisions the managed structural indexer, deploys the Agent Skills, and registers supported hosts. Restart or reload your coding agent after installation.

Verify the installation:

span-install --verify-only

To work from a source checkout instead — when contributing, or when pinning to a commit — clone the repository and run the installer from its root:

git clone https://github.com/pontivus-com/span.git
cd span
python3 scripts/install-span.py --repo /path/to/your/repo

Installation establishes operational readiness, not repository understanding. For the manual Codex command and the OpenCode entry, see install and connect.

Works with

Host Setup
Claude Code Managed by the installer when the Claude Code CLI is present: user-scope MCP registration, skills at ~/.claude/skills, and report-only lifecycle hooks in ~/.claude/settings.json. Manual registration is in install and connect.
Codex Managed by the installer when the Codex CLI is present. Manual registration is in install and connect.
OpenCode Managed when an opencode.json is present. The supported manual entry is in install and connect.
Other MCP hosts Connect over stdio with span-mcp --data-dir <DATA_DIR> --repo <TARGET_REPO>.

Span runs locally over stdio. It does not call an LLM, choose a model, or store provider credentials. Its state lives in a data directory outside the repositories it analyzes.

Why it is different

Documentation records an answer. Agent memory remembers. Search finds evidence. Span maintains the interpretation layer between them: the conclusion, its evidence, its authority, its dependencies, and its freshness.

Approach Persists interpreted understanding Tracks whether it is still supported Surfaces what changed, with its scope Supports scoped semantic re-check
Traditional or generated documentation Yes Not inherently No No
General agent memory Yes Not inherently No Not inherently
Citation-validated agent memory Yes Yes, per fact No — unverified items are withheld No
Code search / structural graph Different purpose Source or structure only Structural only Not semantic reassessment
Span Yes Yes, per item, premise, and discovery scope Yes, with the reason Yes

The detailed comparison, including the difference between validation and scoped doubt, is in scope and boundaries.

What it is not

  • Not a documentation generator.
  • Not general agent memory, validated or otherwise.
  • Not code search or a structural graph.
  • Not an LLM service: it never invokes a model or stores provider credentials.
  • Not autonomous: it does not edit code, run tests, or make stale understanding current by itself.

See scope and boundaries for the full list.

Status

Span is beta. Linux is the currently verified installation path; macOS and Windows paths are reserved but not verified. The public operation surface is eleven MCP operations; see the MCP reference. Recorded acceptance runs are in acceptance evidence.

If Span is useful to you, a star helps other developers find it. Feedback and issues are welcome.

Documentation

Contributing

See the contributing guide. Changes should preserve the central contract: established understanding remains reusable only while its required supporting evidence remains current. Security reports are handled through SECURITY.md. Support expectations are described in SUPPORT.md.

Registry

Official MCP Registry entry: io.github.pontivus-com/span

mcp-name: io.github.pontivus-com/span

License

Span is licensed under the Apache License 2.0 (Apache-2.0). See LICENSE.

In one sentence

Span gives coding agents codebase understanding that cannot go stale silently: reuse what is still current, and re-check only what changed.

Metadata

Release files for span-mcp 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for span-mcp 0.6.0
File Size Uploaded Provenance
span_mcp-0.6.0.tar.gz 241.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for span-mcp 0.6.0
File Interpreter ABI Platform
span_mcp-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 517.3 kB

Release files / span_mcp-0.6.0.tar.gz

Download URL span_mcp-0.6.0.tar.gz
Size 241.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3a4244017bea1e5962d6a64a6f027e03522d7a1dc787fc331208a60c313d71be
BLAKE2b-256 checksum
How to use checksums
da63ca368c382f312bb0561b0bc1f66f43217159e8744a5d67b10eff58c7287e
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 24, 2026.

Transparency log

Release files / span_mcp-0.6.0-py3-none-any.whl

Download URL span_mcp-0.6.0-py3-none-any.whl
Size 275.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
265da7ecf51c7b4eb9173f4f1d7a5b0f55f4e5a03f7117efda722a7a323bba3b
BLAKE2b-256 checksum
How to use checksums
97f13a9022ebebf902a7c71b165cc73960f2d4ac32ebe9328038b8ef2e7256ee
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 24, 2026.

Transparency log

Security for span-mcp 0.6.0

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.

Select from 2 files

Attestation for span_mcp-0.6.0.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 24, 2026.

Transparency log

A 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page