Logo memtrace

memtrace

Tổ chức
syncable-dev

Structural memory for AI coding agents. Bi-temporal graph, MCP-native, zero LLM calls. Cursor · Claude Code · Codex · DeepSeek Harness · Hermes · VS Code · Windsurf.

Nhà phát hànhsyncable-dev
Kho mãmemtrace-public
Ngôn ngữPython
Bản fork
43
Sao
473
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    memtrace cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    473 sao và 43 bản fork từ kho mã được liên kết.

Official Memtrace by Syncable. Start at memtrace.io/docs. The official package is memtrace on npm, and the public repository is syncable-dev/memtrace-public. Other projects with the same name are unrelated. Compare memtrace --version with the Stable and Nightly release history.

For installation support, open an issue in the official public repository with your operating system, Memtrace version and exact error. Remove credentials and private source from shared logs. The Syncable team maintains this package and its support channels.


DeepSeek Harness

Memtrace runs as a DeepSeek Harness plugin. Install Harness first (npm install -g @deepseek-ai/dsh — that is the dsh command), then add Memtrace:

sh
npx -y @deepseek-ai/dsh plugin --profile web add github:syncable-dev/dsh-plugin-memtrace

Then ask the agent to index the workspace and pull blast radius, evolution, or an architecture briefing. Details: syncable-dev/dsh-plugin-memtrace.


What it does

Three things, every release.

🧭   Run a fleet of coding agents on the same repo without merge hell. Each agent reads the same call graph, sees the same blast radius, inherits the same temporal history. No collisions. No stale context.

🔁   Replay any refactor with full causal awareness. Agents see exactly what depends on what, and what changed when. No more "I refactored a function and 14 tests broke that nobody saw."

⚡   Index a 50k-file repo in under 90 seconds. Rust + Tree-sitter, $0 in API costs, 20+ languages plus framework-aware scanners (Vapor, Lapis, Kong, GitHub Actions, Terraform, RLS policies, …), fully local. Your code never leaves your machine.

🆕   LeanCTX Native — compressed reads, smart trees, and a value ledger. Four new compression modes on get_source_window, single-call directory maps, real-time token-savings dashboard, and an opt-in adaptive learner that beats the static table by ~14%. Full breakdown: docs/leanctx-native.md. Available in v0.3.57+.

https://github.com/user-attachments/assets/e7d6a1e9-c912-4e65-a421-bd0256dffa5a


Numbers

OperationMemtraceBest alternativeΔ
Index 1,500 files1.5s · $0Mem0: 31 min · $10–50~1,200× faster
Exact symbol query (acc@1, lat)96.6% · 0.07 msGitNexus: 97.0% · 8.95 ms128× lower latency
Graph callers recall (Django)81.6%GitNexus: 5.3%15.4×
Incremental re-index p9542.5 msCodeGrapher: 613.7 ms14.4×
Hybrid acc@1 (Django, 3K cases)73.9%GitNexus: 38.6%1.91×
PR code-review F1 (50 PRs)0.7268Cubic v2: 0.6077+19.60%
RSS / process26 MBChromaDB: 1,060 MB41× tighter
Languages16+ (Tree-sitter)varies—

Reproducible benchmark suite: benchmarks/. Same machine, same corpora, same adapter contract. Ground truth from Python's ast and pyright LSP — never from any tool's own index. No system gets a home-field advantage in the dataset.

Detailed breakdowns: BENCHMARKS-v0.3.22.md · BENCHMARKS-v0.3.29.md · Code reviewer benchmark


GitHub Star Growth


Get access

Memtrace is in private beta. We're rolling out access in batches to keep the feedback loop tight — every cohort lands in a Discord channel where we ship fixes from real bug reports inside a week.

→ Join the waitlist at memtrace.io.

Already have access? npm install -g memtrace and you're indexing in 90 seconds. Full setup below.

🔒 Privacy. Memtrace runs entirely on your machine. Source code never leaves it. The only network traffic is license validation, aggregate node/edge counts, and opt-out crash telemetry — no source, no file paths, no symbol names. Full breakdown: PRIVACY.md, TELEMETRY.md. Disable telemetry with MEMTRACE_TELEMETRY=off.


Why Memtrace exists

Good code-intelligence tools already exist. GitNexus and CodeGrapherContext build AST-based graphs that work for "what's in my repo right now."

Memtrace is a bi-temporal episodic structural knowledge graph. It builds on the same AST foundation and adds two dimensions:

  • Temporal memory — every symbol carries its full version history. Six scoring algorithms (impact, novelty, recency, directional, compound, overview) let agents ask different temporal questions: "what changed?", "what's unexpected?", "what'll break?".
  • Cross-service API topology — Memtrace maps HTTP call graphs between repositories, detecting which services call which endpoints across your architecture.

On top of that, the structural layer is comprehensive:

Symbols are nodesfunctions, classes, interfaces, types, endpoints
Relationships are edgesCALLS, IMPLEMENTS, IMPORTS, EXPORTS, CONTAINS
Community detectionLouvain algorithm identifies architectural modules automatically
Hybrid retrievalTantivy BM25 + vector embeddings + Reciprocal Rank Fusion + cross-encoder rerank
Rust-nativecompiled binary, no Python/JS runtime overhead, sub-8 ms p95 query latency

The agent doesn't just search your code. It remembers it.


Memtrace vs. general memory systems (Mem0, Graphiti)

Mem0 and Graphiti are strong conversational memory engines designed for tracking entity knowledge (e.g. User -> Likes -> Apples). They excel at that. For code intelligence specifically, the tradeoff is that they rely on LLM inference to build their graphs — which adds cost and time when processing thousands of source files.

Graphiti processes data through add_episode(), which triggers multiple LLM calls per episode — entity extraction, relationship resolution, deduplication. At ~50 episodes/minute (source), ingesting 1,500 code files takes 1–2 hours.

Mem0 processes data through client.add(), which queues async LLM extraction and conflict resolution per memory item (source). Bulk ingestion with infer=True (default) means every file passes through an LLM pipeline. Throughput is bounded by your LLM provider's rate limits.

Both accumulate $10–50+ in API costs for large codebases because every relationship is inferred rather than parsed.

Memtrace takes a different approach: it indexes 1,500 files in 1.2–1.8 seconds for $0.00 — no LLM calls, no API costs, no rate limits. Native Tree-sitter AST parsers resolve deterministic symbol references (CALLS, IMPLEMENTS, IMPORTS) locally. The tradeoff is that Memtrace is purpose-built for code — it doesn't handle conversational entity memory the way Mem0 and Graphiti do.


25+ MCP tools

Memtrace exposes a full structural toolkit via the Model Context Protocol.

Search & Discovery

  • find_code — hybrid BM25 + semantic + RRF
  • find_symbol — exact / fuzzy with Levenshtein

Relationships

  • analyze_relationships — callers, callees, hierarchy, imports
  • get_symbol_context — 360° view in one call

Impact Analysis

  • get_impact — blast radius with risk rating
  • detect_changes — diff-to-symbols scope mapping

Code Quality

  • find_dead_code — zero-caller detection
  • find_most_complex_functions — complexity hotspots
  • calculate_cyclomatic_complexity
  • get_repository_stats

Temporal Analysis

  • get_evolution — 6 scoring modes
  • get_timeline — full version history
  • detect_changes — diff-based scope

Graph Algorithms

  • find_bridge_symbols — betweenness centrality
  • find_central_symbols — PageRank / degree
  • list_communities — Louvain modules
  • list_processes / get_process_flow

API Topology

  • get_api_topology — cross-repo HTTP graph
  • find_api_endpoints
  • find_api_calls

Indexing & Watch

  • index_directory — parse, resolve, embed
  • watch_directory — live incremental
  • execute_cypher — direct graph queries

17 agent skills

Memtrace ships skills/guidance that teach agents how to use the graph. They fire automatically based on what you ask — no prompt engineering required.

SkillYou say…
memtrace-search"find this function", "where is X defined"
memtrace-relationships"who calls this", "show class hierarchy"
memtrace-evolution"what changed this week", "how did this evolve"
memtrace-impact"what breaks if I change this", "blast radius"
memtrace-quality"find dead code", "complexity hotspots"
memtrace-graph"show me the architecture", "find bottlenecks"
memtrace-api-topology"list API endpoints", "service dependencies"
memtrace-index"index this project", "parse this codebase"
memtrace-cochange"what else changes with this", "hidden coupling"

Plus 8 workflow skills that chain multiple tools with decision logic: memtrace-first, codebase-exploration, change-impact-analysis, incident-investigation, refactoring-guide, continuous-memory, episode-replay, and session-continuity.


Temporal Engine

Six scoring algorithms for different temporal questions:

ModeBest for
compoundGeneral-purpose "what changed?" — weighted blend of impact, novelty, recency
impact"What broke?" — ranks by blast radius (in_degree^0.7 × (1 + out_degree)^0.3)
novel"What's unexpected?" — anomaly detection via surprise scoring
recent"What changed near the incident?" — exponential time decay
directional"What was added vs removed?" — asymmetric scoring
overviewQuick module-level summary

Uses Structural Significance Budgeting to surface the minimum set of changes covering ≥80% of total significance.


Compatibility

Editor / AgentMCP Tools (25+)Skills / GuidanceInstall
Claude Code✅✅npm install -g memtrace — fully automatic
Claude Desktop✅✅Automatic — shared with Claude Code
DeepSeek Harness✅✅npx -y @deepseek-ai/dsh plugin --profile web add github:syncable-dev/dsh-plugin-memtrace
Cursor (v2.4+)✅✅npm install -g memtrace — fully automatic
Codex CLI✅✅npm install -g memtrace — fully automatic
Windsurf✅✅npm install -g memtrace — fully automatic
VS Code (Copilot)✅✅npm install -g memtrace — fully automatic
Hermes✅✅npm install -g memtrace — fully automatic
OpenCode✅✅npm install -g memtrace — fully automatic
Kiro✅Steeringnpm install -g memtrace — fully automatic
Cline / Roo Code✅—Add MCP server manually
Any MCP client✅—Add MCP server manually

Skills are workflow prompts that teach the agent how to chain tools. Kiro does not use SKILL.md, so Memtrace writes equivalent auto steering files instead.


Setup

DeepSeek Harness

dsh comes from @deepseek-ai/dsh, not from Memtrace.

sh
npm install -g @deepseek-ai/dsh
dsh plugin --profile web add github:syncable-dev/dsh-plugin-memtrace

Or without a global CLI:

sh
npx -y @deepseek-ai/dsh plugin --profile web add github:syncable-dev/dsh-plugin-memtrace

That bundle registers Memtrace's skills and starts memtrace mcp inside the Harness profile. First launch may fetch the Memtrace binary via npx; pin a local install with npm install -g memtrace and MEMTRACE_BIN=memtrace.

Claude Code + Claude Desktop

bash
npm install -g memtrace

Handles everything — binary, 17 skills, MCP server, plugin, marketplace. One command, both editors.

For manual setup:

bash
claude plugin marketplace add https://github.com/syncable-dev/memtrace-public.git
claude plugin install memtrace-skills@memtrace --scope user
claude mcp add memtrace -- memtrace mcp

Cursor

npm install -g memtrace handles everything automatically. Cursor v2.4+ reads the same SKILL.md format as Claude.

For project-local install (skills travel with your repo):

bash
npx memtrace-skills install --only cursor --local

Codex, Windsurf, VS Code, Hermes, OpenCode, and Kiro

The installer also writes skills/guidance and MCP configuration for the newer agent surfaces:

AgentGlobal skills / guidanceGlobal MCP configProject-local support
Codex~/.agents/skills/~/.codex/config.toml.agents/skills/, .codex/config.toml
Windsurf~/.codeium/windsurf/skills/~/.codeium/windsurf/mcp_config.json.windsurf/skills/; MCP remains user-level
VS Code / Copilot~/.copilot/skills/VS Code user mcp.json.github/skills/, .vscode/mcp.json
Hermes~/.hermes/skills/~/.hermes/config.yamluser-level only
OpenCode~/.config/opencode/skills/~/.config/opencode/opencode.json.opencode/skills/, opencode.json
Kiro~/.kiro/steering/~/.kiro/settings/mcp.json.kiro/steering/, .kiro/settings/mcp.json

Install only selected integrations:

bash
npx memtrace-skills install --only codex,windsurf,vscode,hermes,opencode,kiro

Install project-local config where supported:

bash
npx memtrace-skills install --only codex,vscode,opencode,kiro --local

Other MCP clients

For Cline, Roo Code, or any client that only needs MCP tools, add this server manually:

json
{
  "mcpServers": {
    "memtrace": {
      "command": "memtrace",
      "args": ["mcp"],
      "env": {}
    }
  }
}
EditorConfig file
Windsurf~/.codeium/windsurf/mcp_config.json
VS Code (Copilot).vscode/mcp.json in your project root
Codex~/.codex/config.toml or .codex/config.toml
Hermes~/.hermes/config.yaml
OpenCode~/.config/opencode/opencode.json or project opencode.json
Kiro~/.kiro/settings/mcp.json or .kiro/settings/mcp.json
ClineCline MCP settings in the extension panel

Uninstall

bash
memtrace uninstall      # removes skills, MCP server, plugin, settings
npm uninstall -g memtrace

Already ran npm uninstall first? The cleanup script is at ~/.memtrace/uninstall.js:

bash
node ~/.memtrace/uninstall.js

Install troubleshooting

npm install -g memtrace ships a small main package + a platform-specific binary (one of @memtrace/darwin-arm64, @memtrace/linux-x64, @memtrace/win32-x64). If memtrace start ever says "Could not find binary for your platform":

bash
# Re-run install, asking npm to keep optional deps
npm install -g memtrace --include=optional

# Or refresh from latest
memtrace install         # built-in self-update
npm install -g memtrace@latest --force

# Or install the platform binary directly (Apple Silicon shown — swap for your platform)
npm install -g @memtrace/darwin-arm64

This typically only happens on machines where npm is configured to skip optional dependencies (corporate npmrc, certain CI caches).


Languages

Programming: Rust · Go · TypeScript · JavaScript · Python · Java · C · C++ · C# · Swift · Kotlin · Ruby · PHP · Dart · Scala · Perl · Lua — full AST: functions, classes, types, calls, complexity.

Infrastructure & config: YAML · HCL / Terraform · JSON · TOML · SQL (including PostgreSQL CREATE POLICY for RLS, with cross-language edges from policies to Drizzle / Prisma / TS schema symbols).

Framework-aware scanners on top of the AST layer:

  • Backend HTTP: Express · NestJS · Encore · Fastify · Vapor · Hummingbird · FastAPI · Flask · Django · Gin · Chi · Echo · Actix · Lapis · Kong · OpenResty · Rails routes
  • Frontend / client: RTK Query · TanStack Query · SWR · URLSession · AsyncHTTPClient · axios · fetch · SwiftUI views
  • CI / infra: GitHub Actions workflows (jobs, steps, needs: edges) · Terraform variables / modules / data sources · Helm charts · K8s manifests
  • Package & dependency graphs: package.json scripts + deps · Cargo.toml deps · pyproject.toml (best-effort)
  • Database: PostgreSQL RLS policies + triggers + functions, with heuristic edges to ORM schema

Requirements

Memtrace runs locally — first index is CPU/RAM intensive, subsequent queries and incremental indexing are much lighter.

MinimumRecommended
CPU4 cores8+ cores for large monorepos
Memory8 GB RAM16–32 GB RAM
Disk5 GB free10–20 GB free
GPUNot requiredNot required
Node.js≥ 18Current LTS
GitRequired for temporal analysisFull repo history for best results

Telemetry

Since v0.3.17 Memtrace ships with opt-out telemetry that helps us catch crashes, regressions, and performance issues before someone files an issue.

  • Collected: app-start events, indexing/embedding durations, panic reports, WARN/ERROR log lines from Memtrace's own crates.
  • NOT collected: source code, file contents, symbol names, embeddings, repository names or paths, branch names, commit data.
  • Sanitisation: every payload is run through a sanitiser that strips home-dir paths, token-shaped strings, and email addresses before it touches disk.

Disable with one env var:

bash
MEMTRACE_TELEMETRY=off memtrace start                    # per-run
export MEMTRACE_TELEMETRY=off                             # permanent (~/.zshrc, ~/.bashrc)

Or in your editor's MCP config: "env": { "MEMTRACE_TELEMETRY": "off" }.

Full breakdown — including the on-disk queue layout, where data is stored on the receiving end, and how to inspect what would have shipped — is in TELEMETRY.md.


License & ownership

Proprietary EULA. Free to use during private beta and after general availability for individual developers. Indexer + database (MemDB) are closed-source.

Benchmark suite under MIT in benchmarks/ — fully reproducible, no proprietary code required to run them.


MseeP.ai Security Assessment Badge

Dùng MCP memtrace với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối memtrace, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm memtrace làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của memtrace.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "memtrace-public": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của memtrace, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của memtrace.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng memtrace giúp tôi làm việc này không?
memtrace
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng memtrace.

Câu hỏi thường gặp

Máy chủ MCP memtrace dùng để làm gì?

memtrace là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP memtrace với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng memtrace với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP memtrace với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối memtrace, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP memtrace với TypingMind?

memtrace hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP memtrace cung cấp những công cụ nào trong TypingMind?

memtrace cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP memtrace không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu memtrace yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇