# Attestor

A self-hosted memory service for agent teams: roles, write and forget permissions, version history, audit. Built for the case where several agents write to one store.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 14
- Author: bolnet
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/bolnet/attestor
- Updated: 2026-09-18
- HTML: https://affpapa.org/en/nevibecode/mcp/attestor

## What it does

Attestor keeps each memory once in Postgres and derives vectors and a graph into Pinecone and Neo4j. Reads and writes pass through an `AgentContext` carrying the agent's identity, role, namespace and budget. Six roles exist: `ORCHESTRATOR` reads, writes and forgets; `PLANNER`, `EXECUTOR` and `RESEARCHER` read and write; `REVIEWER` and `MONITOR` only read. The `read_only=True` flag strips write and forget whatever the role, and a violation raises `PermissionError` before any backend is reached.

Ranking on the read path is deterministic: vector, BM25, RRF, graph, MMR, then budget fit, with no language model in scoring. The same query returns the same order, which makes it unit-testable. An optional reranker (`bge`, `cohere` or `llm`) stays off unless you turn it on. Every fact carries valid time and transaction time, so `recall(as_of=...)` reconstructs what the mesh believed at an earlier point. Contradictions supersede older facts instead of deleting them. One caveat: the Pinecone lane ignores `as_of` and logs a warning, so a historical view through vector retrieval is not guaranteed.

It ships as a Python library, a REST sidecar and an MCP server over one API. Role enforcement is an in-process guarantee; the REST and MCP surfaces hit the store directly and lean on their own auth. Install with `pip install attestor`; the MCP launch uses `uvx`. Version 4.1.11 is a greenfield rebuild, and there is no migration path from v3.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `ATTESTOR_PATH`, `ATTESTOR_DISABLE_LOCAL_EMBED`, `OPENAI_API_KEY`, `OPENROUTER_API_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env ATTESTOR_PATH=<ATTESTOR_PATH> --env ATTESTOR_DISABLE_LOCAL_EMBED=<ATTESTOR_DISABLE_LOCAL_EMBED> --env OPENAI_API_KEY=<OPENAI_API_KEY> --env OPENROUTER_API_KEY=<OPENROUTER_API_KEY> --transport stdio attestor -- uvx attestor
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from attestor <command>

### Codex

**Platform CLI**
```bash
codex mcp add attestor --env ATTESTOR_PATH=<ATTESTOR_PATH> --env ATTESTOR_DISABLE_LOCAL_EMBED=<ATTESTOR_DISABLE_LOCAL_EMBED> --env OPENAI_API_KEY=<OPENAI_API_KEY> --env OPENROUTER_API_KEY=<OPENROUTER_API_KEY> -- uvx attestor
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from attestor <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "attestor": {
            "command": "uvx",
            "args": [
                "attestor"
            ],
            "env": {
                "ATTESTOR_PATH": "<ATTESTOR_PATH>",
                "ATTESTOR_DISABLE_LOCAL_EMBED": "<ATTESTOR_DISABLE_LOCAL_EMBED>",
                "OPENAI_API_KEY": "<OPENAI_API_KEY>",
                "OPENROUTER_API_KEY": "<OPENROUTER_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from attestor <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "attestor": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "attestor"
            ],
            "env": {
                "ATTESTOR_PATH": "<ATTESTOR_PATH>",
                "ATTESTOR_DISABLE_LOCAL_EMBED": "<ATTESTOR_DISABLE_LOCAL_EMBED>",
                "OPENAI_API_KEY": "<OPENAI_API_KEY>",
                "OPENROUTER_API_KEY": "<OPENROUTER_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from attestor <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e ATTESTOR_PATH=<ATTESTOR_PATH> -e ATTESTOR_DISABLE_LOCAL_EMBED=<ATTESTOR_DISABLE_LOCAL_EMBED> -e OPENAI_API_KEY=<OPENAI_API_KEY> -e OPENROUTER_API_KEY=<OPENROUTER_API_KEY> attestor uvx attestor
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from attestor <command>

## When to use it
- decide which agents may write to a shared memory
- show what an answer was built from months later
- reconstruct memory state as of a past date
- delete a user's data with an audit trail
- keep tenants separated inside one store

## Example prompts
- Add the auth schema decision to memory as agent `reviewer-1`
- Show what the agent team believed last Friday
- Forget this user's data and show me the audit entry

## Similar
- [supabase-audit-rls](https://affpapa.org/en/nevibecode/skills/supabase-audit-rls.md) — skill · 1100 installs
- [supabase-security-audit](https://affpapa.org/en/nevibecode/commands/supabase-security-audit.md) — command · 1020 installs
- [supabase-audit-tables-read](https://affpapa.org/en/nevibecode/skills/supabase-audit-tables-read.md) — skill · 487 installs
- [codex-memory-curator](https://affpapa.org/en/nevibecode/skills/codex-memory-curator.md) — skill · 2700 installs
- [recall](https://affpapa.org/en/nevibecode/skills/parcadei-recall.md) — skill · 493 installs
- [YourMemory](https://affpapa.org/en/nevibecode/mcp/yourmemory.md) — MCP server · ★ 270

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