Logo Trace

Trace

Cộng đồng
mrchatam

Local-first project knowledge graph + progressive planning for AI coding agents (CLI, MCP, optional GUI).

Nhà phát hànhmrchatam
Kho mãTrace
Ngôn ngữGo
Bản fork
0
Sao
12
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Giấy phépApache-2.0
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Trace 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ở

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

Trace

Local-first project knowledge graph and progressive planning for AI coding agents.

Trace sits beside Git and your coding agent. It records why work exists, what the project currently believes, and how discoveries should change the next plan — then serves that back as bounded context (CLI, MCP, optional local GUI).

Why Trace

Coding agents see files and diffs. They usually do not see:

  • which goal or decision caused a change;
  • what assumptions are still load-bearing;
  • what evidence supports a “done” claim;
  • how a discovery should replan affected work;
  • which skills/tools/MCP servers a task actually needs.

Trace is that missing layer: a versioned SQLite graph under .trace/, with Git remaining the source-of-truth for history and content.

Install

Requirements: Go matching go.mod (currently 1.26+), plus a C toolchain for the full CLI (CGO_ENABLED=1 — tree-sitter analyzers).

The module is not published to the Go module proxy yet, so go install …@latest fails until a version is tagged. Build from a checkout:

bash
git clone https://github.com/mrchatam/Trace.git
cd Trace
CGO_ENABLED=1 go build -o bin/trace ./cmd/trace
CGO_ENABLED=1 go build -o bin/trace-mcp ./cmd/trace-mcp
cp -f bin/trace bin/trace-mcp ~/.local/bin/   # or any dir on PATH
./bin/trace version
  • Both trace and trace-mcp need CGO_ENABLED=1 on tip (tree-sitter / analyzers). CGO_ENABLED=0 fails to link language bindings.
  • Some library packages that do not import analyzers remain usable with CGO_ENABLED=0.
  • No GitHub Releases yet — use the build above. See also docs/gui-quickstart.md for PATH notes.

trace install … configures agent/MCP/hook snippets; it does not put binaries on PATH.

60-second quickstart

From any project directory (Git optional but recommended):

bash
trace init
# → creates .trace/trace.db (never project-root trace.db)

trace add goal --title "Harden auth" --body "Close session gaps"
# → {"id":"<goal-id>","ok":true,"type":"goal"}

trace add task --title "Audit cookie flags" --goal-id <goal-id>
# → {"id":"<task-id>","ok":true,"type":"task"}

trace index
trace search cookie
trace context <task-id>
trace loop status --task <task-id>

Clone of a repo that commits trace/graph.json:

bash
trace init
trace seed import trace/graph.json
trace index
trace plan show
trace why goal <id>
trace context <task-id>

After seed import, tasks are PENDING (default export omits reviews, transitions, and task work_state).

Surfaces

SurfaceBinary / commandRole
CLItraceCanonical operator interface (init, add, index, search, context, loop, plan, …)
MCPtrace-mcp (stdio)Same graph for any MCP-capable coding agent — tools trace_why, trace_context, trace_search, trace_loop, trace_plan, trace_explore, … (17 tools; confirm with trace_version)
HTTP / GUItrace serve / trace guiOpt-in loopback API + embedded Explore SPA (default 127.0.0.1:7432; not a daemon)

Wire Trace into your coding agent (MCP)

Trace’s agent integration is stdio MCP, not a Cursor-only plugin. Any host that can launch an MCP server with a command + args can use trace-mcp the same way (Cursor, Claude Code, and other MCP clients).

Universal config shape (print adapters emit this):

json
{
  "mcpServers": {
    "trace": {
      "type": "stdio",
      "command": "/abs/path/to/trace-mcp",
      "args": ["-C", "${workspaceFolder}"]
    }
  }
}

Prefer an absolute path to trace-mcp. After install or rebuild, restart/reload the MCP connection in your agent so you are not talking to a stale stdio process. Then call trace_version and confirm the identity matches your build.

Shipped install adapters (helpers — same MCP server underneath):

bash
# Detect what Trace can configure in this environment / project
trace install detect

# Cursor — prints snippet; --write merges into ~/.cursor/mcp.json (or --mcp-json)
trace install cursor
trace install cursor --write --bin /abs/path/to/trace-mcp

# Claude Code — requires project marker (.claude/ or CLAUDE.md); --write → .claude/trace-mcp.json
trace install claude
trace install claude --write --bin /abs/path/to/trace-mcp

# Optional: git post-commit / Cursor hook helpers
trace install git-hook
trace install cursor-hook

Other MCP hosts: paste the JSON above into that product’s MCP settings (or generate it with trace install cursor / claude and adapt the path). The protocol and tool names do not change.

GUI (any project with .trace/ — agent-agnostic):

bash
cd your-project && trace gui
# headless twin: trace serve

Details: docs/gui-quickstart.md. See also trace install --help and trace install detect.

What it is / isn’t

Is

  • Local-first knowledge + planning substrate for one project root (-C / cwd; no parent walk-up).
  • Hybrid retrieval: exact lookup, lexical FTS, graph-label traversal, temporal/history — not embedding/vector semantic search (deferred — DR-NOSSEM; do not expect semantic_match).
  • Progressive planning: coarse → deep near execution → replan from discoveries.
  • Evidence and independent review before DONE; provenance on inferred vs verified facts.
  • Portable causal graph via committed trace/graph.json (.trace/ stays local/gitignored).

Isn’t

  • A Git replacement, IDE, or coding-agent runtime.
  • Cloud SaaS, multi-tenant hosting, or always-on network daemon (HTTP/GUI is opt-in loopback).
  • Embedding/RAG semantic search (not shipped).
  • A claim that Jev or other external integrations are productized here.

Design principles (condensed)

  • Progressive planning; discovery is normal and feeds the plan.
  • Evidence over assertions; implementation ≠ review identity.
  • Context minimization — smallest high-value packet first, expand on demand.
  • Hybrid FTS/graph/temporal retrieval (no embeddings yet — DR-NOSSEM).
  • Provenance everywhere; forward progression; human authority.
  • Capability-aware tasks; Git for history; incremental index updates.

Feature map (shipped vs deeper docs)

AreaShipped surface (examples)
Graph CRUDtrace add, link, transition, review, tasks
Retrievalsearch, why, context, explore / MCP trace_explore
Loop / gatesloop next|apply|status|gate, optional --enforce
Planningplan create-coarse|deep|show|bootstrap|…
Indexindex / index status / index watch (file-local incremental)
Portable graphseed import|export → trace/graph.json
Impact / capsimpact, capability, agents recommend
Install adaptersinstall detect|cursor|claude|cursor-hook|git-hook|agents (MCP helpers for multiple agents)
Local HTTP/GUIserve, gui (embedded SPA)

For command truth, prefer trace --help and MCP Instructions / trace_version over older blog-style docs.

Documentation map

DocWhat
docs/TODO.mdExecution board index (phase tables under docs/TODO/)
docs/gui-quickstart.mdOpt-in GUI / serve
docs/ARCHITECTURE.mdComponent boundaries
docs/SECURITY.mdTrust boundaries
docs/PROJECT_MODEL.mdEntities, relations, provenance
docs/RETRIEVAL_AND_CONTEXT.mdRetrieval strategy (incl. DR-NOSSEM)
docs/ROADMAP.mdRoadmap / milestone gates
PROJECT_DOCS_INDEX.mdFull doc index
CONTRIBUTING.mdDev rules, portable-graph export, dual-stack notes
AGENTS.mdAgent entrypoint / phase focus
LICENSEApache-2.0

Status

Active research/engineering codebase: foundational graph, CLI, MCP, and opt-in local GUI are in use and under rapid iteration (multi-phase boards; see AGENTS.md). The validation bar is not “orchestrate many agents,” but:

Can an agent understand an unfamiliar repo, plan a bounded task, adapt when implementation discovers something new, and decide better with the project graph than with raw files alone?

Expect sharp edges, evolving commands, and honest gaps. Read trace --help and the active phase board before assuming a feature exists.

License

Apache-2.0. Hosted/enterprise offerings may appear later without restricting the open-source core.

Cài đặt

TypingMind
{
  "mcpServers": {
    "trace": {
      "command": "trace-mcp",
      "args": [
        "-C",
        "{{config.WORKSPACE_FOLDER}}"
      ],
      "env": {
        "WORKSPACE_FOLDER": "<WORKSPACE_FOLDER>"
      }
    }
  }
}

Dùng MCP Trace 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 Trace, 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 Trace 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 Trace.
  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": {
    "trace": {
      "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 Trace, 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 Trace.
  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 Trace giúp tôi làm việc này không?
Trace
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Trace.

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

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

Trace 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 Trace 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 Trace 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 Trace 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 Trace, 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 Trace với TypingMind?

Trace 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 Trace cung cấp những công cụ nào trong TypingMind?

Trace 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 Trace 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 Trace 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 👇