经 AI Skill Hub 精选评估,Attestor 获评「推荐使用」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。
Attestor 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
Attestor 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/bolnet/attestor
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"attestor": {
"command": "npx",
"args": ["-y", "attestor"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 Attestor 执行以下任务... Claude: [自动调用 Attestor MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"attestor": {
"command": "npx",
"args": ["-y", "attestor"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
Cut your agent's token burn 21×. Two API calls.
Full-context replay re-reads the whole conversation every turn — input tokens that grow O(n²) and a bill that compounds with every session. Attestor retrieves only what's needed: flat ~200 tokens per call, 21× fewer input tokens by turn 100, 100% recall — measured across six models, open and closed.
await attestor.add(namespace, content) # when new information arrives
facts = await attestor.recall(namespace, query) # ~200 flat tokens, always
Self-hosted, deterministic retrieval, zero LLM in the critical path. The memory layer for agent teams that need shared, tenant-isolated memory with bi-temporal replay and an auditable supersession chain.
pip install attestor
Using Claude Code?pipx install attestorthenattestor quickstart— one command, zero questions: it brings up the local backends (Postgres + Pinecone Local + Neo4j), uses a local Ollama embedder (no cloud key), and wires the MCP server + hooks. Reverse it withattestor teardown. Or drive it from inside Claude Code via the plugin (/plugin install attestor→/attestor:install-attestor). See Install for Claude Code.> pipx install attestor && attestor quickstart >
| **Version** | 4.1.6 (stable; greenfield rebuild — no v3 migration path) |
| **PyPI** | attestor |
| **Import** | attestor |
| **Live site** | <https://attestor.dev/> |
| **Repo** | <https://github.com/bolnet/attestor> |
| **License** | MIT |
Designed and built by Surendra Singh — building auditable infrastructure for multi-agent AI, with fifteen years of production-systems discipline brought to the memory layer. Companion projects:claude-finance(Claude-powered financial analytics) ·private-equity(PE × AI workshop). Reach out if you're hiring senior IC for AI infrastructure.
---
mem.recall(query="alice", time_window=("2026-02-01", "2026-04-01"), context=ctx) ```
as_of and time_window propagate end-to-end through the orchestrator and document store. Auto-supersession on write is wired into core.py:add() (core.py:762, 784-785): on every add, the temporal manager finds active rows with the same (entity, category, namespace) and different content, marks them superseded, sets valid_until=now, and links superseded_by=<new_id>. Detection is rule-based string equality today.
Five orthogonal features land via configs/attestor.yaml boolean flips. All disabled by default — pick one per bench run, measure the lift, decide which to ship enabled.
| Flag | What it does | Lift | Cost overhead |
|---|---|---|---|
retrieval.multi_query | rewrite question into N paraphrases, RRF-merge N+1 vector lanes | +6-10% (lit.); regressed −10pp on LME-S temporal smoke | 1 small LLM call + N extra vector searches per recall |
retrieval.hyde | event-descriptive hypothetical-document embedding (temperature=0) — embed it as a parallel vector lane | **+10pp measured** on LME-S temporal-reasoning (30q smoke, 70%→80%→96.7% with BM25 hybrid) | 1 small LLM call + 1 extra vector search per recall |
retrieval.temporal_prefilter | regex-detect "two weeks ago" etc; narrow event-time window before vector | +1.5% (lit.); 0pp on LME-S interrogative-anchor questions | Free (regex-only, no LLM) |
self_consistency | answerer draws K=5 samples at temperature, elects consensus | +3-6% (lit.) | 5× answerer cost |
critique_revise | answer → critique → conditional revise | +3-5% (lit.) | ~3× answerer worst case |
multi_query and hyde are mutually exclusive in this release (multi_query wins if both flags are on with a logged warning). self_consistency and critique_revise are similarly mutually exclusive on the answerer side. Combinations across the two sides (e.g. hyde + self_consistency) are fine.
HyDE v2 prompt (attestor/retrieval/hyde.py) — generates an event-descriptive snippet rather than an answer-shape response, so the embedding lands close to source-shape conversation turns instead of question-shape queries. This is the lever that produced the +10pp measured lift on LME-S temporal-reasoning. temperature=0 is pinned so re-runs are deterministic.
Honest negative results documented above — multi_query and temporal_prefilter did NOT generalize from their literature numbers on the LME-S temporal-reasoning slice. multi_query paraphrases stay in question-shape and RRF dilutes marginal hits; temporal_prefilter heuristic anchors don't help interrogative-form questions ("how many days ago…"). HyDE was the right tool. Per-feature methodology + diagnostic artifacts in docs/bench/pinecone-lme-temporal-diagnostic-{baseline,mq3,hyde,hyde-bm25}-20260429.json.
Cross-vector-DB diagnostic harness — experiments/pinecone_lme_temporal_diagnostic.py runs retrieval-only LME-S diagnostics against Pinecone Local with --baseline / --multi-query / --hyde / --bm25-hybrid / --temporal-prefilter / --category flags. No answerer, no judge — pure recall@K ceiling. --skip-ingest reuses populated namespaces for fast retrieval-flag iteration (~60s for 30q vs ~50min with fresh ingest).
To benchmark a single feature: flip its enabled: true in configs/attestor.yaml, run the bench slice, compare against a same-day baseline run with everything off. The trend table will show the delta in the Δ column.
pip install attestor # or: pipx install attestor
Or pull the container (introspection-grade image, single layer over python:3.12-slim, currently linux/amd64):
docker pull ghcr.io/bolnet/attestor:latest # recommended — anonymous pull, mirrored to all registries below
Same image is mirrored to:
| Registry | Pull address |
|---|---|
| GHCR | ghcr.io/bolnet/attestor:latest |
| Docker Hub | bolnet2025/attestor:latest |
| Quay | quay.io/bolnet/attestor:latest |
| AWS ECR Public | public.ecr.aws/m6h5j7o3/attestor:latest |
| GCP AR | us-central1-docker.pkg.dev/coral-marker-452616-n4/attestor/attestor:latest |
(An internal Azure ACR mirror exists at memwright.azurecr.io/attestor but is private — Azure customers should use az acr import from one of the public registries above.)
The image's default entrypoint is attestor mcp (MCP server over stdio). For full production use, point the container at an external Postgres + Neo4j via env vars (or compose them with attestor/infra/local/docker-compose.yml); override the entrypoint to run attestor doctor, attestor api, etc.
The one command. pipx install attestor then attestor quickstart — zero questions, one default profile. It brings up the local backends, uses a local Ollama bge-m3 embedder (no cloud key), wires the MCP server (./.mcp.json) + lifecycle hooks, runs attestor doctor, and prints every step. Reverse it any time with attestor teardown.
pipx install attestor && attestor quickstart # install (zero questions)
attestor teardown # uninstall (--purge also wipes data volumes)
Prerequisites: Docker running + Ollama serving bge-m3 (ollama pull bge-m3). quickstart's preflight scans for these and reports what's missing — it never prompts.
Driving it from inside Claude Code (plugin). Install the plugin once, then run the command it provides:
/plugin marketplace add bolnet/attestor # one-time
/plugin install attestor # then ENABLE it in the /plugin → Installed menu
/attestor:install-attestor # runs `attestor quickstart` for you
Plugin commands are namespaced: the command is/attestor:install-attestor(and/attestor:uninstall-attestor), not a bare/install-attestor. A freshly-installed plugin can be disabled — enable it in the/plugin→ Installed menu and/reload-plugins, or the command won't resolve.
Memory is isolated per project automatically — each working directory (git root, else cwd) is its own hard-isolated tenant, so projects never share memory. No namespace to configure.
The local backends come up as three Docker containers (the bundled attestor/infra/local/docker-compose.yml, which quickstart runs):
| Container | Type | Storage role |
|---|---|---|
attestor_postgres_document_db | Postgres 16 + pgvector | Document — source of truth |
attestor_pinecone_vector_db | Pinecone Local | Vector — embeddings |
attestor_neo4j_graph_db | Neo4j 5 + GDS | Graph — PageRank / BFS |
Every container, volume, and the compose network/project is namedattestor_…, sodocker ps -a \| grep attestor(anddocker volume ls \| grep attestor) lists everything Attestor owns.
Cloud / managed backends (Neon · RDS · Cloud SQL, Pinecone Cloud, Neo4j AuraDB) and alternative embedders (Pinecone Inference llama-text-embed-v2, Voyage voyage-4, OpenAI text-embedding-3) are configured in ~/.attestor/attestor.yaml — see docs/INSTALL.md.
---
Attestor ships with a canonical SKILL.md at skills/attestor-memory/SKILL.md. Both Anthropic (skills-2025-10-02) and OpenAI's Responses API converged on this format — a markdown file with YAML frontmatter — for distributing reusable agent expertise. The wheel ships the SKILL.md, so every 2026-grade harness can auto-discover it after a single pip install attestor.
The skill teaches the agent the six core primitives (recall, add, timeline, current_facts, forget, audit) plus the v4 enterprise surface (bi-temporal as_of replay, RBAC roles, namespace isolation, provenance signing, GDPR export / purge). Every code example references methods that actually exist on attestor.AgentMemory, and a CI test (tests/test_skill_md.py) keeps the SKILL.md from drifting from the live API.
To pin the contract in your own host:
```bash pip install attestor python -c "import attestor, importlib.resources as r; print(r.files('attestor'))" # confirm wheel installed
Approximate, at reasoning_effort=high for answerer + judge, parallel=2, OpenRouter pricing:
| Run | N | Wall time | Cost |
|---|---|---|---|
| Quick smoke | 2 oracle | ~1 min | < $0.10 |
knowledge-update slice | 78 | ~30-60 min | ~$3-5 |
temporal-reasoning slice | 133 | ~50-100 min | ~$5-8 |
| Full LME-S 500q | 500 | ~75-180 min | ~$20-30 |
| Synthetic supersession | 50 | ~5 min | ~$0.50 (embeddings only) |
To cut costs, edit configs/attestor.yaml's models.reasoning_effort.{answerer,judge} from high → medium or low.
scripts/bench/lme_run.sh knowledge-update 10
scripts/bench/lme_all.sh 10
Verify your install end-to-end against a tiny LongMemEval slice. Defaults come from configs/attestor.yaml: Pinecone Inference llama-text-embed-v2 (1024-D) embedder + Pinecone vector store, openai/gpt-5.5 answerer, dual judges (openai/gpt-5.5 + anthropic/claude-sonnet-4-6), parallel=2.
set -a && source .env && set +a # OPENROUTER_API_KEY, PINECONE_API_KEY, NEO4J_PASSWORD
.venv/bin/python scripts/lme_smoke_local.py --n 2 --yes
Every model and parameter comes from YAML — see § Benchmarking below for the full bench harness.
---
bench:
lme:
variant: s # s | m | oracle
cache_dir: ~/.cache/attestor/lme
output_dir: docs/bench
sample_limit: null # null = full dataset; int = truncate
category: null # null = all 7; or single slice name
categories: [...] # iteration order for lme_all.sh
variants_to_run: [...] # for full size matrix
knowledge_updates:
fixtures_path: evals/knowledge_updates/fixtures.json
n_cases: 50
target_score: 0.92
categories: [numeric, categorical, ...]
report:
headline_slice: abstention
trend_csv: docs/bench/trend.csv
markdown_path: docs/bench/LME-S.md
---
A trigger-maintained content_tsv tsvector + GIN index lifts queries that embeddings under-recall (acronyms, IDs, rare proper nouns). Enabled when v4 schema is detected; fuses with the vector lane via Reciprocal Rank Fusion (RRF, k=60). Graceful no-op on backends without the column (core.py:122-130).
---
mem.set_quota(user_id, daily_writes=...) → enforced on add against the v4 user_quotas table (core.py:592-621). Optional; unset means unlimited.
---
Enable via config (signing.enabled = true). On every add, attestor signs the canonical payload id || agent_id || t_created || content_hash with an Ed25519 key. mem.verify_memory(memory_id) returns bool (core.py:623-640). Optional, off by default — turn on for adversarial-write contexts where you need cryptographic non-repudiation.
---
attestor/retrieval/orchestrator.py runs the same six steps for every query:
uses, authored-by, supersedes) injected as synthetic memoriesEvery call writes a JSONL trace to logs/attestor_trace.jsonl (disable via ATTESTOR_TRACE=0).
attestor quickstart
attestor quickstart does the whole local install non-interactively and prints every step: it writes ~/.attestor/{config.toml,attestor.yaml,.env}, brings up the three-role local stack in Docker, uses a local Ollama bge-m3 embedder (no cloud key), wires the Claude Code MCP server (./.mcp.json) + lifecycle hooks, and runs attestor doctor.
Prerequisites: Docker running, and Ollama serving bge-m3 (ollama pull bge-m3). quickstart runs a preflight that scans the ports/tools and tells you if anything is missing — it never prompts.
| Container | Role | Port | Purpose |
|---|---|---|---|
| Postgres 16 | Document | 5432 | Source of truth — content, tags, entity, ts, provenance, RLS-isolated by user_id |
| **Pinecone Local** | Vector | 5080-5089 | Dense embeddings, per-namespace isolation, plain gRPC (no HTTPS) |
| Neo4j 5 + GDS | Graph | 7687 | Entity nodes + typed edges, PageRank / BFS / Leiden |
To reverse it later: attestor teardown (zero-question; keeps your data volumes by default — --purge also wipes them, --dry-run previews).
In Claude Code, drive the same install conversationally: /plugin marketplace add bolnet/attestor → /plugin install attestor (then enable it), and run /attestor:install-attestor — it runs attestor quickstart for you. Cloud/managed backends (Neon / RDS / Cloud SQL, Pinecone Cloud, Neo4j AuraDB) and alternative embedders (Pinecone Inference llama-text-embed-v2, Voyage voyage-4, OpenAI text-embedding-3) are configured in ~/.attestor/attestor.yaml (the single source of truth) — see docs/INSTALL.md.
attestor doctor (run automatically at the end, or any time) checks all four subsystems: Document Store (Postgres), Vector Store (Pinecone), Graph Store (Neo4j), Retrieval Pipeline. The only hard dependency that cannot be down is the document store (Postgres); transient vector-probe failures are surfaced in the response trace rather than swallowed (retrieval/orchestrator.py — vector_error field).
Attestor 是一个用于减少代理 token 消耗的全文本检索系统,通过两次 API 调用实现。它通过全文本检索来重读整个会话,每次输入 token 都会增长 O(n²),并且每个会话的成本都会累积。Attestor 只检索所需的内容:每次调用约 200 个 token,到第 100 次调用时,输入 token 的数量会减少 21 倍,100% 的召回率在六个模型上都被测量过。
Attestor 提供了五个独立的功能标志,通过 `configs/attestor.yaml` 中的 boolean 值来控制。所有功能标志都默认关闭,可以通过 bench 运行来选择启用哪个功能并测量其提升和成本。
安装 Attestor 可以通过以下步骤完成:1. 使用 pip 安装 `pip install attestor` 或 `pipx install attestor`。2. 或者使用 Docker 镜像 `docker pull ghcr.io/bolnet/attestor:latest`。
使用 Attestor 的快速入门可以通过以下命令完成:`attestor quickstart`。它会自动安装所有依赖项,设置环境变量,并启动本地后端。
Attestor 的配置文件位于 `configs/attestor.yaml`,其中包含了 Pinecone Inference、LLM 嵌入器、答案生成器和评估器等组件的配置。用户可以通过修改此文件来调整 Attestor 的行为。
Attestor 的工作流程包括六个步骤:1. 向量 top-K — Pinecone cosines,k=50(pgvector 仍然作为可选的 fallback)。2. 图形狭窄 — Neo4j BFS 深度 ≤ 2 从每个候选项的实体到问题实体;亲和力奖励 p
常见问题包括:1. 如何启动本地栈?答案:使用 `attestor quickstart` 命令。2. 如何配置 Attestor?答案:修改 `configs/attestor.yaml` 文件。
高质量的开源MCP工具,具有自托管和确定性检索的特点
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
AI Skill Hub 点评:Attestor 的核心功能完整,质量良好。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | attestor |
| 原始描述 | 开源MCP工具:Auditable memory for agent teams. Self-hosted, deterministic retrieval, no LLM i。⭐13 · Python |
| Topics | agentsaimcppython |
| GitHub | https://github.com/bolnet/attestor |
| License | MIT |
| 语言 | Python |
收录时间:2026-05-26 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端