OpenTrace

A knowledge graph that maps your codebase structure, service architecture, and system relationships — then exposes it all through MCP so AI tools can understand your systems.
Index any repo, any size, in seconds. Build a knowledge graph and watch your LLM fetch true codebase context in realtime.
What It Does
OpenTrace indexes source code and builds a queryable knowledge graph. Point it at a repo and it will:
- Parse every file using tree-sitter WASM grammars (12 languages)
- Extract classes, functions, imports, and call relationships
- Build a knowledge graph stored in LadybugDB (embedded graph database)
- Summarize every node using template-based identifier analysis
- Expose the graph via MCP tools to any compatible AI client
Get Started
Linux/MacOS
uvx opentraceai index . # Index a local project for use with MCP etc
Claude Plugin
/plugin marketplace add https://github.com/opentrace/opentrace
/plugin install opentrace-oss@opentrace-oss
/reload-plugins
More info: https://opentrace.github.io/opentrace/getting-started/install-plugin/
OpenCode Plugin
Add to ~/.config/opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@opentrace/opencode"]
}
More info: https://opentrace.github.io/opentrace/getting-started/install-opencode/
Gemini CLI
gemini mcp add opentraceai uvx opentraceai mcp
Run Completely in the Browser
No install: app.opentrace.ai
Run UI Locally
git clone https://github.com/opentrace/opentrace.git && cd opentrace
make install && make ui # Runs on http://localhost:5173/
To enable knowledge vaults (LLM-compiled markdown wikis), also run the
agent's REST server in a second terminal and open the UI with a ?server=
query param so it reads from the backend:
uv --project agent run opentraceai serve # listens on http://localhost:8787
# then open: http://localhost:5173/?server=http://localhost:8787
See Wiki & Vaults for the compile flow and Wiki Providers for the supported LLM providers (Anthropic, Gemini, OpenAI, local).
More Information
Full documentation: opentrace.github.io/opentrace — install guides, architecture, and reference.
Prerequisites: plugins and CLI need uv; OpenCode plugin runs in Bun (provided by OpenCode itself). Source build also needs Node 22+ and Python 3.12+. See Troubleshooting if anything fails.
Claude Code Plugin
The plugin gives Claude Code 5 agents, 4 slash commands, and MCP graph tools.
| Agent | Description |
|---|
@opentrace | Default catch-all — any codebase question routed to the knowledge graph |
@code-explorer | Explore indexed code structure — find classes, functions, files, and relationships |
@dependency-analyzer | Analyze dependencies and blast radius for code changes |
@find-usages | Find all callers, references, and usages of a component |
@explain-service | Top-down walkthrough of how a service or module works |
| Command | Description |
|---|
/index | Index (or re-index) the current project into the knowledge graph |
/graph-status | Show overview of indexed nodes by type |
/explore <name> | Quick exploration of a named component in the graph |
/interrogate | Answer a question about the codebase without making changes |
Full details: Claude Code Plugin reference.
OpenCode Plugin