mcp_deepmen0: Instructions file for Claude Code

CLAUDE.md

mcp_deepmen0 CLAUDE.md is an instructions file for Claude Code from fabiolenine/mcp_deepmen0. It costs 2,260 tokens per session, scanned A, original, MIT.

Repository instructions for Claude Code covering project guidance, MCP servers, architecture, and commands for running different test groups.

In plain words
What is it for?
They are for working on the specified repository, using its memory service, and running unit, contract, integration, or full test suites.
Why use it?
They give the coding agent the project's established context and testing procedure instead of making it infer them.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is fabiolenine/mcp_deepmen0's own configuration. It tells Claude Code how to work on mcp_deepmen0 itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mcp_deepmen0 configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/fabiolenine/mcp_deepmen0/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/fabiolenine/mcp_deepmen0

Made for: Claude Code.

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

agentmods badge for mcp_deepmen0 CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/fabiolenine/mcp_deepmen0/claude-md/github.svg)](https://agentmods.dev/instructions/fabiolenine/mcp_deepmen0/claude-md)
Your own site
<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.

agentmods 80×15 button for mcp_deepmen0 CLAUDE.md

Your own site · 80×15
<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>
Per session 2,260 This file is loaded in full into every session.
When invoked 2,260 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

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

Measured 8d ago against content hash 990d7b1210b4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

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.

CLAUDE.md · 58 lines

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_memories for relevant context before asking the user to re-explain anything. Use add_memory whenever you discover project architecture, coding conventions, debugging insights, key decisions, or user preferences. Use update_memory when 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_assistant prompt; owns the async ingest wiring (_get_ingest(), envelope contract in add_memory, submit-time validation in add_document)
  • ingest_queue.py — Durable SQLite (WAL) queue for async add_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: injects submitted_at as created_at (canonical fact time) + task_id provenance, 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 new created_at
  • document_source.py — file_path validation (allowlist/realpath/magic/caps) + content-addressed spool (<sha256>.pdf) with reference-counting gc
  • pdf_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 OCR
  • image_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 by MEM0_ENABLE_VISION+MEM0_VLM_MODEL
  • chunking.py — pure page-aware chunker (no project imports; promotable to the fork core)
  • config.py — Env vars → mem0ai MemoryConfig dict, handles all 5 graph LLM provider configs
  • auth.py — 3-tier token fallback: MEM0_ANTHROPIC_TOKEN~/.claude/.credentials.jsonANTHROPIC_API_KEY
  • llm_anthropic.py — Custom Anthropic provider registered with mem0ai's LlmFactory; handles OAT headers, structured outputs (JSON schema via output_config), and tool-call parsing
  • llm_router.pySplitModelGraphLLM routes by tool name: extraction tools → Gemini, contradiction tools → Claude
  • helpers.py_mem0_call() error wrapper, call_with_graph() threading lock for per-call graph toggle, safe_bulk_delete() iterates+deletes individually (never calls memory.delete_all()), patch_graph_sanitizer() monkey-patches mem0ai's relationship sanitizer for Neo4j compliance
  • graph_tools.py — Direct Neo4j Cypher queries with lazy driver init
  • __init__.py — Suppresses mem0ai telemetry before any imports
  • vault/ — 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 via PRAGMA user_version; every mutation is one BEGIN IMMEDIATE that includes its audit row; unique partial index on renewed_from (one successor per token); verify_token() + conditional last_used_at touch. stdlib only
    • middleware.py — pure-ASGI gate (off/shadow/on via MEM0_REQUIRE_AUTH); not BaseHTTPMiddleware, which would buffer SSE; publishes the principal on scope["state"]["vault_user"]. stdlib only
    • security.py / i18n.py / web.py / guards.py / main.py — token+password+email validation, PT/EN strings, Starlette+Jinja2+HTMX UI, the shared login_required guard, deepmem0-vault entry point with bootstrap-admin. Need the [vault] extra
    • memories/ — READ-ONLY read model behind the corpus screens (/memories, /search, /queue, /entities). qdrant_read.py browses/counts via Qdrant scroll — get_memories is a capped first page, not pagination, and the ACT-R fields never pass the MCP metadata whitelist; local_ro.py opens the ingest/history SQLite with mode=ro + PRAGMA query_only; mcp_client.py is the ONE thing that goes through the MCP (semantic search, always reinforce=False, so browsing never counts as a re-encounter); model.py holds the pure presenters — including a cursor that carries the ids already served at the boundary timestamp, because created_at is not unique (document chunks share one instant; the corpus has one with 67 points) and start_from is inclusive

Read the full file on GitHub · 58 lines

Changes

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.

  1. 8d ago First seen · 58 lines · 2,260 tokens per session scan A 990d7b1210b4

Subscribe to this mod's changes

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.

Related

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.

vercel/next.js · 7,296 tokens

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.

openai/codex · 5,153 tokens

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

microsoft/vscode · 6,785 tokens

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

microsoft/vscode · 5,001 tokens

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.

langchain-ai/langchain · 4,469 tokens

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.

github/spec-kit · 7,104 tokens