PluginBench
MCP Server
Active
Apache-2.0

ContextLattice MCP Server

io.github.sheawinkler/contextlattice

Local-first memory and context orchestrator for AI agents with durable continuity, explainable retrieval, and verified learning.

What is the ContextLattice MCP server?

ContextLattice is a private-by-default, local-first memory and context orchestrator for MCP apps and agents. It provides durable continuity across agent sessions, explainable evidence retrieval with source provenance, portable signed context packets, and verified skill evolution—all without mandatory cloud storage or automatic execution of retrieved instructions.

ContextLattice gives AI agents a durable, inspectable context layer that reconstructs active objectives, selects high-signal evidence, carries context safely across machines and agents, and records what actually worked. It solves the problem of agents replaying transcripts or losing mission context when switching between chats, models, tools, or computers. The CLI is the primary interface, with HTTP and MCP as companion integration surfaces.

How to install ContextLattice

Copy-paste configuration for popular MCP clients.

transport: http
Config generated by PluginBench — verify against the source before use.
~/.cursor/mcp.json
{
  "mcpServers": {
    "contextlattice": {
      "url": "https://contextlattice.io/mcp"
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • context — Retrieve scoped context with provenance, source coverage, and evidence ranking by impact per token
  • remember — Save concise, durable progress and outcomes to memory
  • resume — Reopen the active objective, decisions, and next move without replaying transcripts
  • correct — Repair stale or incorrect recall without silently rewriting history
  • finish — Close the loop with verified outcomes and bind responses to durable proof
  • doctor — Verify runtime readiness and health of the ContextLattice installation
  • agent-fit context-prep — Prepare and manage context preparation schedules, claims, and completion for external workers
  • skills_index search — Discover capabilities and skills across configured agent roots without loading every file
  • continuous_cognition status — Project the next bounded move and retrieve opaque evidence references
  • continuous_cognition evaluate — Verify completed responses and bind them to durable proof

Use cases

  • Resume agent work across sessions without replaying chat history or losing context
  • Retrieve high-signal evidence for complex tasks with transparent source coverage and omissions
  • Move signed, portable context between different AI agents and machines while keeping execution local
  • Discover reusable skills and capabilities across agent repositories without scanning every file
  • Record and verify agent learning outcomes before promoting new skills to production

ContextLattice MCP server FAQ

What is ContextLattice and how does it work?

ContextLattice is a local-first memory layer for AI agents that reconstructs active objectives, retrieves high-signal evidence with provenance, carries signed context across agents and machines, and records verified outcomes. It operates in five stages: Reopen (reconstruct mission), Select (retrieve evidence), Move (carry signed context), Earn (record outcomes), and Compound (improve future retrieval).

Is ContextLattice free?

The public local lane is account-free and includes CLI-first memory, Context Packs, sessions, Skills Index discovery, and local proof tooling. Paid artifacts add governed collaboration, protected activation, workspace operations, and advanced analytics, but local memory is not a mandatory cloud dependency.

How do I install ContextLattice?

The recommended path is `git clone`, then `gmake quickstart` from the repository. Alternative installers include Homebrew (`brew install --cask contextlattice`), macOS DMG, Windows MSI, and Linux bootstrap bundles. Requirements: macOS/Linux/WSL2, Docker Compose v2, and tools like gmake, jq, rg, python3, curl.

How do I connect my AI agent to ContextLattice?

Run `contextlattice_adopt integrate --repo . --agents <agent-names> --pretty` from your project directory. The integration command writes managed blocks while preserving existing instruction text and does not install third-party agent harnesses. Supported agents include Codex, Claude Code, Hermes, OMP, Mercury, and others.

Does ContextLattice require authentication or cloud storage?

No. ContextLattice is local-first and account-free in its public lane. API-key protection secures operational routes. All memory, execution, and transport remain caller-owned and local; cloud features are optional paid add-ons.

What are the system requirements?

Minimum: 2–4 vCPU, 4–8 GB RAM, 20–50 GB SSD (Lite profile). Recommended for advanced use: 4–8 vCPU, 12–20 GB RAM, 100–180 GB SSD. Supported on macOS, Linux, and Windows via WSL2 with Docker Compose v2.

README (reference)

Source of truth, from the repository.

ContextLattice

<p align="center"> <a href="https://contextlattice.io/" target="_blank" rel="noopener noreferrer"> <img src="docs/readme/contextlattice-editorial-hero.png" alt="ContextLattice editorial website hero showing a live local context field" width="100%" /> </a> </p> <p align="center"> <strong>Open an agent. Already there.</strong> </p> <p align="center"> The local-first intelligence layer that gives AI agents durable continuity, explainable retrieval, portable context, and verified learning across harnesses. </p> <p align="center"> <a href="#quickstart"><img src="https://img.shields.io/badge/Interface-CLI%20First-111111?style=for-the-badge" alt="CLI first"></a> <a href="https://github.com/sheawinkler/ContextLattice/releases/tag/v5.0.0"><img src="https://img.shields.io/badge/Release-v5.0.0-292929?style=for-the-badge" alt="ContextLattice v5.0.0"></a> <a href="#quickstart"><img src="https://img.shields.io/badge/Runtime-Local%20First-404040?style=for-the-badge" alt="Local-first runtime"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache%202.0-575757?style=for-the-badge" alt="Apache License 2.0"></a> </p> <p align="center"> <a href="#quickstart">Quickstart</a> · <a href="#how-it-works">How it works</a> · <a href="#connect-your-agents">Agent setup</a> · <a href="#architecture">Architecture</a> · <a href="https://contextlattice.io/docs/">Docs</a> · <a href="https://contextlattice.io/updates.html">Updates</a> </p>

Stop replaying the brief

Models can reason. Harnesses can act. Neither reliably retains the mission when a chat, model, tool, account, or computer changes.

ContextLattice gives that work a durable, inspectable context layer. It reconstructs the active objective, selects the evidence that matters, carries it safely, and records what actually worked—without turning every prompt into a transcript dump or making cloud storage mandatory.

CapabilityWhat changes
Durable continuityReopen the objective, decisions, repository state, risks, proof, and next move as one bounded packet.
Explainable retrievalRank evidence by impact per token and expose source coverage, omissions, opposition, degradation, and receipts.
Portable contextMove signed, least-privilege continuation across agents and machines while keeping execution and transport caller-owned.
Verified skill evolutionDiscover skills without loading every file, evaluate repeated wins on holdouts, and require review before promotion.
Privacy-bounded Aggregate SignalLearn from explicitly opted-in, clipped statistics while raw memory remains local; production activation stays hard-blocked pending independent privacy and utility review.

The CLI is the primary interface. The dashboard makes behavior and proof visible. HTTP and MCP are companion integration surfaces for applications and harnesses.

How it works

StageContextLattice does
01 · ReopenReconstructs the one active mission from durable checkpoints and current state.
02 · SelectRetrieves high-signal evidence into a compact Context Pack with provenance.
03 · MoveCarries signed, bounded context through Agent Packets, Passports, and encrypted continuation envelopes.
04 · EarnRecords outcomes and promotes reusable behavior only after deterministic proof and human approval.
05 · CompoundImproves future retrieval while preserving corrections, contradictions, freshness, and retirement semantics.

ContextLattice does not replace your agent harness, choose goals from retrieved text, or execute imported context. Local tools remain execution surfaces; memory and remote content remain evidence.

Quickstart

Requirements: macOS, Linux, or Windows through WSL2; a Compose v2-compatible container runtime; and gmake, jq, rg, python3, and curl. The tested macOS baseline uses OrbStack through its explicit Docker context; see the container runtime decision.

1. Install

git clone https://github.com/sheawinkler/ContextLattice.git
cd ContextLattice
cp .env.example .env
gmake quickstart

gmake quickstart is the prescribed technical install path; installers are bootstrap alternatives. The command prepares environment wiring, asks for a runtime profile, launches the selected local stack, and validates initial readiness.

2. Verify the runtime and retrieval path

curl -fsS http://127.0.0.1:8075/health | jq
contextlattice doctor --pretty
contextlattice state status --pretty
contextlattice context "verify this ContextLattice installation" \
  --project contextlattice \
  --pretty

Healthy containers are only the first check. The state command verifies the canonical gateway-owned storage inventory; the final command exercises the actual context path and reports source coverage, degradation, evidence, and next actions. Existing installs can use the explicit, reversible procedure in gateway state migration.

For a fuller lifecycle proof from the repository:

scripts/agent/agent-runtime-proof-pack --pretty
scripts/agent/agent-adoption-proof-matrix \
  --skip-provider-smoke \
  --progress \
  --pretty

Connect your agents

Run integration from the repository that should use ContextLattice:

cd /path/to/your/project

contextlattice_adopt integrate \
  --repo . \
  --agents codex,claude-code,opencode,hermes-agent,hermes-ultra,omp,mercury-agent,pi,droid \
  --pretty

contextlattice_adopt integrate \
  --repo . \
  --agents codex,claude-code,opencode,hermes-agent,hermes-ultra,omp,mercury-agent,pi,droid \
  --check \
  --pretty

The integration command writes bounded managed blocks while preserving existing instruction text. It does not install Codex, Claude Code, OpenCode, Hermes, OMP, Mercury, Pi, Droid, or another third-party agent harness.

External provider discovery is network-free. Provider execution remains explicit and caller-authorized; see the external-provider boundary.

If an agent is performing the installation, it should follow the quickstart directly, avoid cloning a second checkout when already inside one, report the exact failing command and path, and rerun the deterministic check after any repair.

The daily agent loop

# Confirm readiness when the environment is uncertain.
contextlattice doctor --pretty

# Retrieve scoped context before substantial work.
contextlattice context "debug the current release regression" \
  --project contextlattice \
  --pretty

# Save concise, durable progress.
contextlattice remember \
  "Root cause verified; regression test added; focused checks pass." \
  --project contextlattice \
  --pretty

# Resume without replaying the transcript.
contextlattice resume --project contextlattice --pretty

# Repair stale or wrong recall without silently rewriting history.
contextlattice correct \
  "The prior deployment record is stale." \
  --category stale \
  --project contextlattice \
  --pretty

# Close the loop with the verified outcome.
contextlattice finish \
  "Regression fixed and verified." \
  --success \
  --project contextlattice \
  --pretty

# Project the next bounded move or bind a completed response to durable proof.
contextlattice_continuous_cognition status "prepare the next verified move" \
  --project contextlattice --session-id <session-id> --agent-id codex_gpt5 \
  --task-id <task-id> --objective-id <objective-id> --as-of <rfc3339> --pretty
contextlattice_continuous_cognition evaluate "verify the completed response" \
  --project contextlattice --session-id <session-id> --agent-id codex_gpt5 \
  --task-id <task-id> --task-identity-id <task-identity-id> --as-of <rfc3339> --pretty

# Prepare context for an external worker without exposing its one-shot claim.
contextlattice agent-fit context-prep-schedule --project contextlattice \
  --session-id <session-id> --agent-id codex_gpt5 --payload-file prep-request.json --raw
contextlattice agent-fit context-prep-claim --project contextlattice \
  --session-id <session-id> --agent-id codex_gpt5 --prep-id <prep-id> \
  --worker-id <worker-id> --claim-token-file prep.claim --raw
contextlattice agent-fit context-prep-complete --project contextlattice \
  --session-id <session-id> --agent-id codex_gpt5 --prep-id <prep-id> \
  --claim-token-file prep.claim --payload-file prep-artifact.json --raw
contextlattice agent-fit context-prep-use --project contextlattice \
  --session-id <session-id> --agent-id codex_gpt5 --prep-id <prep-id> \
  --task-id <task-id> --effective-profile-digest <sha256-digest> \
  --source-generation <generation> --raw

Continuous Cognition is advisory-only: each invocation makes one bounded request, returns opaque evidence references, and never dispatches a runner or performs an external mutation. Context-preparation claims stay in an owner-only file and cross the completion/failure boundary only through the protected header; successful explicit use consumes the artifact once.

Find a capability without loading every skill body:

contextlattice_skills_index search "browser automation" --pretty

The active Skills Index scans configured Codex, Hermes, Hermes Ultra, and shared agent roots read-only. It reports each harness and root inventory separately, collapses byte-identical SKILL.md files by SHA-256 digest while retaining every source path as provenance, and requires discriminating query-term coverage instead of ranking generic words such as skill, index, or agent. Quarantine discovery remains separate, read-only by default, and never auto-promotes retrieved content.

Architecture

<table> <tr> <td width="50%"> <a href="https://contextlattice.io/architecture.html"> <img src="docs/public_overview/assets/architecture-service-map.svg" alt="ContextLattice service map" width="100%" /> </a> </td> <td width="50%"> <a href="https://contextlattice.io/architecture.html"> <img src="docs/public_overview/assets/architecture-retrieval-flow.svg" alt="ContextLattice retrieval and learning flow" width="100%" /> </a> </td> </tr> </table>

The default local control path is:

Agent or application
        │
        ▼
ContextLattice CLI / HTTP / MCP
        │
        ▼
Gateway :8075
        ├── durable write and outbox fanout
        ├── scoped retrieval and source receipts
        ├── session, objective, graph, and outcome state
        └── dashboard-visible proof and operations

Writes are validated and durably persisted before fanout. Retrieval merges the available sources, ranks bounded evidence, and reports missing or degraded coverage instead of hiding it.

The active application path is Go and Rust. Python remains in build, development, migration, and audit tooling rather than the live request path. The exact runtime and toolset choices are recorded in the v4 runtime decision and container decision.

Public and paid boundaries

The public local lane is account-free and useful on its own. It includes the CLI-first memory lifecycle, Context Packs, sessions, graph and claim surfaces, Skills Index discovery, Agent Packets, public Passport and Mesh contracts, and local proof tooling.

Paid artifacts add governed collaboration, protected activation, workspace operations, advanced analytics, and hosted distribution. They do not turn local memory into a mandatory cloud dependency.

See plans and distribution boundaries for the current contract.

Install options

macOS technical preview: unsigned DMG bootstrap launcher; expect Gatekeeper warnings until Developer ID notarization is configured, and prefer the source/CLI path.

PathBest forStatus
Source + gmake quickstartTechnical users and terminal-capable agentsRecommended
brew tap sheawinkler/contextlattice && brew install --cask contextlatticemacOS convenience bootstrapAvailable
macOS universal DMGGuided macOS bootstrapUnsigned technical preview; expect Gatekeeper warnings
Windows x64 MSIGuided Windows bootstrapAvailable
Linux bootstrap bundleGuided Linux bootstrapAvailable

Resource profiles

ProfileCPURAMStorage
Hugging Face / Glama lite2–4 vCPU4–8 GB20–50 GB SSD
Local Lite core2–4 vCPU8–12 GB25–80 GB SSD
Local Lite advanced4–6 vCPU12–16 GB80–140 GB SSD
Local Full6–8 vCPU12–20 GB100–180 GB SSD

For heavier ingest, model storage, or the spike-lab adapters, read the installation and storage guidance before selecting a profile.

Security and privacy

  • Local-first and account-free in the public local lane.
  • API-key protection for operational routes.
  • Deterministic secret-like content filtering at write ingress: redact by default, block when configured, and allow only by explicit operator choice.
  • Provenance and trust isolation on retrieved memory.
  • Signed portable context and encrypted continuation envelopes.
  • Dry-run-first graph repair, source backfill, and quarantine workflows.
  • No automatic execution of retrieved instructions or imported continuation content.

Security reports follow SECURITY.md.

Documentation

NeedStart here
Product overviewcontextlattice.io
InstallationInstallation guide
CLI and agent lifecycleCLI reference
Harness and app integrationIntegration guide
Architecture and scalingArchitecture · Scaling memory
TroubleshootingTroubleshooting guide
Current behavior and release evidenceUpdates · v5.0.0 release notes
RoadmapPublic roadmap
Agent hooksAgent hook contract
Retrieval trustRetrieval receipts
Skills and verified learningSkill efficacy review · Skill Foundry
Portable contextContext Passport and Mesh
Local inferenceLocal model options
Full repository-backed manualPublic field manual

The current release baseline is v5.0.0.

License

ContextLattice's public lane is licensed under the Apache License 2.0.

Related MCP servers

Connect AI assistants to Google Sheets through controlled tools for reading and updating rows.

Render PDFs from templates and spreadsheet data via SheetRender, locally or at mcp.sheetrender.com

1
TypeScript
MIT
View repository →

Persistent, evidence-backed code graph for coding agents.

View repository →

Agent-native post-quantum blockchain. 11 tools: send, balance, quantum oracle metrics. Flat fee.

0
Apache-2.0
View repository →

MCP server with an interactive dinosaur dashboard (MCP Apps UI). No API keys required.

0
HTML
View repository →

AI social media agent — generate content, auto-pilot posting, analytics for 9+ platforms.

7
JavaScript
MIT
View repository →