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

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.2
File Size Uploaded Provenance
span_mcp-0.6.2.tar.gz 241.9 kB With provenance Details

Built distribution (wheel)

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

Total release size: 517.8 kB

Release files / span_mcp-0.6.2.tar.gz

Download URL span_mcp-0.6.2.tar.gz
Size 241.9 kB
Tags Source
SHA-256 checksum
How to use checksums
69bd48a4e83ba4f4e834244f819bd9ef5ee50a3b23122e74d77ffe96237408a6
BLAKE2b-256 checksum
How to use checksums
5a53a38e6127068f2202581f344808cec1148ca27f20ae4ea3d92d00ea9c244e
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.2-py3-none-any.whl

Download URL span_mcp-0.6.2-py3-none-any.whl
Size 276.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73f5279f8803684bd1a1edcb33a307ebf287e4517c0edccd59841f3d04d739b8
BLAKE2b-256 checksum
How to use checksums
a59dbb726a872f2b41232a485432e0a1abf7dcaec5d87c0405f41bbb4e0d84d9
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.2

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