Skip to main content
Glama
 ██████   ██████ ██████████ ██████   ██████   █████████  ███████████
░░██████ ██████ ░░███░░░░░█░░██████ ██████   ███░░░░░███░░███░░░░░███
 ░███░█████░███  ░███  █ ░  ░███░█████░███  ███     ░░░  ░███    ░███
 ░███░░███ ░███  ░██████    ░███░░███ ░███ ░███          ░██████████
 ░███ ░░░  ░███  ░███░░█    ░███ ░░░  ░███ ░███          ░███░░░░░░
 ░███      ░███  ░███ ░   █ ░███      ░███ ░░███     ███ ░███
 █████     █████ ██████████ █████     █████ ░░█████████  █████
░░░░░     ░░░░░ ░░░░░░░░░░ ░░░░░     ░░░░░   ░░░░░░░░░  ░░░░░

Why MemCP?

Claude Code loses everything after /compact. Previous decisions, insights, technical findings, and conversation context vanish. Long sessions hit the context window limit and critical information gets pushed out. Every new session starts from scratch.

MemCP solves this. It gives Claude a persistent external memory — a place to store, organize, and retrieve knowledge across sessions without consuming context window tokens.

Problem

How MemCP Solves It

Context lost after /compact

Auto-save hooks force Claude to persist insights before compact

Session boundaries erase knowledge

Insights persist in SQLite across all sessions

Large documents fill context window

Content stays on disk as named variables; Claude loads only what it needs

No way to connect related knowledge

MAGMA 4-graph links insights via semantic, temporal, causal, and entity edges

Search is limited to current session

Tiered search (keyword → BM25 → semantic → hybrid) across all stored content

MemCP implements the RLM framework (Recursive Language Model, arXiv:2512.24601) — an active exploration model where content stays on disk and Claude decides what to load, rather than passive RAG retrieval.


Related MCP server: Cortex

Architecture

graph TB
    CC[Claude Code] -->|MCP Protocol| S[MemCP Server<br/>FastMCP]
    S --> M[Memory<br/>24 tools]
    S --> G[MAGMA Graph<br/>SQLite]
    S --> SR[Search<br/>5 tiers]
    S --> C[Context Store<br/>Filesystem]

    G -->|4 edge types| E1[Semantic]
    G --> E2[Temporal]
    G --> E3[Causal]
    G --> E4[Entity]

    SA[Sub-Agents] -->|MCP| S
    SA --> A1[Analyzer]
    SA --> A2[Mapper x N]
    SA --> A3[Synthesizer]

    H[Hooks] -->|PreCompact| CC
    H -->|Reminders| CC

3-layer delegation: server.py (MCP endpoints) → tools/*.py (orchestration) → core/*.py (business logic)

Storage: SQLite for the knowledge graph (graph.db) + filesystem for contexts and chunks (~/.memcp/)

Dependencies: Only 2 core packages (mcp, pydantic). Everything else is optional and unlocks progressively better capabilities.


Features

Memory & Knowledge Graph

  • 24 MCP tools — remember, recall, forget, search, chunk, filter, traverse, reinforce, consolidate, and more

  • MAGMA 4-graph — insights connect via semantic, temporal, causal, and entity edges in SQLite

  • Hebbian co-retrieval strengthening — edges between frequently co-recalled insights strengthen automatically

  • Activation-based edge decay — stale, unused edges fade over time (exponential decay with configurable half-life)

  • Memory feedback — mark insights as helpful or misleading via memcp_reinforce; affects future ranking

  • Memory consolidation — detect and merge near-duplicate insights via memcp_consolidation_preview + memcp_consolidate

  • Intent-aware recall — "why did we choose X?" follows causal edges; "when was Y decided?" follows temporal edges

  • Auto entity extraction — regex-based (files, modules, URLs, CamelCase) + optional spaCy NER (pip install memcp[ner]) + LLM-based via sub-agents

  • Secret detection — blocks accidental storage of API keys, tokens, and credentials (8 regex patterns)

  • Semantic deduplication — optional embedding-based similarity check prevents near-duplicate insights

Context Management

  • Context-as-variable — large content stored on disk, Claude sees only metadata (type, size, token count)

  • 6 chunking strategies — auto, lines, paragraphs, headings, chars, regex

  • RLM navigation — peek, grep, filter without loading entire documents

  • 5-tier search — keyword (stdlib) → BM25 (bm25s) → fuzzy (rapidfuzz) → semantic (model2vec/fastembed) → hybrid RRF fusion

  • Persistent BM25 index — corpus-hash-based cache avoids per-query index rebuilds

  • Reciprocal Rank Fusion — score-agnostic fusion of BM25 + semantic + graph results (replaces alpha-weighted blend)

  • HNSW vector index — optional usearch backend for O(log N) approximate nearest neighbor search

  • Graceful degradation — always works with zero optional deps; each extra unlocks better search

  • Token budgetingmax_tokens parameter caps how much enters the context window

Sub-Agents (RLM Map-Reduce)

  • 4 Claude Code sub-agents — analyzer, mapper, synthesizer, entity-extractor

  • Parallel chunk processing — mappers run on Haiku in background, synthesizer combines on Sonnet

  • Independent context windows — sub-agents don't consume your main context

Lifecycle & Organization

  • Auto-save hooks — PreCompact blocks until context is saved; progressive reminders at 10/20/30 turns

  • 3-zone retention — Active → Archive (compressed) → Purge (logged deletion)

  • Multi-project — auto-detects project from git root, namespaces all data

  • Multi-session — tracks sessions with timestamps and insight counts

Developer Experience

  • 458 tests across 22 test files (unit + integration + concurrency), CI on Python 3.10/3.11/3.12

  • 77 benchmarks — token efficiency, context rot, window management, scale behavior

  • Interactive installer — step-by-step setup with bash scripts/install.sh

  • Docker support — single-command containerized deployment

  • Zero-config — works out of the box with sensible defaults


Available MCP Tools

MemCP exposes 24 MCP tools organized into 8 categories. For full documentation with parameters, examples, and tips, see docs/TOOLS.md.

Core Memory (5 tools)

Tool

Description

memcp_ping

Health check — returns server status and memory statistics

memcp_remember

Save an insight to persistent memory (decisions, facts, preferences, findings)

memcp_recall

Retrieve insights from memory with query, category, importance, and token budget filters

memcp_forget

Remove an insight from memory by ID

memcp_status

Current memory statistics — insight count, categories, importance distribution

Context Management (8 tools)

Tool

Description

memcp_load_context

Store content as a named context variable on disk (from text or file path)

memcp_inspect_context

Inspect a stored context — metadata and preview without loading full content

memcp_get_context

Read a stored context's content or a specific line range

memcp_chunk_context

Split a stored context into navigable numbered chunks (6 strategies: auto, lines, paragraphs, headings, chars, regex)

memcp_peek_chunk

Read a specific chunk from a chunked context

memcp_filter_context

Filter context content by regex pattern — returns only matching (or non-matching) lines

memcp_list_contexts

List all stored context variables

memcp_clear_context

Delete a stored context and its chunks

Search (1 tool)

Tool

Description

memcp_search

Search across memory insights and context chunks — auto-selects best available method (hybrid → BM25 → keyword)

Graph Memory (2 tools)

Tool

Description

memcp_related

Traverse graph from an insight — find connected knowledge via semantic, temporal, causal, or entity edges

memcp_graph_stats

Graph statistics — node count, edge counts by type, top entities

Cognitive Memory (3 tools)

Tool

Description

memcp_reinforce

Provide feedback on an insight — mark as helpful or misleading, affects ranking

memcp_consolidation_preview

Preview groups of similar insights that could be merged (dry-run)

memcp_consolidate

Merge a group of similar insights into one — unions tags, keeps best importance

Retention Lifecycle (3 tools)

Tool

Description

memcp_retention_preview

Preview what would be archived or purged (dry-run, no changes)

memcp_retention_run

Execute retention — archive old items, optionally purge past retention period

memcp_restore

Restore an archived context or insight back to active

Multi-Project & Session (2 tools)

Tool

Description

memcp_projects

List all projects with insight, context, and session counts

memcp_sessions

List sessions, optionally filtered by project


Benchmarks

MemCP includes a benchmark suite that measures the token efficiency advantage of persistent memory over context-window-only operation. The suite compares Native mode (all knowledge in the context window) against RLM mode (knowledge stored externally, loaded on demand via MCP tools).

Token Efficiency

Scenario

Native

RLM

Advantage

Reload 50 insights

896 tokens

167 tokens

5.4x less

Reload 500 insights

9,380 tokens

462 tokens

20.3x less

Analyse 5K-token doc

5,077 tokens

231 tokens

22.0x less

Analyse 50K-token doc

50,460 tokens

231 tokens

218.4x less

Cross-reference knowledge

1,861 tokens

172 tokens

10.8x less

Context Rot Resistance

Event

Native

RLM

After /compact

~5% retained

100% retained

After 3 compactions

~2% retained

100% retained

Cross-session recall

0%

92%

Context Window Management

Scenario

Native

RLM

10 simultaneous docs — window utilisation

93.6%

1.0%

Documents manageable (128K window)

13

50

Turns before first eviction

early

100+

Methodology note: The native baseline models worst-case context window loading. Real Claude Code also uses built-in tools for on-demand retrieval. See the full benchmark report for methodology notes, caveats, and all 40 comparisons.

Run the benchmarks yourself:

make benchmark

Full report: benchmark_output/benchmark_report.md | Raw data: benchmark_output/benchmark_results.json


Prerequisites

Before installing MemCP, ensure you have the following on your machine:

Requirement

Version

Check Command

Python

3.10 or higher

python3 --version

pip

Latest recommended

pip --version

Git

Any recent version

git --version

Claude Code CLI

Latest

claude --version

Claude Code CLI is required for MCP server registration, hooks, and sub-agent deployment. Install it from Anthropic's documentation.

Optional (for Docker installation):

Requirement

Version

Check Command

Docker

20.10+

docker --version

Docker Compose

2.0+ (optional)

docker compose version


Installation

git clone https://github.com/mohamedali-may/memcp.git
cd memcp
make setup

The interactive installer will:

  1. Check Python version, pip, Claude CLI

  2. Ask your preferred install method (dev/pip/Docker)

  3. Let you choose optional features (search, semantic, fuzzy, cache)

  4. Install MemCP and verify the import

  5. Register the MCP server with Claude Code

  6. Deploy 4 RLM sub-agents to ~/.claude/agents/ (user-level, available across all projects)

  7. Merge auto-save hooks into ~/.claude/settings.json (preserves existing settings)

  8. Deploy CLAUDE.md to your project (session instructions for Claude Code)

Docker

# Build and run
docker build -t memcp .
claude mcp add memcp -- docker run --rm -i \
  -v ~/.memcp:/data -e MEMCP_DATA_DIR=/data memcp

Or with docker-compose:

docker-compose up -d
claude mcp add memcp -- docker run --rm -i \
  -v ~/.memcp:/data -e MEMCP_DATA_DIR=/data memcp

Manual Installation

If you prefer not to use the interactive installer:

# 1. Install in a venv
make dev                                    # All extras (search, fuzzy, semantic, cache, …)
source .venv/bin/activate

# Or pick specific extras:
# pip install -e ".[dev]"                   # Dev tools only (pytest, ruff)
# pip install -e ".[dev,search,fuzzy]"      # + BM25 + typo tolerance
# pip install -e ".[dev,semantic,cache]"    # + vector embeddings + caching

# 2. Register with Claude Code
claude mcp add memcp -s user -- .venv/bin/python -m memcp

# 3. Deploy sub-agents (user-level, available across all projects)
mkdir -p ~/.claude/agents
cp agents/memcp-*.md ~/.claude/agents/

# 4. Merge hooks into global Claude Code settings
# If ~/.claude/settings.json doesn't exist or is empty:
cp hooks/snippets/settings.json ~/.claude/settings.json
# If it already has content, manually merge the "hooks" key from hooks/snippets/settings.json

# 5. Deploy CLAUDE.md to your project
cp templates/CLAUDE.md ./CLAUDE.md

# 6. Verify — in a Claude Code session, type: memcp_ping()

Uninstall

make teardown

The uninstaller lets you choose what to remove: MCP registration, sub-agents (~/.claude/agents/), hooks (from ~/.claude/settings.json), virtual environment, data directory, or everything.


How It Works

MemCP follows the RLM (Recursive Language Model) framework: content is stored externally as named variables, and Claude actively navigates to what it needs — rather than passively receiving retrieved chunks (RAG).

The Flow

Session Start
  │
  ├─ memcp_recall(importance="critical")     ← Load critical rules
  ├─ memcp_status()                          ← See memory stats
  │
  │  ... working ...
  │
  ├─ memcp_remember("Decided to use Redis",  ← Save a decision
  │     category="decision",
  │     importance="high",
  │     tags="architecture,cache")
  │
  │  ... context filling up ...
  │
  ├─ [Hook] "Consider saving context"        ← Auto-reminder at 10 turns
  │
  ├─ memcp_load_context("session-notes",     ← Store large content on disk
  │     content="...")
  │
  │  ... /compact ...
  │
  ├─ [Hook] "SAVE REQUIRED"                  ← Blocks until saved
  ├─ memcp_remember(...)                     ← Save remaining insights
  │
Next Session
  │
  ├─ memcp_recall(importance="critical")     ← Everything is still here
  └─ memcp_search("Redis decision")          ← Full search across sessions

Context-as-Variable (RLM)

Instead of loading a 50K-token document into the prompt:

memcp_load_context("report", file_path="large_report.md")
memcp_inspect_context("report")          → type=markdown, 18K tokens, preview
memcp_chunk_context("report", "headings") → 12 chunks created
memcp_peek_chunk("report", 3)            → reads only chunk #3 (~1500 tokens)
memcp_filter_context("report", "TODO|FIXME")  → matching lines only

Result: ~1500 tokens in context instead of 18,000. A 92% reduction.

Knowledge Graph (MAGMA)

Every memcp_remember() creates a graph node and auto-generates edges:

memcp_remember("Use SQLite for graph", category="decision", tags="db")
  │
  ├── temporal edge → insights created in last 30 min
  ├── entity edge  → other insights mentioning "SQLite"
  ├── semantic edge → top-3 similar insights by content overlap
  └── causal edge  → if "because"/"therefore" detected, links to cause

Then memcp_recall("why SQLite?") detects "why" intent and follows causal edges to find the reasoning.


Usage Examples

1. Remember Decisions Across Sessions

memcp_remember(
    "Never push directly to main — always use PRs with at least 1 review",
    category="decision",
    importance="critical",
    tags="git,workflow"
)

Next session: memcp_recall(importance="critical") loads this rule automatically.

2. Analyze a Large Codebase File

memcp_load_context("api-module", file_path="src/api/routes.py")
memcp_inspect_context("api-module")
  → python, 2400 lines, ~15K tokens
memcp_chunk_context("api-module", strategy="lines", chunk_size=100)
  → 24 chunks created
memcp_filter_context("api-module", "def\\s+\\w+")
  → all function definitions (50 lines instead of 2400)
memcp_peek_chunk("api-module", 5)
  → read chunk #5 in detail

3. Cross-Reference with Graph Traversal

memcp_remember("Found race condition in file writer", category="finding", tags="bug,concurrency")
memcp_remember("Fixed race condition with flock", category="decision", tags="bug,concurrency")

memcp_related("abc123", edge_type="causal")
  → shows the finding linked to the fix decision
memcp_graph_stats()
  → 42 nodes, 287 edges, top entities: ["file writer", "flock", ...]

4. Map-Reduce with Sub-Agents

For analyzing a large document across multiple chunks in parallel:

  1. memcp_chunk_context("design-doc", "auto") — partition

  2. Launch memcp-mapper instances in background (one per chunk, Haiku)

  3. Launch memcp-synthesizer in foreground with all mapper outputs (Sonnet)

  4. Get a coherent answer with citations, cross-referenced against the knowledge graph


Project Structure

memcp/
├── src/memcp/
│   ├── __init__.py              # Package version
│   ├── server.py                # FastMCP server — 24 tool definitions (async)
│   ├── config.py                # Environment config (dataclass) + validation
│   ├── core/
│   │   ├── memory.py            # remember, recall, forget, status + semantic dedup
│   │   ├── errors.py            # MemCPError hierarchy (5 exception types)
│   │   ├── secrets.py           # Secret detection (8 regex patterns)
│   │   ├── graph.py             # MAGMA 4-graph facade (delegates to components)
│   │   ├── node_store.py        # SQLite connection, schema, node CRUD, entity index
│   │   ├── edge_manager.py      # 4-type edge generation, Hebbian learning, edge decay
│   │   ├── graph_traversal.py   # Query routing, intent detection, graph traversal
│   │   ├── consolidation.py     # Similarity grouping + merge logic
│   │   ├── async_utils.py       # Thread pool executor for non-blocking I/O
│   │   ├── context_store.py     # Named context variables on disk
│   │   ├── chunker.py           # 6 splitting strategies
│   │   ├── search.py            # Tiered: keyword → BM25 → semantic → hybrid + BM25 cache
│   │   ├── embeddings.py        # Model2Vec / FastEmbed providers
│   │   ├── vecstore.py          # Vector store (brute-force + optional HNSW via usearch)
│   │   ├── embed_cache.py       # Disk cache for embeddings
│   │   ├── retention.py         # 3-zone lifecycle (active → archive → purge)
│   │   ├── project.py           # Git root detection + session management
│   │   └── fileutil.py          # Atomic writes, flock, safe names
│   └── tools/
│       ├── context_tools.py     # Context + chunking tool implementations
│       ├── search_tools.py      # Search tool implementation
│       ├── graph_tools.py       # Graph traversal tools
│       ├── feedback_tools.py    # Feedback/reinforce tool
│       ├── consolidation_tools.py # Consolidation preview + merge tools
│       ├── retention_tools.py   # Retention lifecycle tools
│       └── project_tools.py     # Project/session tools
├── hooks/
│   ├── pre_compact_save.py      # Block /compact until context saved
│   ├── auto_save_reminder.py    # Progressive reminders (10/20/30 turns)
│   ├── reset_counter.py         # Reset counter after saves
│   └── snippets/
│       └── settings.json        # Hook registration (merged into ~/.claude/settings.json)
├── agents/                      # RLM sub-agent templates (deployed to ~/.claude/agents/)
│   ├── memcp-analyzer.md        # Peek → identify → load → analyze
│   ├── memcp-mapper.md          # MAP phase (Haiku, parallel)
│   ├── memcp-synthesizer.md     # REDUCE phase (Sonnet)
│   └── memcp-entity-extractor.md  # LLM entity extraction
├── templates/                   # Deployed by installer to target locations
│   └── CLAUDE.md                # Session instructions (deployed to project root)
├── scripts/
│   ├── install.sh               # Interactive installer (8 steps)
│   └── uninstall.sh             # Cleanup script
├── docs/
│   ├── ARCHITECTURE.md          # System design + Mermaid diagrams
│   ├── TOOLS.md                 # All 24 tools reference
│   ├── SEARCH.md                # Tiered search system
│   ├── GRAPH.md                 # MAGMA 4-graph memory
│   ├── HOOKS.md                 # Auto-save hooks
│   ├── COMPARISON.md            # MemCP vs alternatives
│   └── adr/                     # Architecture Decision Records
│       ├── README.md            # ADR index
│       ├── 001-sqlite-filesystem-hybrid-storage.md
│       ├── 002-tiered-search-architecture.md
│       ├── 003-magma-4-graph-memory.md
│       ├── 004-sub-agents-over-sub-llms.md
│       ├── 005-minimal-core-dependencies.md
│       ├── 006-mcp-tools-over-python-repl.md
│       ├── 007-auto-save-hook-architecture.md
│       ├── 008-three-zone-retention-lifecycle.md
│       ├── 009-user-level-global-deployment.md
│       ├── 010-twelve-factor-configuration.md
│       ├── 011-hebbian-learning-edge-decay.md
│       ├── 012-reciprocal-rank-fusion-search.md
│       └── 013-memory-feedback-consolidation.md
├── tests/
│   ├── unit/                   # 22 test files, 428 unit tests
│   ├── integration/            # 30 integration + concurrency stress tests
│   └── benchmark/              # 77 benchmarks (token efficiency, context rot, scale)
├── benchmark_output/           # Generated benchmark reports
│   ├── benchmark_report.md     # Human-readable comparison tables
│   └── benchmark_results.json  # Machine-readable raw data
├── .github/workflows/
│   ├── ci.yml                   # Lint + test matrix + Docker build
│   └── release.yml              # PyPI publish on tag
├── pyproject.toml               # Build config + deps + ruff + pytest
├── Dockerfile                   # Python 3.12-slim
├── docker-compose.yml           # Volume mount for ~/.memcp
├── CONTRIBUTING.md              # Contributor guidelines
├── SECURITY.md                  # Security policy
└── LICENSE                      # MIT

Configuration

All configuration is via environment variables (12-factor):

Variable

Default

Description

MEMCP_DATA_DIR

~/.memcp

Data storage directory

MEMCP_MAX_INSIGHTS

10000

Max insight count before auto-pruning

MEMCP_MAX_CONTEXT_SIZE_MB

10

Max size per context variable

MEMCP_MAX_MEMORY_MB

2048

Max total memory usage

MEMCP_IMPORTANCE_DECAY_DAYS

30

Half-life for importance decay

MEMCP_RETENTION_ARCHIVE_DAYS

30

Days before archiving stale items

MEMCP_RETENTION_PURGE_DAYS

180

Days before purging archived items

MEMCP_EMBEDDING_PROVIDER

auto

model2vec, fastembed, or auto

MEMCP_SEARCH_ALPHA

0.6

Hybrid search blend (0=BM25 only, 1=semantic only)

MEMCP_SECRET_DETECTION

true

Enable/disable secret detection on remember()

MEMCP_SEMANTIC_DEDUP

false

Enable semantic deduplication (requires embeddings)

MEMCP_DEDUP_THRESHOLD

0.95

Cosine similarity threshold for semantic dedup

MEMCP_HEBBIAN_ENABLED

true

Enable/disable Hebbian co-retrieval strengthening

MEMCP_HEBBIAN_BOOST

0.05

Weight boost per co-retrieval event

MEMCP_EDGE_DECAY_HALF_LIFE

30

Half-life in days for edge weight decay

MEMCP_EDGE_MIN_WEIGHT

0.05

Minimum edge weight before pruning

MEMCP_RRF_K

60

RRF fusion smoothing constant

MEMCP_CONSOLIDATION_THRESHOLD

0.85

Similarity threshold for consolidation grouping


Optional Dependencies

MemCP's tiered dependency system means core features work with zero extras:

Extra

Package

What It Unlocks

Size

search

bm25s

BM25 ranked keyword search

~5MB

fuzzy

rapidfuzz

Typo-tolerant matching

~2MB

semantic

model2vec + numpy

Vector embeddings (256d)

~40MB

semantic-hq

fastembed + numpy

Higher quality embeddings (384d)

~200MB

cache

diskcache

Persistent embedding cache

~1MB

vectors

sqlite-vec

SIMD-accelerated KNN in SQLite

~2MB

hnsw

usearch + numpy

HNSW approximate nearest neighbor (O(log N))

~5MB

ner

spacy

spaCy NER entity extraction (en_core_web_sm)

~50MB

async

aiosqlite

Async SQLite (Phase 3 full async)

~0.1MB

pip install memcp                          # Core (keyword search)
pip install memcp[search,fuzzy]            # + ranked search + typo tolerance
pip install memcp[search,semantic,cache]   # + vector embeddings + caching
pip install memcp[all]                     # Everything

Documentation

Document

Description

templates/CLAUDE.md

Session instructions for Claude Code — deployed to project root by installer

docs/ARCHITECTURE.md

System design with Mermaid diagrams, data flows, directory layout

docs/TOOLS.md

All 24 tools — signatures, parameters, examples, tips

docs/SEARCH.md

Tiered search system — how each tier works, installation, degradation

docs/GRAPH.md

MAGMA 4-graph — edge types, intent detection, entity extraction, traversal

docs/HOOKS.md

Auto-save hooks — setup, behavior, customization

docs/COMPARISON.md

MemCP vs rlm-claude, CLAUDE.md, Letta, mem0, MAGMA

benchmark_output/benchmark_report.md

Benchmark results — token efficiency, context rot, scale (77 benchmarks)

docs/adr/

Architecture Decision Records — 13 ADRs documenting key technical choices


Development

make dev                    # Create venv + install all extras + pre-commit
source .venv/bin/activate

make test                   # Unit tests (core)
make test-all               # Unit + benchmark tests
make benchmark              # Benchmark suite only
make lint                   # Lint + format check (CI-equivalent)
make fmt                    # Auto-fix lint + format
make run                    # Start the MCP server
make clean                  # Remove build/cache artifacts

Note: make dev installs all optional extras (search, fuzzy, semantic, cache, vectors, llm, benchmark), so search and semantic tests will run out of the box. If you installed only specific extras, some search-tier tests will be skipped automatically.

Run make or make help to see all available targets.

CI/CD

  • GitHub Actions runs on every push: lint (ruff) + unit test matrix (Python 3.10/3.11/3.12) + Docker build

  • Release workflow publishes to PyPI on v* tag push


Contributing

See CONTRIBUTING.md for guidelines on:

  • Setting up the development environment

  • Code style and conventions

  • Testing requirements

  • Submitting pull requests


Security

See SECURITY.md for:

  • Reporting vulnerabilities

  • Security design decisions

  • Data storage considerations

Key security properties:

  • All data stored locally (~/.memcp/) — nothing leaves your machine

  • Secret detection blocks accidental storage of API keys, tokens, private keys, and passwords (8 regex patterns; disable with MEMCP_SECRET_DETECTION=false)

  • Atomic file writes with fcntl.flock for concurrent access safety

  • Input validation via safe_name() prevents path traversal

  • Structured error hierarchy (MemCPError) with consistent error handling across all modules

  • Config validation catches invalid environment variables at startup

  • SQLite WAL mode + busy_timeout=5000 for ACID-compliant concurrent operations

  • No network calls (unless using remote embedding providers)


License

MIT — see the LICENSE file for details.


Authors

  • Mohamed Ali May — Creator and maintainer

  • Claude Opus 4.5 — (joint R&D)


Acknowledgments & Inspirations

MemCP builds on ideas from several research papers and projects:

  • RLM: Recursive Language Models (MIT, 2025) — The context-as-variable framework and recursive sub-query pattern that MemCP implements

  • MAGMA: Multi-Agent Graph Memory Architecture (2026) — The 4-graph memory model (semantic, temporal, causal, entity edges) adapted for MemCP's knowledge graph

  • FastMCP — The Python MCP framework used for tool definitions

  • Claude Code — Anthropic's CLI that MemCP extends with persistent memory

  • rlm-claude — Exploring RLM concepts for Claude Code memory using skills

  • Letta (MemGPT) — Pioneering work on LLM memory systems

  • mem0 — Embedding-based memory layer for AI applications

Available Tools

24 tools
memcp_chunk_contextA

Split a stored context into navigable numbered chunks.

Args:
    name: Context name (must already be loaded)
    strategy: Splitting strategy — auto, lines, paragraphs, headings, chars, regex
    chunk_size: Size per chunk (lines for 'lines', chars for 'chars', tokens for 'paragraphs')
    overlap: Overlap between chunks (lines or chars)
ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
overlapNo
strategyNoauto
chunk_sizeNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations present, so the description carries the burden. It discloses the prerequisite (name must be loaded) and strategy options, but does not mention side effects, error behavior, or whether the operation is read-only.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short, front-loaded with the purpose, and efficiently uses bullet-style parameter definitions. Every sentence provides necessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 4 parameters (1 required) and an output schema, the description covers parameter semantics and prerequisites. It could mention that output provides chunk indices, but likely the output schema handles that.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description adds value by explaining each parameter's meaning (e.g., size units per strategy). Some details like default behavior for chunk_size=0 could be clearer.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'split' and resource 'stored context into navigable numbered chunks'. It is specific and distinguishes from siblings like memcp_peek_chunk which likely views chunks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context (splitting a loaded context) and explains parameters, but does not explicitly state when to use this over alternatives or provide exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_clear_contextA

Delete a stored context and its chunks.

Args:
    name: Context name to delete
ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses the destructive nature (deletion) and that associated chunks are removed, but with no annotations, it lacks details on side effects, reversibility, or permissions. This is adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, using only two sentences to convey the tool's purpose and parameter, with no redundant or irrelevant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

While the description covers the basic action and parameter, it does not address return values, error conditions, or the state after deletion, leaving some gaps given the lack of annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description adds value by explaining the single parameter 'name' as 'Context name to delete', clarifying its role beyond the bare schema definition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function with a specific verb ('Delete') and resource ('stored context and its chunks'), making its purpose unambiguous and differentiating it from sibling tools like memcp_forget.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives (e.g., memcp_forget), nor are there any usage conditions or exclusions mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_consolidateA

Merge a group of similar insights into one.

Keeps the best insight (most accessed by default), merges tags/entities
from others, redirects edges, and deletes duplicates.

Args:
    group_ids: Comma-separated insight IDs to merge
    keep_id: Which ID to keep (default: most accessed)
    merged_content: Optional override for the merged content
ParametersJSON Schema
NameRequiredDescriptionDefault
keep_idNo
group_idsYes
merged_contentNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

In the absence of annotations, the description effectively discloses key behavioral traits: it merges, keeps the best insight, merges tags/entities, redirects edges, and deletes duplicates. It lacks explicit mention of whether the operation is destructive or reversible, but the core behaviors are clear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, with a clear front-loaded summary followed by a parameter list. Every sentence earns its place; there is no redundancy or unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a consolidation tool, the description provides a solid overview. It covers the main actions and parameters. Minor gaps include how the 'most accessed' default is determined, but overall it is sufficiently complete for typical use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description compensates well by explaining the role of each parameter (group_ids, keep_id, merged_content) in the docstring. This adds significant meaning beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: merging similar insights into one. It specifies the actions (keeping best insight, merging tags/entities, redirecting edges, deleting duplicates), making it distinct from sibling tools like memcp_remember or memcp_forget.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for merging multiple similar insights but does not explicitly state when to use this tool over alternatives or provide exclusion criteria. There is no guidance on prerequisites or when consolidation is inappropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_consolidation_previewA

Preview groups of similar insights that could be merged.

Finds near-duplicate or very similar insights and groups them.
Dry-run — no changes made. Use memcp_consolidate to merge.

Args:
    threshold: Similarity threshold (0 = use default 0.85)
    limit: Max groups to return
    project: Filter by project
ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
projectNo
thresholdNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must convey all behavioral traits. It states 'Dry-run — no changes made,' which successfully indicates safety. However, it lacks details on behavior under extreme inputs, error conditions, or performance characteristics. The description is adequate but not thorough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: a brief purpose statement, a dry-run note, a clear sibling reference, and a cleanly formatted parameter list. Every sentence adds value, and the structure facilitates quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool is a preview with an output schema (assumed to describe return values), the description covers the essential: purpose, dry-run nature, sibling relationship, and parameter explanations. It is complete enough for an agent to use correctly, though additional notes on group formation criteria could help.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description compensates by explaining parameters in an 'Args' section. It clarifies that threshold=0 uses default 0.85, limit is max groups, and project filters by project. These explanations add meaning beyond the schema, though they could be more detailed (e.g., valid ranges).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Preview groups of similar insights that could be merged.' It specifies the action (preview), resource (groups of similar insights), and distinguishes from the sibling tool 'memcp_consolidate' by noting it's a dry-run and directing users to use the sibling for merging.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states the tool is a dry-run and advises 'Use memcp_consolidate to merge.' This provides clear context for when to use this tool versus the alternative. However, it doesn't elaborate on scenarios where this tool should be preferred or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_filter_contextA

Filter context content by regex pattern.

Returns only lines matching (or not matching) the pattern.

Args:
    name: Context name
    pattern: Regex pattern to match lines
    invert: If True, return lines that DON'T match the pattern
ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
invertNo
patternYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses the filtering behavior and the invert option, but does not mention side effects (none apparent), authorization needs, or error conditions. It is adequate but not rich.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose in one sentence, followed by a clear statement of behavior, then a terse docstring-style parameter list. No fluff; every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the existence of an output schema (not shown), the description need not detail return values. It covers the main functionality adequately. Minor gaps: no mention of required parameter validity or error handling, but acceptable for a simple filter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains all three parameters: name ('Context name'), pattern ('Regex pattern to match lines'), and invert ('If True, return lines that DON'T match the pattern'). This adds meaning beyond the schema's bare titles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Filter', the resource 'context content', and the mechanism 'by regex pattern'. It distinguishes from siblings like memcp_get_context (which returns entire context) and memcp_search (which likely searches across contexts).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains what the tool does (filters lines by regex) but does not explicitly state when to use it versus alternatives like memcp_get_context or memcp_inspect_context. It lacks usage context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_forgetB

Remove an insight from memory by ID.

Args:
    insight_id: The ID of the insight to remove
ParametersJSON Schema
NameRequiredDescriptionDefault
insight_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description must convey behavioral traits. It only says 'Remove an insight' without disclosing side effects (e.g., permanence, cascading effects, or error cases). This is insufficient for a deletion tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: two sentences plus parameter list, with the key action front-loaded. No extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the single parameter and output schema, the description covers basic functionality but lacks details on idempotency, error handling, or confirmation steps. Adequate for a simple deletion but not fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description adds value by explaining 'insight_id: The ID of the insight to remove'. While minimal, it clarifies the parameter's role beyond the schema's type and title.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Remove') and resource ('insight from memory'), and the tool name 'forget' complements this. It distinguishes from siblings like 'memcp_remember' (add) and 'memcp_recall' (retrieve).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool vs alternatives, when not to use it, or any prerequisites. The agent gets no context about appropriate usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_get_contextB

Read a stored context's content or a line range.

Args:
    name: Context name
    start: Start line (1-indexed, 0 = from beginning)
    end: End line (1-indexed, inclusive, 0 = to end)
ParametersJSON Schema
NameRequiredDescriptionDefault
endNo
nameYes
startNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose any behavioral traits such as side effects, error handling, or permissions. The word 'Read' implies idempotency, but no further detail is given about behavior when the context does not exist or when line ranges are invalid.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is brief and to the point, with a clear purpose statement followed by parameter descriptions. However, it could be slightly more concise by integrating the parameter explanations into the main sentence, and it does not use formatting to highlight key constraints.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 3 parameters (1 required) and an output schema, the description covers the input semantics well but omits return value explanation and error scenarios. The presence of an output schema reduces the need to describe return details, but overall completeness is moderate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description explains all three parameters (name, start, end) with semantic details like indexing (1-indexed) and default behavior (0=from beginning/to end). Since the schema has 0% description coverage, the description fully compensates by adding meaning beyond the schema's field names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the action ('Read') and the resource ('stored context's content or a line range'). It is specific but does not explicitly differentiate from sibling tools like memcp_inspect_context or memcp_load_context, relying on the agent to infer distinctions from context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its siblings. It does not mention prerequisites, alternatives, or when not to use it. The agent is left to infer use cases from the operation name and parameters.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_graph_statsB

Graph statistics — node count, edge counts by type, top entities.

Shows how knowledge is connected in the graph.

Args:
    project: Filter by project (empty = all projects)
ParametersJSON Schema
NameRequiredDescriptionDefault
projectNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It only vaguely mentions connectivity and lacks specifics on read-only nature, authentication, rate limits, or how results are ordered.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise and front-loaded: three lines of description followed by the parameter. Every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity (1 optional parameter, output schema exists), the description covers the needed semantics. It could mention output format specifics but is sufficient for basic usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter 'project' is explained with its default value and filtering behavior ('empty = all projects'), adding meaning beyond the schema which has 0% coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves graph statistics including node count, edge counts by type, and top entities. It distinguishes the tool's purpose from sibling tools, none of which explicitly deal with graph statistics.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. Among siblings like memcp_search or memcp_related, there is no differentiation or contextual advice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_inspect_contextA

Inspect a stored context — metadata and preview without loading full content.

Use this to check a context's type, size, and token count before deciding
whether to load it into the prompt.

Args:
    name: Context name to inspect
ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description must cover behavioral traits. It states it returns metadata and preview only, hinting at idempotent read. However, does not disclose error handling, auth, rate limits, or behavior for non-existent contexts, leaving gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Very concise: one-sentence purpose, one-sentence usage guidance, and an Args section. No redundant information; front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple inspection tool with one parameter and an existing output schema, the description covers purpose, usage, and parameter adequately. Assuming output schema documents return values, completeness is high.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% (no descriptions in schema). The description adds minimal info: 'Context name to inspect'. Lacks format, constraints, or examples, but is adequate for a single string parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly specifies 'Inspect a stored context' with verb and resource, and distinguishes from siblings like 'memcp_get_context' by noting it provides metadata and preview without loading full content.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit guidance: 'Use this to check a context's type, size, and token count before deciding whether to load it into the prompt.' Implies when not to use (when full content needed), but no explicit alternatives named.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_list_contextsB

List all stored context variables.

Args:
    project: Filter by project name (empty = all projects)
ParametersJSON Schema
NameRequiredDescriptionDefault
projectNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It states 'List' which implies read-only, but does not disclose pagination, limits, or side effects. Additional behavioral context is missing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise with two sentences covering purpose and parameter. Front-loaded purpose. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one optional parameter) and existence of an output schema (implied by context), the description is mostly adequate. However, it does not hint at the output structure, which could aid understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description compensates by explaining the 'project' parameter's purpose and default behavior ('empty = all projects'). This adds meaningful value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List all stored context variables,' providing a specific verb and resource. It distinguishes from siblings like memcp_get_context by implying it returns a collection, though not explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives (e.g., memcp_get_context, memcp_search). The description only mentions the project filter but lacks context for decision-making.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_load_contextA

Store content as a named context variable on disk.

Use this to save large content (files, conversation history, code)
that should be accessible without loading into the prompt.

Args:
    name: Unique name for this context (alphanumeric, dots, hyphens, underscores)
    content: The content to store (provide content OR file_path, not both)
    file_path: Path to a file to load as context
    project: Optional project name
ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
contentNo
projectNo
file_pathNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It only states basic storage functionality without disclosing behavior such as overwrite policy, error handling, or storage limits. This minimal disclosure leaves significant uncertainty.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is short and front-loaded with the main purpose, followed by an Args section. Every sentence adds value, though the name mismatch could be clarified further.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 4 parameters, no annotations, and an output schema (which covers return values), the description provides adequate usage details. However, it omits error conditions, return value meaning, and how this tool relates to retrieval tools like memcp_get_context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% coverage, so description adds vital meaning: explains name format, content vs file_path exclusivity, and project's optionality. This goes well beyond the bare schema names, making parameter usage clear.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it stores content as a named context variable on disk. It distinguishes from sibling tools by specifying its use for large content that should be accessible without loading into the prompt. However, the tool name 'load_context' might imply retrieval, which could cause confusion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance: 'Use this to save large content...' and advises on parameter exclusivity (content OR file_path). Lacks explicit when-not-to-use or alternative tools, but the context is clear enough for an AI agent to decide.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_peek_chunkB

Read a specific chunk from a chunked context.

Args:
    context_name: Context name
    chunk_index: Chunk number (0-indexed)
    start: Start line within chunk (1-indexed, 0 = from beginning)
    end: End line within chunk (1-indexed, inclusive, 0 = to end)
ParametersJSON Schema
NameRequiredDescriptionDefault
endNo
startNo
chunk_indexYes
context_nameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It states 'Read' which implies non-destructive, but does not disclose behavior on invalid chunk_index, out-of-range start/end, or whether the context must be chunked. No mention of return format or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise: one-line purpose followed by parameter list. No fluff, front-loaded with the action. Every sentence provides necessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool is part of a chunking system, the description does not mention that the context must be chunked (likely via memcp_chunk_context) or what happens if chunk_index is out of bounds. Output schema exists but is not described; return values are not addressed. Missing optional behavior details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so description must compensate. The docstring provides brief descriptions for each parameter (context_name, chunk_index, start, end), and clarifies that start/end are 1-indexed with 0 meaning from beginning/end. This adds meaning beyond the schema titles, but descriptions are minimal.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Read a specific chunk from a chunked context,' specifying the verb (Read) and the resource (specific chunk). This distinguishes it from siblings like memcp_get_context (reads entire context) and memcp_chunk_context (likely manages chunks).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. The description does not mention when to use memcp_peek_chunk instead of memcp_get_context or memcp_filter_context, nor does it specify prerequisites like the context needing to be chunked first.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_pingA

Health check. Returns server status and memory statistics.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It discloses that it returns status and memory stats, but does not mention side effects (likely none) or rate limits. Adequate for a simple ping.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One sentence, zero waste. Every word is necessary and the description is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low complexity, empty schema, and presence of an output schema, the description is complete. No additional information about return values is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist, and schema coverage is 100%. Baseline for 0 params is 4; description adds no extra meaning beyond the empty schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it's a health check returning server status and memory statistics. The verb 'check' and resource 'server status' are explicit, and it is distinct from sibling tools which handle context and search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. It's implied for connectivity testing, but no explicit context or exclusions are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_projectsA

List all projects with insight/context/session counts.

Shows every project that has data in MemCP.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states that the tool lists all projects with counts, but does not disclose any behavioral traits such as read-only nature, performance implications, or whether it requires authentication. The description is too minimal to be fully transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of two concise sentences. The first sentence states the main action, and the second clarifies the inclusion criterion. Every word is purposeful; no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (no parameters, has output schema), the description is largely sufficient. It explains what the tool does and what it shows. However, it does not explain what 'insight/context/session counts' entail, but since an output schema exists, that detail may be covered there.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters and schema coverage is trivially 100%. With no parameters to document, the baseline is 4. The description adds no parameter information, but none is needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List', the resource 'projects', and the specific scope 'with insight/context/session counts'. It distinguishes from sibling tools like memcp_list_contexts and memcp_sessions by focusing on projects rather than contexts or sessions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. The description does not mention when not to use it or contrast with other tools, leaving the agent to infer usage from the name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_recallA

Retrieve insights from memory.

Use this to find previously stored knowledge — decisions, preferences,
technical findings. Call at session start to load relevant context.

Args:
    query: Search term (searches content, tags, and summary)
    category: Filter by type
    importance: Filter by priority
    limit: Max results (default 10)
    max_tokens: Token budget — returns results until budget is exhausted (0 = unlimited)
    project: Filter by project
    session: Filter by session ID
    scope: "project" (default), "session" (current only), "all" (cross-project)
ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryNo
scopeNoproject
projectNo
sessionNo
categoryNo
importanceNo
max_tokensNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It explains parameter behaviors well, especially max_tokens ('Token budget — returns results until budget is exhausted') and scope options. It does not mention read-only nature or side effects, but the retrieval semantics are implied. Overall, it adds useful behavioral context beyond the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise: a single introductory sentence followed by a usage hint and a list of parameter explanations. Every sentence adds value, and the structure is front-loaded with the core purpose. No unnecessary words. This is exemplary conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema, the description appropriately focuses on input parameters and usage. It covers the main use case, parameter filters, and the suggestion to call at session start. It does not discuss error handling or empty results, but with 8 parameters and an output schema, the description is sufficiently complete for an agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It provides explanations for all 8 parameters (e.g., query searches content, tags, and summary). This adds meaning beyond the schema titles. While it lacks examples or value ranges, it clearly defines each parameter's role, earning a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Retrieve insights from memory.' It specifies the kind of content retrieved (decisions, preferences, technical findings) and distinguishes itself from siblings like memcp_remember (write) and memcp_search (likely a different search mode). The verb 'Retrieve' and resource 'insights' are specific, making it easy for an agent to understand what this tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear usage hint: 'Call at session start to load relevant context.' This tells the agent when to use the tool. However, it does not explicitly mention when not to use it or suggest alternatives among siblings (e.g., memcp_search for different search needs). The context is clear but lacks exclusions, earning a 4.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_reinforceA

Provide feedback on an insight — mark it as helpful or misleading.

Helpful insights get a score boost and stronger edges.
Misleading insights get penalized. This closes the learning loop.

Args:
    insight_id: The ID of the insight to reinforce
    helpful: True if the insight was helpful, False if misleading
    note: Optional note about why
ParametersJSON Schema
NameRequiredDescriptionDefault
noteNo
helpfulNo
insight_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so the description carries the burden. It explains that helpful insights get a score boost and stronger edges, while misleading ones are penalized, and mentions closing the learning loop. However, it does not disclose potential side effects or requirements like authorization.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (3 lines plus Args) and front-loaded with the purpose. It could be slightly more structured but contains no fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 3 parameters and an output schema, the description adequately covers the tool's effect (score/edge changes) and parameter roles. It provides sufficient context for an agent to use it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, the description includes an 'Args' section that explains each parameter's meaning (e.g., 'helpful: True if the insight was helpful, False if misleading'), adding significant context beyond the schema's titles and defaults.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool provides feedback on an insight, marking it as helpful or misleading, which distinguishes it from sibling tools that handle context management, search, and consolidation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage (when you want to reinforce an insight) but does not explicitly state when not to use it or suggest alternatives, leaving some ambiguity about appropriate contexts.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_rememberA

Save an important insight to persistent memory.

Use this to remember key decisions, facts, user preferences, or technical
findings that should be preserved across conversations.

Args:
    content: The insight or fact to remember (be concise but complete)
    category: Type — decision, fact, preference, finding, todo, general
    importance: Priority — low, medium, high, critical
    tags: Comma-separated keywords for retrieval (e.g., "api,auth,v2")
    summary: Optional one-line summary
    entities: Optional comma-separated entities mentioned
    project: Optional project name
    session: Optional session ID
ParametersJSON Schema
NameRequiredDescriptionDefault
tagsNo
contentYes
projectNo
sessionNo
summaryNo
categoryNogeneral
entitiesNo
importanceNomedium

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It explains the basic action (save to persistent memory) but lacks details on idempotency, overwrite behavior, limits, or return values. The presence of an output schema mitigates this slightly, but the description itself could be more transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear lead sentence, a usage paragraph, and parameter documentation. It is front-loaded, though the Args section is somewhat lengthy. Every sentence adds value, but slight trimming could improve conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 8 parameters, 1 required, and no annotations, the description covers purpose, usage guidelines, and parameter semantics thoroughly. It does not explain return values, but the output schema likely handles that. The tool's complexity is moderate, and the description provides sufficient context for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by explaining each parameter in the Args section. It adds context: 'be concise but complete' for content, enumeration of categories, description of importance levels, and format guidance for tags and entities. This is highly valuable beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Save an important insight to persistent memory' with a specific verb and resource. It distinguishes itself from sibling tools like memcp_recall (retrieval) and memcp_search, establishing its unique role as the write operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly advises when to use: 'remember key decisions, facts, user preferences, or technical findings that should be preserved across conversations.' However, it does not explicitly state when not to use or mention alternatives, though the context of siblings implies read tools for retrieval.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_restoreA

Restore an archived context or insight back to active.

Decompresses archived contexts and re-inserts archived insights
into the knowledge graph.

Args:
    name: Context name or insight ID to restore
    item_type: "context", "insight", or "auto" (tries both)
ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
item_typeNoauto

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description discloses decompression and re-insertion behavior. It does not cover permissions, conflicts, or error cases, which limits transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with a clear front-loaded purpose, followed by brief implementation details and parameter explanations. Every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema, the description covers the core functionality adequately. It could mention error handling or prerequisites (e.g., item must be archived), but overall it is sufficiently complete for a two-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaning to both parameters beyond the bare schema: 'name' is identified as context name or insight ID, and 'item_type' explains the allowed values and 'auto' behavior. This compensates for the 0% schema description coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it restores archived contexts or insights, using specific verbs and resources. It differentiates from sibling tools like memcp_forget or memcp_recall that handle other operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description specifies the tool is for restoring archived items, providing clear context. However, it lacks explicit guidance on when not to use it or alternatives for non-archived items.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_retention_previewA

Preview what would be archived or purged — dry-run, no changes made.

Shows candidates for archiving (stale, low-access items) and purging
(archived items past retention period). Items with high importance,
frequent access, or protected tags are immune from archiving.

Args:
    archive_days: Override archive threshold (default from env, 30 days)
    purge_days: Override purge threshold (default from env, 180 days)
ParametersJSON Schema
NameRequiredDescriptionDefault
purge_daysNo
archive_daysNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

In the absence of annotations, the description discloses that no changes are made, describes candidate criteria (stale, low-access, past retention) and immunity conditions (high importance, frequent access, protected tags). It does not mention authentication or rate limits, but captures key behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences plus a parameter list, front-loading the core purpose and behavior. Every sentence adds value without redundancy or excess.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (dry-run preview, two parameters), the description covers purpose, behavior, and parameter semantics. An output schema exists, so return format explanation is not required. It lacks explicit sibling differentiation but is otherwise complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% parameter descriptions, so the description compensates by explaining 'archive_days' and 'purge_days' with their purpose and defaults. However, it states defaults from env (30, 180 days) while schema shows default 0, creating potential confusion.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool is a dry-run preview for archiving and purging, with explicit verb 'Preview' and resource 'retention'. It distinguishes from the sibling 'memcp_retention_run' which actually executes the action, by stating 'no changes made'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies safe usage via 'dry-run, no changes made' but does not explicitly mention when to use this tool versus alternatives like 'memcp_retention_run'. The guidance is implicit rather than direct.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_retention_runA

Execute retention actions — archive old items, optionally purge.

Archiving compresses and moves stale items to the archive directory.
Purging permanently deletes archived items past the purge threshold
and logs metadata to purge_log.json for audit.

Args:
    archive: Archive eligible items (default True)
    purge: Purge archived items past retention period (default False)
ParametersJSON Schema
NameRequiredDescriptionDefault
purgeNo
archiveNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description properly discloses that archiving compresses and moves stale items, while purging permanently deletes archived items past a threshold and logs metadata for audit. This provides key behavioral details beyond the bare operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured, with a brief overview paragraph and a clear Args list. Every sentence adds value, and there is no extraneous information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (not shown), the description adequately covers the actions, parameters, and outcomes. It could mention the retention period source or order of operations, but overall it is sufficiently complete for a simple boolean-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description compensates by explaining both parameters: archive defaults to true and 'Archive eligible items', purge defaults to false and 'Purge archived items past retention period'. This adds meaning beyond the schema's property names and types.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool executes retention actions (archive and purge) and describes the effects. It distinguishes from siblings like memcp_retention_preview by indicating it actually runs the actions, though this differentiation is implicit rather than explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like memcp_retention_preview. There is no mention of prerequisites, recommended order of operations, or contexts where running retention is appropriate vs. not.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_sessionsB

List sessions, optionally filtered by project.

Args:
    project: Filter by project (empty = all)
    limit: Max sessions to return (default 20)
ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
projectNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose behavioral traits such as read-only nature, authentication requirements, rate limits, or side effects. For a listing tool, it is reasonable to assume it is read-only, but this is not explicitly stated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two lines for the main action and two parameter explanations. It is front-loaded with the purpose. Slightly more structure could be added, but overall it is efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity of the tool (2 parameters, list operation), the description is minimally adequate. However, it lacks details on pagination, sorting, or the return format, which an agent might need. An output schema exists but its content is not described.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, and the description adds value by explaining that 'project' filters by project (empty = all) and 'limit' is the max sessions to return (default 20). This compensates for the lack of schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List') and the resource ('sessions'), and specifies optional filtering by project. This distinguishes it from sibling tools like memcp_list_contexts and memcp_projects, which deal with different resources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given on when to use this tool versus alternatives (e.g., memcp_search or memcp_recall). The description only lists the parameters without any context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

memcp_statusA

Current memory statistics — insight count, categories, importance distribution.

Args:
    project: Filter stats by project
    session: Filter stats by session
ParametersJSON Schema
NameRequiredDescriptionDefault
projectNo
sessionNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It implies a read-only operation ('statistics') but does not explicitly confirm non-destructive nature, authentication needs, or side effects. Lacks details on rate limits or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences, front-loaded with purpose and output. No redundant information. Efficiently structured for quick reading.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Output schema exists, so return value details are not needed. However, given zero annotations and many sibling tools, the description could provide more context on the scope of statistics (global vs per project/session) and how to interpret importance distribution. It is adequate but not comprehensive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so description must add meaning. It states parameters filter by 'project' and 'session', which adds basic context. However, it does not specify format or behavior (e.g., case sensitivity, wildcards). Provides minimal enhancement over the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it provides 'memory statistics' and lists specific metrics: insight count, categories, importance distribution. This distinguishes it from sibling tools like memcp_graph_stats (likely graph-specific) and memcp_recall (retrieval).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions optional filters (project, session) but provides no guidance on when to use this tool versus alternatives like memcp_graph_stats or memcp_ping. No exclusions or context-specific usage tips.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 24 tool updatesv0.1.0
    • First observedmemcp_chunk_context
    • First observedmemcp_clear_context
    • First observedmemcp_consolidate
    • First observedmemcp_consolidation_preview
    • First observedmemcp_filter_context
    • First observedmemcp_forget
    • First observedmemcp_get_context
    • First observedmemcp_graph_stats
    • First observedmemcp_inspect_context
    • First observedmemcp_list_contexts
    • First observedmemcp_load_context
    • First observedmemcp_peek_chunk
    • First observedmemcp_ping
    • First observedmemcp_projects
    • First observedmemcp_recall
    • First observedmemcp_reinforce
    • First observedmemcp_related
    • First observedmemcp_remember
    • First observedmemcp_restore
    • First observedmemcp_retention_preview
    • First observedmemcp_retention_run
    • First observedmemcp_search
    • First observedmemcp_sessions
    • First observedmemcp_status

TDQS

A3.8/5.0
Disambiguation4/5

Most tools have clearly distinct purposes (e.g., memcp_remember vs memcp_load_context, memcp_recall vs memcp_search), but some overlap exists between recall and search, and between consolidate and retention. Overall, an agent can distinguish them with moderate effort.

Naming Consistency5/5

All tools follow a consistent memcp_ prefix with snake_case naming. Verbs are uniform (e.g., remember, recall, search, forget, consolidate) and the pattern is predictable, aiding agent comprehension.

Tool Count4/5

24 tools is slightly high but appropriate for a comprehensive memory server covering storing, retrieving, managing, consolidating, and cleaning up knowledge. Each tool earns its place, though some like memcp_ping are minimal.

Completeness5/5

The tool surface covers the full lifecycle: create (remember, load_context), read (recall, search, get_context, inspect_context, peek_chunk), update (reinforce, consolidate), delete (forget, clear_context), and maintenance (retention, restore, list, stats). No obvious gaps.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    MCP server providing persistent, searchable memory management for AI workflows, enabling Claude Code to store, retrieve, and organize context through CRUD operations and knowledge tools.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Persistent memory MCP server for Claude Code that captures and recalls project context across sessions, eliminating the need to re-explain architecture and decisions daily.
    137
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A persistent memory MCP server for Claude Code that enables long-term recall across sessions via hybrid search, code intelligence, and tools for reading/writing memory.
    12
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Persistent memory MCP server for Claude Code that stores decisions and summaries locally, enabling Claude to recall past context across chats.
    1
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/maydali28/memcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server