GraphTrail

•
6
•

Maps code repositories into local SQLite graphs, providing tree-sitter based call graph analysis, impact assessment, and context for AI coding agents and developers.

GraphTrail is a local code-graph sidecar designed to enhance AI coding agents and developers' understanding of a codebase. It parses source files with tree-sitter, extracting symbols, imports, and call edges into a lightweight, local SQLite database. This enables precise structural queries like finding callers, callees, change impact, and generating context packs, all before any code modification. It operates as both a command-line interface and a read-only Model Context Protocol (MCP) server, offering multi-repo support without daemons, network calls, or stateful dependencies, making it a robust alternative to text search or embedding indices for structural code navigation.

Key Features

01Generates local code graphs (symbols, imports, call edges) using tree-sitter.
02Operates as a lightweight, incremental, multi-repo, daemon-less, and network-free (default) sidecar.
03Answers structural questions: callers, callees, impact analysis, context packs, and symbol search.
04Provides CLI and read-only Model Context Protocol (MCP) server for queries.
050 GitHub stars
06Supports Python, TypeScript/JavaScript, Rust, and Go programming languages.

Use Cases

01Providing AI coding agents with accurate, structural code context before making edits.
02Enabling developers to navigate codebases and understand change impact through call graphs.
03Automating structural code queries and analysis in scripts and workflows.