Skip to content
Unofficial community docs. Content pulled on 2026-10-24 from Trail-Code@d205ac3. For the latest, see the official repo.

Set up the MCP server

trail init registers the Trail-code MCP server with agents that support it, so its six tools appear natively, no shell required. See MCP tools for what each one does.

trail init writes the server into the project’s .mcp.json. Restart Claude Code to load it.

Register it by hand if your agent needs it explicit:

{ "mcpServers": { "trail": { "command": "npx", "args": ["-y", "@trailhq/trail-code", "mcp"] } } }
Terminal window
trail mcp [dir]

Pass --no-mcp to trail init to skip MCP registration for agents other than Claude Code.

Where a CLI agent supports user-level hooks.json, as Codex does, init also installs Trail-code’s hooks there: session start, context with each prompt, blast radius and a $0 graph re-sync after edits, and the end-of-turn sync. Skip them with --no-hooks.