Borrowing it
Nothing to install: this file belongs to fabiolenine/mcp_deepmen0. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/fabiolenine/mcp_deepmen0/main/CLAUDE.mdgit clone --depth 1 https://github.com/fabiolenine/mcp_deepmen0Wrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/fabiolenine/mcp_deepmen0/claude-md)<a href="https://agentmods.dev/instructions/fabiolenine/mcp_deepmen0/claude-md"><img src="https://agentmods.dev/badge/instructions/fabiolenine/mcp_deepmen0/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/fabiolenine/mcp_deepmen0/claude-md"><img src="https://agentmods.dev/badge/instructions/fabiolenine/mcp_deepmen0/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.02260 | $0.02260 |
| Opus 5 | $0.01130 | $0.01130 |
| Sonnet 5 | $0.00452 | $0.00452 |
| Haiku 4.5 | $0.00226 | $0.00226 |
Grade A, and why
mcp_deepmen0 CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 58 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code when working with code in this repository.
MCP Servers
- mem0: Persistent memory across sessions. At the start of each session,
search_memoriesfor relevant context before asking the user to re-explain anything. Useadd_memorywhenever you discover project architecture, coding conventions, debugging insights, key decisions, or user preferences. Useupdate_memorywhen prior context changes. Save information like: "This project uses PostgreSQL with Prisma", "Tests run with pytest -v", "Auth uses JWT validated in middleware". When in doubt, save it — future sessions benefit from over-remembering.
Build & Test Commands
pip install -e ".[dev]" # Install with dev dependencies
python3 -m pytest tests/unit/ -v # Unit tests (mocked, no infra needed)
python3 -m pytest tests/contract/ -v # Contract tests (validates mem0ai internals)
python3 -m pytest tests/integration/ -v # Integration tests (requires live Qdrant + Neo4j + Ollama)
python3 -m pytest tests/ -v # All tests
python3 -m pytest tests/ -m "not integration" -v # Skip integration
python3 -m pytest tests/unit/test_auth.py::TestIsOatToken -v # Single test class
python3 -m pytest tests/unit/test_auth.py::TestIsOatToken::test_oat_token_detected -v # Single test
Architecture
Self-hosted MCP server using mem0ai as a library. 15 tools (13 memory + 2 graph), FastMCP orchestrator.
Module roles:
server.py— FastMCP orchestrator, registers all tools +memory_assistantprompt; owns the async ingest wiring (_get_ingest(), envelope contract inadd_memory, submit-time validation inadd_document)ingest_queue.py— Durable SQLite (WAL) queue for asyncadd_memory/add_document: job kinds, idempotent enqueue, atomic FIFO claim (optionally kind-filtered), partial progress + heartbeat, exponential backoff → dead-letter, orphan recovery, retention gc (done 7d / dead 30d)ingest_worker.py— Single serial daemon thread draining the queue: injectssubmitted_atascreated_at(canonical fact time) +task_idprovenance, purge-on-retry (scoped by task_id AND created_at so UPDATEd pre-existing memories survive), poison-vs-retryable classification, Ollama warm-up, OpenObserve emit; document branch chunks PDFs and interleaves conversation adds between chunks; update branch (kind="update") re-embeds + re-classifies an existing memory without stamping a newcreated_atdocument_source.py— file_path validation (allowlist/realpath/magic/caps) + content-addressed spool (<sha256>.pdf) with reference-counting gcpdf_extract.py— poppler wrapper: pdfinfo metadata, single-pass pdftotext + per-page fallback, NFC + dehyphenation, per-page text/scanned classification;rasterize_pages()renders pages to PNG (temp file — this poppler won't write PNG to stdout) for OCRimage_extract.py— local Ollama VLM transcription (v0.5b):transcribe_image()for scanned pages and standalone images;prepare_vision()/release_vision()force the two model swaps (the VLM and the extractor model don't co-fit in 8GB); gated byMEM0_ENABLE_VISION+MEM0_VLM_MODELchunking.py— pure page-aware chunker (no project imports; promotable to the fork core)config.py— Env vars → mem0aiMemoryConfigdict, handles all 5 graph LLM provider configsauth.py— 3-tier token fallback:MEM0_ANTHROPIC_TOKEN→~/.claude/.credentials.json→ANTHROPIC_API_KEYllm_anthropic.py— Custom Anthropic provider registered with mem0ai'sLlmFactory; handles OAT headers, structured outputs (JSON schema viaoutput_config), and tool-call parsingllm_router.py—SplitModelGraphLLMroutes by tool name: extraction tools → Gemini, contradiction tools → Claudehelpers.py—_mem0_call()error wrapper,call_with_graph()threading lock for per-call graph toggle,safe_bulk_delete()iterates+deletes individually (never callsmemory.delete_all()),patch_graph_sanitizer()monkey-patches mem0ai's relationship sanitizer for Neo4j compliancegraph_tools.py— Direct Neo4j Cypher queries with lazy driver init__init__.py— Suppresses mem0ai telemetry before any importsvault/— DeepMem0 Vault: bearer-token auth for this server plus the whole web UI on :8080 (credentials AND corpus)store.py— users/tokens/audit_log in SQLite WAL, schema v4 viaPRAGMA user_version; every mutation is oneBEGIN IMMEDIATEthat includes its audit row; unique partial index onrenewed_from(one successor per token);verify_token()+ conditionallast_used_attouch. stdlib onlymiddleware.py— pure-ASGI gate (off/shadow/onviaMEM0_REQUIRE_AUTH); notBaseHTTPMiddleware, which would buffer SSE; publishes the principal onscope["state"]["vault_user"]. stdlib onlysecurity.py/i18n.py/web.py/guards.py/main.py— token+password+email validation, PT/EN strings, Starlette+Jinja2+HTMX UI, the sharedlogin_requiredguard,deepmem0-vaultentry point withbootstrap-admin. Need the[vault]extramemories/— READ-ONLY read model behind the corpus screens (/memories,/search,/queue,/entities).qdrant_read.pybrowses/counts via Qdrant scroll —get_memoriesis a capped first page, not pagination, and the ACT-R fields never pass the MCP metadata whitelist;local_ro.pyopens the ingest/history SQLite withmode=ro+PRAGMA query_only;mcp_client.pyis the ONE thing that goes through the MCP (semantic search, alwaysreinforce=False, so browsing never counts as a re-encounter);model.pyholds the pure presenters — including a cursor that carries the ids already served at the boundary timestamp, becausecreated_atis not unique (document chunks share one instant; the corpus has one with 67 points) andstart_fromis inclusive
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 8d ago First seen · 58 lines · 2,260 tokens per session scan A 990d7b1210b4
mcp_deepmen0 CLAUDE.md is an instructions file published in the GitHub repository fabiolenine/mcp_deepmen0 (1 stars, last pushed 1mo ago), licensed MIT. It adds 2,260 tokens to every session, about $0.0113 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.