Trail-Code
Self-learning code map and team learnings for coding agents
Install
See setup instructions on trailhq.comWhat it does
Trail-code is a local context layer for coding agents. It has two parts. First, a code map (called the graft map) parses your repository with tree-sitter into a graph of files, functions and callers, so an agent receives pointers to the relevant code with each prompt and can see what depends on a file after it is edited. The map refreshes as code changes, including uncommitted edits. Second, learnings capture what a session works out or what you correct, saved as readable files; code-related learnings live in the repo and personal ones stay in your home directory.
It is aimed at individuals and teams using coding agents such as Claude Code, Cursor, Codex and Pi. Install with npm as a global CLI and run an init command inside the repo, which wires the chosen agents, creates the learnings directory and, for Claude Code, adds hooks and a statusline. Other clients reach the map through MCP tools and instruction files.
Limitations: it requires a recent Node version, setup writes agent configuration files (optionally user-level), and the deep summaries feature uses a model provider under your own API key. Team-wide sharing across repositories is described as forthcoming.
- Code map is generated locally; no server or daemon runs
Compatibility and authentication
- Connection
- Local
- Transports
- Unspecified
- Authentication
- Unknown
Security and permissions
- When you run the server locally, it runs with your user permissions.
- Authentication type: Unknown.
Repository data
- Stars
- 11,456
- Last push
- Nov 23, 2026
- License
- MIT
- Archived
- No
FAQ
- What license does Trail-Code use?
- MIT
- Does Trail-Code run locally or remotely?
- It runs locally.
- Is Trail-Code an official server?
- It is listed as a community server.
Embed a listing badge
<a href="https://aiagentsmarketplace.dev/mcp/trail-code"><img src="https://aiagentsmarketplace.dev/badges/featured.svg" alt="Featured on AI Agents Marketplace" width="262" height="36"></a>
Comments
No comments yet.