Generated banner for RemembrallMCP
Generated logo for RemembrallMCP

RemembrallMCP

Memory serverOfficial RoboticForce, Inc. project

Created by RoboticForce, Inc.

Published in roboticforce/remembrallmcp. Publisher page

34 GitHub stars

What it is

Whole-codebase knowledge for AI coding agents. A field-aware code graph (functions, classes, methods, fields, and references across 8 languages) plus persistent memory. Rust core, Postgres + pgvector backend, MCP protocol.
— the description by RoboticForce, Inc.

AutoGineer overview, from the brain’s own files

RemembrallMCP provides AI coding agents with a persistent, structured understanding of a codebase that persists across sessions. By combining a field-aware dependency graph (built with tree-sitter) with persistent memory (using Postgres and pgvector), it allows agents to perform complex impact analysis and recall past decisions without re-exploring the codebase. It supports nine programming languages and integrates via the Model Context Protocol (MCP), significantly reducing token usage and latency for common coding tasks.

How it works

Memory model: Hybrid

AutoGineer overview, from the brain’s own files

The system uses a hybrid memory model. It parses source code into a dependency graph of functions, classes, methods, and fields, storing these in a PostgreSQL database with pgvector for semantic search. It provides an MCP server that exposes tools for agents to query this graph, perform impact analysis, and store or recall project-specific knowledge, decisions, and patterns.

Folders
FolderRoleFiles
.githubagent-config2
docsdocs5
scriptsscripts6
teststests2
benchmarksfolder5
cratesfolder58
test-fixturesfolder8

The agent writes

Requirements

Apps: Docker

Runtimes: Node.js, Python >=3.10, Rust

Databases: MongoDB, PostgreSQL

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Google Antigravity, Kiro, OpenCode, Amp, Roo Code, Cline, JetBrains Junie, Devin (ex-Windsurf)

Set it up

  1. This brain runs code automatically: 1 script. Review install.sh before opening the folder in Claude Code. No step below turns a hook on for you.

    • install.sh: sh install.sh
  2. Not scanned by AutoGineerThe author’s MCP configuration (.mcp.json) also starts it in a way AutoGineer does not offer. Read that file: AutoGineer did not scan that path; what it runs is listed under “This brain runs”. https://github.com/roboticforce/remembrallmcp/blob/77e6b2b99703ffaa18a900e12e829104561a144f/.mcp.json
  3. Not scanned by AutoGineerThe author’s MCP configuration (README.md) also starts it in a way AutoGineer does not offer. Read that file: AutoGineer did not scan that path; what it runs is listed under “This brain runs”. https://github.com/roboticforce/remembrallmcp/blob/77e6b2b99703ffaa18a900e12e829104561a144f/README.md
  4. Not scanned by AutoGineerThe author’s README also describes installing it with Docker Compose. Read its install section: AutoGineer did not scan that path. https://github.com/roboticforce/remembrallmcp/blob/77e6b2b99703ffaa18a900e12e829104561a144f/README.md#quick-start
  5. Not scanned by AutoGineerThe author’s README also describes installing it from a clone of its repository. Read its install section: AutoGineer did not scan that path. https://github.com/roboticforce/remembrallmcp/blob/77e6b2b99703ffaa18a900e12e829104561a144f/README.md#quick-start
  6. Not scanned by AutoGineerAutoGineer could not scan everything it runs. https://www.npmjs.com/package/remembrallmcp
  7. Created by RoboticForce, Inc.. Published in roboticforce/remembrallmcp. Licence: MIT License.

Usage

AutoGineer overview, from the brain’s own files

  • Connect to an MCP-compatible agent like Claude Code or Cursor
  • Index a project directory to build the code graph
  • Query the impact of code changes before implementation
  • Store and recall architectural decisions or middleware patterns
  • Ingest existing documentation or GitHub PR history into agent memory
“remembrall_impact("AuthMiddleware", direction="upstream")”
Returns a list of files that depend on the AuthMiddleware, allowing the agent to assess the impact of changes.
“remembrall_recall("authentication middleware patterns")”
Retrieves relevant memories from past sessions regarding authentication patterns.

Documentation by RoboticForce, Inc.

RemembrallMCP

Image: License: MIT Image: Crates.io Image: CI Image: Docker

Whole-codebase knowledge for AI coding agents. A field-aware code graph plus persistent memory, built on Rust, Postgres + pgvector, and exposed over MCP.

The problem: AI coding agents see a few pages out of the book each session. They grep, read, and re-derive how the codebase fits together from scratch - no map of what calls what, no way to know what breaks when something changes, and no memory of decisions made in past sessions.

The solution: RemembrallMCP gives the agent the whole codebase - a field-aware dependency graph (functions, classes, methods, fields, and the references between them) across 9 languages, plus persistent memory that survives between sessions.

1. Field-Aware Code Graph - A live map of your codebase built with tree-sitter. Functions, classes, methods, and data fields, plus call, import, defines, inherits, and field-reference relationships across 9 languages. Ask "what breaks if I change this?" - down to a single struct field - and get an answer in milliseconds, before the agent touches anything.

2. Persistent Memory - Decisions, patterns, and organizational knowledge that survive between sessions. Hybrid semantic + full-text search finds relevant context instantly.

remembrall_recall("authentication middleware patterns")
-> 3 relevant memories from past sessions

remembrall_index("/path/to/project", "myapp")
-> Builds dependency graph: 847 symbols, 1,203 relationships

remembrall_impact("AuthMiddleware", direction="upstream")
-> 12 files depend on AuthMiddleware (with confidence scores)

remembrall_impact("amount", direction="upstream")
-> methods that read self.amount, across the whole codebase

remembrall_store("Switched from JWT to session tokens because...")
-> Decision stored for future sessions
Why the code graph matters

Without RemembrallMCP, agents explore your codebase from scratch every session. Claude Code spawns Explore agents, Codex reads dozens of files, Cursor greps through directories - all burning tokens and time just to understand what calls what. A single "find all callers of this function" task can cost thousands of tokens across multiple tool calls.

With RemembrallMCP, that same query is a single remembrall_impact call that returns in <1ms with zero exploration tokens. The dependency graph is already built and waiting.

Without RemembrallMCPWith RemembrallMCP
"What calls UserService?"Agent greps, reads 8-15 files, spawns sub-agentsremembrall_impact - 1 call, <1ms
"Where is auth middleware defined?"Agent globs, reads matches, filtersremembrall_lookup_symbol - 1 call, <1ms
"Who references the amount field?"Agent greps for self.amount, misses ORM and cross-module usagesremembrall_impact - 1 call, <1ms
"What did we decide about caching?"Agent has no context, asks youremembrall_recall - 1 call, ~25ms
Typical exploration cost5,000-20,000 tokens per question~200 tokens (tool call + response)

The savings scale with codebase size. On a small project, an agent can grep and read its way through. On a 500-file monorepo, that exploration becomes the bottleneck - agents hit context limits, spawn multiple sub-agents, or miss cross-module dependencies entirely. RemembrallMCP's graph queries stay under 10ms regardless of project size because the structure is pre-indexed in Postgres, not discovered at runtime.

This is the difference between an agent that reads a few pages out of the book every time and one that already holds the whole codebase.

Benchmarks

RemembrallMCP is currently benchmarked on two surfaces:

  • Agent productivity on code tasks - Tested on pallets/click v8.1.7 (594 symbols, 1,589 relationships). Five identical coding tasks run with and without RemembrallMCP. Full report.

  • Memory recall quality - Local recall harness run against 31 ground-truth queries covering search quality, filtering, edge cases, ranking, and latency.

MetricWithout RemembrallMCPWith RemembrallMCPDelta
Total tool calls (5 tasks)1125-95.5%
Estimated tokens~56,000~1,000-98.2%
Avg tool calls per question22.41.0-95.5%

The savings compound on larger codebases. Click is ~90 files - on a 500+ file monorepo, agents without RemembrallMCP need proportionally more exploration calls, while graph queries stay under 10ms regardless of size.

Memory Recall MetricResult
Queries passed31 / 31
Recall@50.917
Precision@50.619
MRR0.908
p95 latency14ms

Run the benchmarks yourself: see benchmarks/ for the harness and task definitions.

For the broader benchmark strategy across memory retrieval, long-horizon memory, code graph correctness, and agent productivity, see docs/benchmark-roadmap.md.

Requirements

  • Docker (for the easiest setup) or PostgreSQL 16 with pgvector

  • For GitHub ingestion: GitHub CLI (gh) installed and authenticated

Quick Start

Option 1: Docker Compose (easiest)
git clone https://github.com/roboticforce/remembrallmcp.git
cd remembrallmcp

# Start Postgres, initialize the schema, download the embedding model,
# and run the MCP server. The remembrall container stays up after setup.
docker compose up -d

# Verify it's running (database connected, schema ready)
docker compose exec remembrall remembrall status

That's it. Postgres with pgvector, the schema, and the embedding model are all set up automatically. The database and model cache persist across restarts.

The remembrall container runs remembrall init (idempotent setup) followed by remembrall serve on startup, so it stays running and docker compose exec works for status, doctor, and other commands.

To connect an MCP client (Claude Code, Cursor, Codex) to the server, see Connect to your MCP client below.

Option 2: Download prebuilt binary
# macOS (Apple Silicon)
curl -fsSL https://github.com/roboticforce/remembrallmcp/releases/latest/download/remembrall-aarch64-apple-darwin.tar.gz | tar xz
sudo mv remembrall /usr/local/bin/

# Linux (x86_64)
curl -fsSL https://github.com/roboticforce/remembrallmcp/releases/latest/download/remembrall-x86_64-unknown-linux-gnu.tar.gz | tar xz
sudo mv remembrall /usr/local/bin/

# Initialize (sets up Postgres via Docker, creates schema, downloads model)
remembrall init
Option 3: Build from source (requires Rust 1.94+)
cargo build -p remembrall-server --release
# Binary is at target/release/remembrall

remembrall init
Connect to your MCP client
Codex

Codex uses the same MCP server definition format. Register the server as remembrall and point it at either the installed binary or your local release build.

If remembrall is installed in PATH:

{
  "mcpServers": {
    "remembrall": {
      "command": "remembrall"
    }
  }
}

If running from a local source checkout:

{
  "mcpServers": {
    "remembrall": {
      "command": "/path/to/remembrallmcp/target/release/remembrall",
      "env": {
        "DATABASE_URL": "postgres://postgres:postgres@localhost:5450/remembrall"
      }
    }
  }
}

If using Docker Compose from Codex:

{
  "mcpServers": {
    "remembrall": {
      "command": "docker",
      "args": ["compose", "-f", "/path/to/remembrallmcp/docker-compose.yml", "run", "--rm", "-T", "remembrall"]
    }
  }
}

Restart Codex after adding the server so it reconnects and loads the tools.

Claude Code, Cursor, and other MCP clients

Add to your project's .mcp.json (works with Claude Code, Cursor, and any MCP-compatible client).

If using a prebuilt binary or built from source:

{
  "mcpServers": {
    "remembrall": {
      "command": "remembrall"
    }
  }
}

If using Docker Compose:

{
  "mcpServers": {
    "remembrall": {
      "command": "docker",
      "args": ["compose", "-f", "/path/to/remembrallmcp/docker-compose.yml", "run", "--rm", "-T", "remembrall"]
    }
  }
}

Each invocation starts a fresh container, runs remembrall init (idempotent; its output goes to stderr so it never corrupts the MCP stream), then remembrall serve over stdio. The -T flag is required - it disables TTY allocation so JSON-RPC passes through cleanly. The db service starts automatically via depends_on.

If running from source (not installed to PATH):

{
  "mcpServers": {
    "remembrall": {
      "command": "/path/to/remembrallmcp/target/release/remembrall",
      "env": {
        "DATABASE_URL": "postgres://postgres:postgres@localhost:5450/remembrall"
      }
    }
  }
}

Restart your MCP client. All 9 tools will be available automatically.

Try it
> "Store a memory: We chose Postgres over MongoDB because our query patterns
   are relational. Type: decision, tags: database, architecture"

> "Recall what we know about database decisions"

> "Index this project and show me the impact of changing UserService"

MCP Tools

Memory
ToolDescription
remembrall_recallSearch memories - hybrid semantic + full-text with RRF fusion
remembrall_storeStore decisions, patterns, knowledge with vector embeddings
remembrall_updateUpdate an existing memory (content, summary, tags, or importance)
remembrall_deleteRemove a memory by UUID
remembrall_ingest_githubBulk-import merged PR descriptions from a GitHub repo
remembrall_ingest_docsScan a directory for markdown files and ingest them as memories
Code Intelligence
ToolDescription
remembrall_indexParse a project directory into a field-aware code graph (functions, classes, methods, and fields across 9 languages)
remembrall_impactBlast radius analysis - "what breaks if I change this?" Works on functions, classes, methods, and fields
remembrall_lookup_symbolFind where a function, class, method, or field is defined across the project

Supported Languages

LanguageExtensionsQuality Score
Python.pyA (94.1)
Java.javaA (92.6)
JavaScript.js, .jsxA (92.0)
Rust.rsA (91.0)
Go.goA (90.7)
Ruby.rbB (87.9)
TypeScript.ts, .tsxB (84.3)
Kotlin.kt, .ktsB (82.9)
C#.csA (96.8)

Scores measured against real open-source projects (Click, Gson, Axios, bat, Cobra, Sidekiq, Hono, Exposed, MediatR) using automated ground truth tests. The C# score is measured against MediatR 12.4.1 (69 symbols, 48 relationships, 9 impact queries, 10 edge cases): symbols, imports, and edge cases at 100%, with the gap coming from generic-interface inheritance (: IPipelineBehavior<TRequest, TResponse> resolves to a synthetic UUID instead of the class symbol) and a field-dispatch call misresolution. C# field-level references are validated separately by the field-capture fixture at 100%.

Cold Start

A new RemembrallMCP instance has no knowledge. Use the ingestion tools to bootstrap from existing project history.

From GitHub PR history:

> remembrall_ingest_github repo="myorg/myrepo" limit=100

Fetches merged PRs via gh, digests titles and bodies into memories, and tags them by project. PRs with less than 50 characters of body are skipped. Deduplication by content fingerprint prevents re-ingestion on repeat runs.

From markdown docs:

> remembrall_ingest_docs path="/path/to/project"

Walks the directory tree, finds all .md files, splits them by H2 section headers, and stores each section as a searchable memory. Skips node_modules, .git, target, and similar directories. Good for README, ARCHITECTURE, ADRs, and any written docs.

Run both once per project. After ingestion, remembrall_recall has immediate context.

Architecture

Source Code                   Organizational Knowledge
    |                                 |
    v                                 v
Tree-sitter Parsers           Ingestion Pipeline
(9 languages)                 (GitHub PRs, Markdown docs)
    |                                 |
    v                                 v
+--------------------------------------------------+
|              Postgres + pgvector                  |
|                                                   |
|  memories (text + embeddings + metadata)          |
|  symbols (functions, classes, methods, fields)    |
|  relationships (calls, imports, defines,          |
|                 inherits, references)             |
+--------------------------------------------------+
                          |
                    MCP Server (stdio)
                          |
              Any MCP-compatible AI agent
  • Parsing: tree-sitter (Rust bindings, no Python in the pipeline)

  • Embeddings: fastembed (all-MiniLM-L6-v2, 384-dim, in-process ONNX Runtime)

  • Search: Hybrid RRF (semantic cosine similarity + full-text tsvector)

  • Graph queries: Recursive CTEs with cycle detection and confidence decay

  • Transport: stdio via rmcp

CLI Commands

CommandDescription
remembrall initSet up database, schema, and embedding model
remembrall serveRun the MCP server (default when no subcommand given)
remembrall startStart the Docker database container
remembrall stopStop the Docker database container
remembrall statusShow memory count, symbol count, connection status
remembrall doctorCheck for common problems (Docker, pgvector, schema, model)
remembrall reset --forceDrop and recreate the schema (deletes all data)
remembrall versionPrint version and config path

Configuration

Config file: ~/.remembrall/config.toml (created by remembrall init)

Environment variables override config file values:

VariableDescription
REMEMBRALL_DATABASE_URL or DATABASE_URLPostgreSQL connection string
REMEMBRALL_SCHEMADatabase schema name (default: remembrall)

Project Structure

crates/
  remembrall-core/          # Library - parsers, memory store, graph store, embedder
  remembrall-server/        # MCP server + CLI binary
  remembrall-test-harness/  # Parser quality testing against ground truth
  remembrall-recall-test/   # Search quality testing
docs/                       # Architecture and test plan docs
test-fixtures/              # Ground truth TOML files for 9 languages
tests/                      # Recall test fixtures

Performance

OperationTime
Memory store7ms
Semantic search (HNSW)<1ms
Full-text search<1ms
Hybrid recall (end-to-end)~25ms
Impact analysis4-9ms
Symbol lookup<1ms
Index 89 Python files2.3s

License

MIT

docs/architecture.md

RemembrallMCP Architecture

Last updated: April 2026

What is RemembrallMCP?

RemembrallMCP is a knowledge memory layer for AI agents. It gives any MCP-compatible agent persistent memory - decisions, patterns, code relationships, and organizational context that survives between sessions.

The problem: Every AI agent tool (Copilot, Cursor, Devin) is stateless. Every session starts from zero. Agents have no memory of past decisions, team preferences, error patterns, or how the codebase fits together.

The solution: RemembrallMCP is a Rust-native memory engine backed by Postgres + pgvector. It stores two kinds of knowledge:

  1. Text memories - decisions, patterns, error fixes, preferences, guidelines

  2. Code graph - functions, classes, imports, call chains, and impact analysis

Agents query RemembrallMCP via MCP to get relevant context before acting.


System Overview

Source Code                   Organizational Knowledge
    |                                 |
    v                                 v
+-------------------+    +------------------------+
| Tree-sitter       |    | Ingestion Pipeline     |
| Parser            |    | (GitHub PRs, Markdown) |
| (9 languages)     |    |                        |
+--------+----------+    +-----------+------------+
         |                            |
         v                            v
+--------------------------------------------------+
|              Postgres + pgvector                  |
|                                                   |
|  remembrall.memories          remembrall.symbols          |
|  - content + embedding    - name, type, file      |
|  - semantic search (HNSW) - language, project     |
|  - full-text search       - line numbers          |
|  - scope (org/team/proj)  - signature             |
|  - fingerprint dedup                              |
|                           remembrall.relationships    |
|  remembrall.file_index        - source -> target      |
|  - mtime tracking         - Calls, Imports,       |
|  - incremental reindex      Defines, Inherits,    |
|                               UsesType             |
|                           - confidence scoring    |
+-------------------------+------------------------+
                          |
                          v
              +-----------------------+
              |    MCP Server         |
              |    (remembrall-server)    |
              |                       |
              |  9 tools (see below)  |
              +-----------+-----------+
                          |
              +-----------+-----------+
              | Any MCP Client        |
              | Claude Code, Cursor,  |
              | Copilot, custom agents|
              +------------------------+

Crate Structure

remembrallmcp/
  Cargo.toml                    # Workspace root
  install.sh                    # curl installer script
  Dockerfile                    # Single-container build (server + embedded ONNX)
  docker-compose.yml            # One-command setup: server + Postgres/pgvector
  benchmarks/                   # A/B benchmark harness
  crates/
    remembrall-core/                # Library - all logic lives here
      src/
        lib.rs                  # Module exports
        config.rs               # Config from env vars
        error.rs                # Error types
        embed.rs                # Embedder trait + FastEmbedder (fastembed/ONNX, 384-dim)
        memory/
          types.rs              # Memory, Source, Scope, MemoryType
          store.rs              # MemoryStore - CRUD + search
        graph/
          types.rs              # Symbol, Relationship, ImpactResult
          store.rs              # GraphStore - upsert + recursive CTE impact analysis
        parser/
          mod.rs                # Public API: parse_python_file, parse_ts_file, index_directory
          python.rs             # Tree-sitter Python parser
          typescript.rs         # Tree-sitter TypeScript/JS parser
          rust.rs               # Tree-sitter Rust parser
          go.rs                 # Tree-sitter Go parser
          java.rs               # Tree-sitter Java parser
          ruby.rs               # Tree-sitter Ruby parser
          kotlin.rs             # Tree-sitter Kotlin parser
          walker.rs             # Directory walker + two-phase cross-file resolution
        indexer.rs              # Incremental indexer with mtime tracking + CodeParser trait
                                #   supported_extensions() is the single source of truth
                                #   for all 14 supported file extensions across 9 languages
        search.rs               # Hybrid search stub
        ingest.rs               # Ingestion logic: GitHub PR import + markdown doc ingestion
      src/bin/
        spike.rs                # Spike 1: memory + graph benchmarks
        spike2.rs               # Spike 2: multi-project regex indexing
        spike3.rs               # Ground truth: 10 real-world correctness tests
        parser_smoke.rs         # Tree-sitter parser validation
        kt_ast_debug.rs         # Kotlin AST debugging utility
    remembrall-server/              # MCP server + CLI binary
      src/
        lib.rs                  # MCP server struct + tool registration; thin #[tool] wrappers
                                #   that delegate to *_impl() functions in tools/
        main.rs                 # CLI entry point (init, serve, start, stop, status, doctor, reset, version)
        config.rs               # RemembrallConfig - loads ~/.remembrall/config.toml with env var overrides
        watcher.rs              # Live file watcher for auto-reindexing
        tools/
          mod.rs                # Module re-exports
          memory.rs             # store, recall, update, delete implementations
          graph.rs              # index, impact, lookup_symbol implementations
          ingest.rs             # ingest_github, ingest_docs implementations
    remembrall-python/              # PyO3 bindings (deferred until PyO3 supports Python 3.14)
      src/lib.rs
    remembrall-test-harness/        # Parser quality testing
      src/
        main.rs
        comparator.rs
        ground_truth.rs
        scorer.rs
    remembrall-recall-test/         # Search quality testing
      src/
        main.rs
        ground_truth.rs
        report.rs
        runner.rs
        scorer.rs
        seed.rs

Core Components

MemoryStore (memory/store.rs)

Postgres-backed storage for text memories with pgvector embeddings.

Tables: remembrall.memories (content, embedding, scope, tags, metadata, fingerprint, importance, expiry)

Key operations:

  • store(input, embedding) - store a memory with its vector embedding

  • search_semantic(embedding, limit, min_similarity, scope) - cosine similarity via HNSW index

  • search_fulltext(query, limit) - Postgres tsvector search

  • search_hybrid(embedding, query) - RRF fusion of semantic + full-text results

  • get(id) - fetch by ID, auto-increments access_count

  • get_readonly(id) - fetch by ID without incrementing access_count

  • update(id, content, summary, tags, importance, embedding) - partial update

  • find_by_fingerprint(hash) - deduplication check

  • delete(id), count(scope)

Indexes: HNSW (vector cosine), GIN (full-text, tags), B-tree (type, scope, fingerprint)

GraphStore (graph/store.rs)

Code relationship graph stored as Postgres adjacency tables.

Tables:

  • remembrall.symbols - code symbols (File, Function, Class, Method) with file path, line numbers, language, project

  • remembrall.relationships - edges between symbols (Calls, Imports, Defines, Inherits, UsesType) with confidence scores

Key operations:

  • upsert_symbol(symbol) - insert or update a symbol

  • add_relationship(rel) - insert or update an edge

  • impact_analysis(symbol_id, direction, max_depth) - recursive CTE traversal

  • find_symbol(name, type) - lookup by name

  • remove_file(path, project) - cascade delete for reindexing

Relationship types (5): Calls, Imports, Defines, Inherits, UsesType

UsesType edges are created when a symbol references another type in a parameter annotation, return type, or (for Python) a string forward reference. Supported in Python, TypeScript, Rust, Java, Go, and Kotlin. Ruby is skipped because it is dynamically typed.

Impact analysis uses recursive CTEs with cycle detection. Traverses upstream (who calls me?), downstream (what do I call?), or both. Confidence decays multiplicatively through the chain.

Parser (parser/)

Tree-sitter based source code analysis. Pure Rust, no Python involved.

Supported languages: Python, TypeScript, JavaScript, Rust, Go, Ruby, Java, Kotlin

What it extracts:

  • Symbols: functions, classes, methods, files

  • Relationships: function calls, imports, class inheritance, method definitions, type annotations

  • Metadata: signatures, line numbers, decorators

Two-phase resolution (walker.rs):

  1. Parse all files independently, collect symbols and raw import metadata

  2. Build path-to-UUID map from all File symbols, then resolve:

    • Relative imports (from ..storage import X) by walking up directories

    • Absolute imports (import sugar.memory.store) by suffix matching

    • Dotted method calls (self.queue.get_next()) by extracting final method name

    • Cross-file calls by rewriting synthetic UUIDs to real symbol UUIDs

Indexer (indexer.rs)

Incremental code indexing with mtime tracking.

Table: remembrall.file_index (file_path, project, mtime, indexed_at)

How it works:

  1. Walk directory, collect files with disk mtimes

  2. Compare against stored mtimes in file_index

  3. Parse + store only new/changed files

  4. Delete symbols for files that no longer exist on disk

CodeParser trait - plug-in interface so the indexer doesn't own parsing logic. Any language can be added by implementing parse(file_path, source, language).

supported_extensions() - public function in indexer.rs that is the single source of truth for all supported file extensions. The file walker uses it directly, so adding a new extension here automatically enables indexing for that type. Currently 14 extensions across 9 languages: py, ts, tsx, js, jsx, mjs, cjs, rs, go, rb, java, kt, kts, cs.


Ingestion Pipeline

Two tools solve the cold-start problem - getting useful memories into a fresh RemembrallMCP instance without manually running remembrall_store for every piece of knowledge.

The core ingestion logic lives in remembrall-core/src/ingest.rs and is called by thin wrapper functions in remembrall-server/src/tools/ingest.rs. This means the same logic is available to any frontend (MCP server, CLI, HTTP API) without duplication.

GitHub PR Ingestion (remembrall_ingest_github)

Shells out to the gh CLI (already authenticated on the user's machine) to fetch merged PRs from a GitHub repository. For each PR:

  1. Skip if body is under 50 characters (no useful content)

  2. Check content fingerprint for deduplication - skip if already ingested

  3. Embed "PR #N: title\n\nbody" with fastembed

  4. Classify memory type from title keywords (fix/bug -> ErrorPattern, refactor -> Pattern, else -> Decision)

  5. Store with source.system = "github", source.identifier = PR URL, project scope set

Requires gh to be installed and authenticated. Does not need a GitHub token in the environment.

Markdown Doc Ingestion (remembrall_ingest_docs)

Walks a directory tree for .md files (skipping node_modules, .git, target, vendor, etc.). For each file:

  1. Read and validate UTF-8

  2. Split on ## (H2 headers) - each section becomes a separate memory

  3. Skip sections under 200 characters

  4. Check content fingerprint for deduplication

  5. Classify memory type from filename (ARCHITECTURE, DESIGN, adr-* -> Architecture; CONTRIBUTING, STYLE -> Guideline; else -> CodeContext)

  6. Set importance: Architecture=0.8, Guideline=0.7, other=0.6

  7. Store with tags ["docs", "markdown", "<filename>"]


Memory Features

Contradiction Detection

remembrall_store runs a similarity search at a high threshold (0.75) before storing. If near-duplicate memories are found, they are returned in the response alongside the new memory's ID. This gives the agent the option to update the existing memory instead of creating a near-duplicate.

Memory Decay / Access Tracking

Each memory has an access_count that increments on get(). The get_readonly() path is used internally (e.g., contradiction checks) to avoid inflating counts.

Memory Update

remembrall_update performs a partial update - only the fields supplied are changed. If content is updated, a new embedding is generated automatically. This avoids the delete-and-recreate pattern.


MCP Server (remembrall-server)

The MCP server exposes RemembrallMCP's capabilities to any MCP-compatible agent (Claude Code, Cursor, etc.) over stdio transport.

Binary: target/release/remembrall (includes ONNX Runtime for embeddings)

Tools Module Structure

The 9 tools are split across three modules under remembrall-server/src/tools/. lib.rs contains the MCP server struct with thin #[tool] wrapper methods that resolve optional parameters and then delegate to *_impl() functions in the appropriate module:

ModuleTools
tools/memory.rsstore, recall, update, delete
tools/graph.rsindex, impact, lookup_symbol
tools/ingest.rsingest_github, ingest_docs
Tools
ToolDescriptionKey params
remembrall_storeStore knowledge, decisions, patternscontent, memory_type, tags, importance, source_identifier
remembrall_recallHybrid semantic + full-text searchquery, limit, memory_types, tags, project
remembrall_updateUpdate an existing memoryid, content, summary, tags, importance
remembrall_deleteRemove a memory by UUIDid
remembrall_ingest_githubBulk-import merged PR descriptionsrepo, limit, project
remembrall_ingest_docsIngest markdown files from a directorypath, project
remembrall_impactBlast radius analysis - what breaks if you change a symbolsymbol_name, direction, max_depth
remembrall_lookup_symbolFind where a function/class is definedname, symbol_type, project
remembrall_indexIndex a project directory to build the code graphpath, project
Embedding

Uses fastembed (ONNX Runtime) with all-MiniLM-L6-v2 (384-dim) for in-process embedding. No external API or Python dependency. Model downloads on first run (~23 MB), or pre-downloaded by remembrall init.

Pluggable via the Embedder trait in remembrall-core/src/embed.rs.

Setup for Claude Code

The .mcp.json in the project root configures Claude Code to use the RemembrallMCP server:

{
  "mcpServers": {
    "remembrall": {
      "command": "/Users/steve/Dev/remembrallmcp/target/release/remembrall",
      "env": {
        "DATABASE_URL": "postgres://postgres:postgres@localhost:5450/remembrall"
      }
    }
  }
}

Once installed via cargo install or the curl installer, the simpler form works:

{
  "mcpServers": {
    "remembrall": {
      "command": "remembrall"
    }
  }
}

CLI (remembrall)

The server binary doubles as a CLI. The default behavior (no subcommand) is to run the MCP server.

CommandDescription
remembrall initSet up database (Docker or external Postgres), create schema, download embedding model, write config
remembrall init --database-url <url>Init with an existing Postgres instead of Docker
remembrall serveRun the MCP server (explicit form of the default)
remembrall startStart the Docker database container
remembrall stopStop the Docker database container
remembrall statusShow memory count, symbol count, Docker state, connection
remembrall doctorCheck config, Docker, database connection, pgvector, schema, and model cache
remembrall reset --forceDrop and recreate the schema (deletes all data)
remembrall versionPrint version, arch, OS, and config path

Config File

Config lives at ~/.remembrall/config.toml. Written by remembrall init, loaded by every subcommand. Environment variables override config file values.

mode = "local"   # "local" (Docker), "external" (BYO Postgres)

[database]
url = "postgres://postgres:postgres@localhost:5450/remembrall"
schema = "remembrall"
pool_size = 10

[docker]
container_name = "remembrall-db"
image = "pgvector/pgvector:pg16"
port = 5450

[embedding]
model = "all-MiniLM-L6-v2"

Environment variable overrides:

VariableOverrides
REMEMBRALL_DATABASE_URL or DATABASE_URLdatabase.url
REMEMBRALL_SCHEMAdatabase.schema

Database

Engine: PostgreSQL 16 + pgvector 0.8.2

Connection: postgres://postgres:postgres@localhost:5450/remembrall (default)

Schema: Everything lives in the remembrall schema. Configurable via REMEMBRALL_SCHEMA env var.

Tables:

TablePurposeKey indexes
memoriesText knowledge with embeddingsHNSW (vector), GIN (full-text, tags), B-tree (scope)
symbolsCode symbols (functions, classes, etc.)B-tree (file_path, name+type)
relationshipsEdges between symbols (5 types: Calls, Imports, Defines, Inherits, UsesType)B-tree (source_id, target_id)
file_indexMtime tracking for incremental indexingPK (file_path, project)

Running It

Prerequisites
  • Rust 1.94+

  • Docker (for local Postgres + pgvector, or bring your own Postgres)

Docker (one command)
docker compose up

This starts both the Postgres/pgvector container and the remembrall server. The Dockerfile builds the release binary with the embedded ONNX Runtime; docker-compose.yml wires it to the database.

First-time setup (local build)
cargo build -p remembrall-server --release
./target/release/remembrall init
Manual (without init)
# Start existing Docker container
docker start cocoindex-postgres

# Run MCP server directly
DATABASE_URL="postgres://postgres:postgres@localhost:5450/remembrall" ./target/release/remembrall
Run the ground truth tests
DATABASE_URL="postgres://postgres:postgres@localhost:5450/remembrall" cargo run --bin spike3

Expected output: 10/10 tests pass across Sugar (Python), Revsup (Django), NomadSignal (TypeScript).


Validated Performance

OperationTime
Schema init (tables + HNSW index)83ms
Store 3 memories7ms
Get by ID809us
Semantic search (pgvector HNSW)942us
Full-text search573-907us
Impact analysis (realistic)4-9ms
Impact analysis (stress, 3,698 nodes)33ms
Find symbol by name476us
Index Sugar (89 files, 1,157 symbols, 9,297 rels)2.3s
Index Revsup (92 files, 771 symbols, 1,602 rels)1.2s

Ground Truth (10/10)

Real questions answered correctly against real codebases:

#QuestionProject
1What methods does MemoryStore have? (17)Sugar
2What calls get_next_work()? (dotted method resolution)Sugar
3What does loop.py import? (relative import resolution)Sugar
4What inherits BaseEmbedder?Sugar
5Blast radius of store()?Sugar
6What are all Django models? (8 classes)Revsup
7What views call ForecastService? (none - correctly identified)Revsup
8What Django signal handlers exist? (3)Revsup
9What does data-adapter.ts export? (9 functions)NomadSignal
10What calls getCountry()?NomadSignal

What's Next

ItemStatusDescription
MCP server - core toolsDonestore, recall, update, delete over stdio
Hybrid recallDoneRRF fusion of semantic + full-text search
Ingestion pipelineDoneGitHub PR ingestion + markdown doc ingestion; core logic in remembrall-core/src/ingest.rs
Memory featuresDoneContradiction detection, access tracking, partial update
CLIDoneinit, serve, start, stop, status, doctor, reset, version
Config fileDone~/.remembrall/config.toml with env var overrides
Code graph toolsDoneimpact, lookup_symbol, index - all 9 languages
Tools module splitDonememory/graph/ingest modules with thin wrappers in lib.rs
UsesType relationshipDoneType annotation tracking in Python, TS, Rust, Java, Go, Kotlin
Docker supportDoneDockerfile + docker-compose.yml for one-command setup
BenchmarksDoneA/B benchmark harness in benchmarks/
Prebuilt binariesIn progressmacOS ARM64 binary exists in dist/ - CI release pipeline pending
Concurrent load testTODO50 simulated agents hitting the engine
Incremental indexing via MCPTODOWire the Indexer mtime tracking into remembrall_index
Memory expiryTODOTTL-based decay using the expires_at field
105 files · 93 not served here

Advantages

  • Reduces token usage by up to 98% by eliminating redundant codebase exploration. evidence: README.md
  • Provides sub-10ms impact analysis and symbol lookup regardless of project size. evidence: README.md

Limitations

  • Requires an external PostgreSQL 16 instance with pgvector extension. evidence: README.md
  • Initial indexing and ingestion are required to bootstrap knowledge for new projects. evidence: README.md

Security

Risk level: Medium risk

This brain runs

MCP servers (7)

  • .mcp.json (remembrall): /Users/steve/Dev/remembrallmcp/target/release/remembrall
  • README.md (remembrall): remembrall
  • README.md (remembrall): /path/to/remembrallmcp/target/release/remembrall
  • README.md (remembrall): docker compose -f /path/to/remembrallmcp/docker-compose.yml run --rm -T remembrall
  • README.md (remembrall): remembrall
  • README.md (remembrall): docker compose -f /path/to/remembrallmcp/docker-compose.yml run --rm -T remembrall
  • README.md (remembrall): /path/to/remembrallmcp/target/release/remembrall

Agent instructions that run or fetch something (17)

  • AGENTS.md: Start database: `docker start cocoindex-postgres`
  • AGENTS.md: Run server over stdio: `DATABASE_URL="postgres://postgres:[redacted]@localhost:5450/remembrall" ./target/release/remembrall`
  • AGENTS.md: Run validation spike: `DATABASE_URL="postgres://postgres:[redacted]@localhost:5450/remembrall" cargo run --bin spike3`
  • CLAUDE.md: docker start cocoindex-postgres
  • CLAUDE.md: # Run MCP server manually (stdio)
  • CLAUDE.md: # Run ground truth tests (validates everything works)
  • CLAUDE.md: DATABASE_URL="postgres://postgres:[redacted]@localhost:5450/remembrall" cargo run --bin spike3
  • CLAUDE.md: remembrall serve # Run MCP server (explicit form; no-arg is same)
  • CLAUDE.md: Model downloads on first run (~23 MB), or pre-downloaded by `remembrall init`.
  • CLAUDE.md: install.sh # curl installer script
  • CLAUDE.md: git checkout develop
  • CLAUDE.md: git checkout main
  • CLAUDE.md: git merge develop
  • CLAUDE.md: git push origin main · uses the network
  • CLAUDE.md: git tag v0.X.0
  • CLAUDE.md: git push origin v0.X.0 · uses the network
  • CLAUDE.md: git checkout develop

Install scripts (1)

  • install.sh: sh install.sh · uses the network
  • Medium risk: runs-instruction-instruction-network (CLAUDE.md:138)
  • Medium risk: runs-instruction-instruction-network (CLAUDE.md:142)
  • Medium risk: runs-install-script-network-variable-host (install.sh)
  • Medium risk: network-variable-host (install.sh:63)
  • Low risk: scripts-present (install.sh)

Attribution and licence

Created by
RoboticForce, Inc.
Declared authors
  • RobotICForce (declared in package.json)
  • RobotICForce (declared in pyproject.toml)
Publisher
RoboticForce, Inc. (Official RoboticForce, Inc. project)
Source
roboticforce/remembrallmcp · commit 77e6b2b
Licence
MIT License (files served here)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by RoboticForce, Inc..

Install from source

93 of its files are not served here, so there is no ZIP. roboticforce/remembrallmcp at 77e6b2b