RemembrallMCP

io.github.cdnsteve由 GitHub 账号 cdnsteve 发布v0.1.0更新于 Oct 24, 2026

Persistent knowledge memory for AI agents. Hybrid search, code graph, pgvector.

概览

AI 生成的概览

为编程助手提供预建索引的代码依赖图和基于 PostgreSQL 与 pgvector 的持久记忆存储。

可以做什么
RemembrallMCP 将项目目录索引为字段级代码图,覆盖九种语言的函数、类、方法和字段,并据此回答影响范围与符号查找查询。它还把决策、模式和导入的文档以向量嵌入形式存为记忆,并通过语义与全文混合检索取回。工具包括 remembrall_index、remembrall_impact、remembrall_lookup_symbol、remembrall_recall、remembrall_store、remembrall_update、remembrall_delete、remembrall_ingest_github 和 remembrall_ingest_docs。
适用场景
适合助手反复探索大型或多模块代码库、希望避免重复搜索和读取文件的场景。也适合跨会话保留项目决策与文档。小型项目收益有限。
运行要求
以 npm 包或预编译二进制在本地通过 stdio 运行。需要 Docker 或带 pgvector 扩展的 PostgreSQL 16,以及 DATABASE_URL 连接字符串。GitHub PR 导入还需要安装并认证 GitHub CLI。从源码构建需要 Rust 1.94 或更高版本。
安装前请注意
DATABASE_URL 是完整的 PostgreSQL 连接字符串,应通过环境变量提供,不要写入配置文件。索引会读取项目源码和文档,导入会把内容作为嵌入写入数据库。记忆工具可以更新或删除已存记忆,remembrall_reset 会删除并重建模式,清空全部数据。GitHub 导入会通过已认证的 gh CLI 读取仓库 PR 历史。

安装

在 SourceWeft 中

  1. 打开 控制台中的 RemembrallMCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

RemembrallMCP

[License: MIT] [Crates.io] [CI] [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)

bash
git clone https://github.com/roboticforce/remembrallmcp.gitcd 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

bash
# macOS (Apple Silicon)curl -fsSL https://github.com/roboticforce/remembrallmcp/releases/latest/download/remembrall-aarch64-apple-darwin.tar.gz | tar xzsudo 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 xzsudo 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+)

bash
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:

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

If running from a local source checkout:

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

If using Docker Compose from Codex:

json
{  "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:

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

If using Docker Compose:

json
{  "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):

json
{  "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                                 vTree-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 testingdocs/                       # Architecture and test plan docstest-fixtures/              # Ground truth TOML files for 9 languagestests/                      # 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

来源:README.md,提交 77e6b2b

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.0最新Sep 16, 2026

评分

已满足适用检查项的 40%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。