# ContextLattice

A local-first memory and context layer for AI agents that preserves project state, retrieves relevant evidence, and resumes work across sessions.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 156
- Author: sheawinkler
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/sheawinkler/ContextLattice
- Updated: 2026-10-21
- HTML: https://affpapa.org/en/nevibecode/mcp/contextlattice

## What it does

ContextLattice keeps a durable project context that an agent can reopen when a session, model, or tool changes. It gathers relevant evidence with provenance, moves bounded signed context between agents, and records outcomes that can support later work.

The project is primarily operated through its CLI. MCP and HTTP provide integration surfaces, while commands cover readiness checks, context retrieval, progress notes, and resuming a task without replaying the whole conversation. Repository integration adds managed instruction blocks and preserves existing text.

A local run needs a Compose v2-compatible container runtime plus `gmake`, `jq`, `rg`, `python3`, and `curl`; macOS, Linux, and Windows via WSL2 are listed. Without that setup, the local quickstart will not complete. Claude Code connects through the MCP endpoint.

## Requirements
- Remote server: `https://contextlattice.io/mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http contextlattice https://contextlattice.io/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add contextlattice --url https://contextlattice.io/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "contextlattice": {
            "url": "https://contextlattice.io/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "contextlattice": {
            "type": "http",
            "url": "https://contextlattice.io/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http contextlattice https://contextlattice.io/mcp
```

## When to use it
- reopen project goals after a session change
- retrieve evidence with source coverage
- save verified progress for the next agent run
- carry bounded context between agents
- add ContextLattice blocks without replacing repository instructions

## Example prompts
- Use ContextLattice to reopen the project goal, recent decisions, and next action before changing the code.
- Retrieve context for the current release regression, show the supporting sources, and list any gaps in the evidence.
- Save the verified root cause and regression test as project progress so the next session can resume.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
