trace-mcp 1.2.1 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,6 +29,47 @@ trace-mcp builds a **cross-language dependency graph** from your source code and
29
29
 
30
30
  ---
31
31
 
32
+ ## Token efficiency — real-world benchmark
33
+
34
+ AI agents burn tokens reading files they don't need. trace-mcp returns **precision context** — only the symbols, edges, and signatures relevant to the query.
35
+
36
+ **Benchmark: trace-mcp's own codebase** (563 files, 2,955 symbols):
37
+
38
+ ```
39
+ Task Without trace-mcp With trace-mcp Reduction
40
+ ─────────────────────────────────────────────────────────────────────
41
+ Symbol lookup 49,719 tokens 5,103 tokens 89.7%
42
+ File exploration 11,284 tokens 463 tokens 95.9%
43
+ Search 22,860 tokens 8,000 tokens 65.0%
44
+ Impact analysis 69,223 tokens 3,464 tokens 95.0%
45
+ Call graph 107,497 tokens 6,452 tokens 94.0%
46
+ ─────────────────────────────────────────────────────────────────────
47
+ Total 260,583 tokens 23,482 tokens 91.0%
48
+ ```
49
+
50
+ **91% fewer tokens** to accomplish the same code understanding tasks. That's ~237K tokens saved per exploration session — more headroom for actual coding, fewer context window evictions, lower API costs.
51
+
52
+ **Savings scale with project size.** On a 500-file project, trace-mcp saves ~237K tokens. On a 5,000-file enterprise codebase, savings grow **non-linearly** — without trace-mcp, the agent reads more wrong files before finding the right one. With trace-mcp, graph traversal stays O(relevant edges), not O(total files).
53
+
54
+ **Composite tasks deliver the biggest wins.** A single `get_task_context` call replaces a chain of ~10 sequential operations (search → get_symbol × 5 → Read × 3 → Grep × 2). That's **one round-trip instead of ten**, with 90%+ token reduction.
55
+
56
+ <details>
57
+ <summary>Methodology</summary>
58
+
59
+ Measured using `benchmark_project` — runs six real task categories (symbol lookup, file exploration, text search, impact analysis, call graph traversal, composite task context) against the indexed project. "Without trace-mcp" = estimated tokens from equivalent Read/Grep/Glob operations (full file reads, grep output). "With trace-mcp" = actual tokens returned by trace-mcp tools (targeted symbols, outlines, graph results). Token counts estimated using trace-mcp's built-in savings tracker.
60
+
61
+ Reproduce it yourself:
62
+ ```
63
+ # Via MCP tool
64
+ benchmark_project # runs against the current project
65
+
66
+ # Or via CLI
67
+ trace-mcp benchmark /path/to/project
68
+ ```
69
+ </details>
70
+
71
+ ---
72
+
32
73
  ## Key capabilities
33
74
 
34
75
  - **Request flow tracing** — URL → Route → Middleware → Controller → Service, across 18 backend frameworks
@@ -100,17 +141,13 @@ trace-mcp list
100
141
 
101
142
  ### Upgrading
102
143
 
103
- After updating trace-mcp (`npm update -g trace-mcp`), run:
144
+ After updating trace-mcp (`npm update -g trace-mcp`), re-run init in your project directory:
104
145
 
105
146
  ```bash
106
- trace-mcp upgrade
147
+ trace-mcp init
107
148
  ```
108
149
 
109
- This runs database migrations and reindexes **all registered projects** with the latest plugins. To upgrade a specific project:
110
-
111
- ```bash
112
- trace-mcp upgrade /path/to/project
113
- ```
150
+ This runs database migrations, updates MCP client configuration, and reindexes the project with the latest plugins.
114
151
 
115
152
  ### Manual setup
116
153