Trail-CodeBLOCK
Turbocharge Claude Code, Cursor, Codex, Gemini & every coding agent: faster, cheaper, with contextual understanding specific to your codebase.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
The self-learning context layer for coding agents.
Trail-code gives Claude Code, Cursor, Codex and other coding agents a map of your code, and what your team has learned about it.
bb72cf81f312OBSERVED · 2026-10-23Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add graft --env API_KEY=${API_KEY} --env GH_TOKEN=${GH_TOKEN} --env GRAFT_POSTHOG_KEY=${GRAFT_POSTHOG_KEY} --env TRAIL_API_KEY=${TRAIL_API_KEY} -- npx -y @nanonets/[email protected]{
"mcpServers": {
"graft": {
"command": "npx",
"args": [
"-y",
"@nanonets/[email protected]"
],
"env": {
"API_KEY": "${API_KEY}",
"GH_TOKEN": "${GH_TOKEN}",
"GRAFT_POSTHOG_KEY": "${GRAFT_POSTHOG_KEY}",
"TRAIL_API_KEY": "${TRAIL_API_KEY}"
}
}
}
}Exposed tools (27)
24 read · 3 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
a | read | d |
b | read | d |
demo-kit | read | |
draw_diagram | read | d |
get_context | read | The rules from your Trail workspace |
get_rules | read | Every rule in one of your Trail workspace |
graft-fingerprint-cache-bug | read | deleting fingerprint.*.json triggers a full re-parse (46s); prune extract.*.json only |
graft_check_freshness | write | Report whether the committed graph is in sync with the code (drift check). |
graft_file_api | read | Signatures-only view of one file — every definition |
graft_find_all | read | Regex search over the graph\ |
graft_find_code | read | Query the repo context graph in plain words. Returns ranked nodes with exact file:line spans and the relevant source inlined — usually the full answer, no file reads needed. |
graft_repo_map | read | Token-budgeted repo orientation — directory clusters, per-directory hubs, and global hotspots computed purely from the wiring graph ($0, no LLM). Use this to get oriented in an unfamiliar repo before diving into files. |
graft_trace_calls | write | Structural edges for a symbol, over call/reference/import/implements/extends ($0, no LLM). Defaults to direct callers (who depends on it). Set direction: |
late-name | read | too late |
list_agents | read | Remote: agents. |
list_brains | read | Your Trail workspace |
publish-acme-cli | write | Publish acme-cli to npm—then check it with npm view. |
record_graph | read | d |
record_names | read | Record one name per cluster. |
release-npm | read | Publishes the package to npm |
search_rules | read | Search the rules in your Trail workspace |
ship-beta-then-prod | read | Ships storefront to beta, then fast-forwards prod, from the steps that worked on Oct 27. Use when asked to push to beta, ff to prod, fast-forward prod, promote to prod, deploy to prod, update prod or ship it. |
ship-prod | read | |
stray-item | read | not asked for |
tests-cli | read | Runs the tests. |
workflow-release | read | fine |
x | read |
Trust audit
BLOCKgrade F · trust 47/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (6 observation(s))
- Network
- declared (6 observation(s))
- Shell
- declared (5 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (25)
const CREDENTIAL = /(?:\.npmrc|\.netrc|\.aws\/(?:credentials|sso\/cache|cli\/cache)|(?<![\w.])\.ssh\/|\.git-credentials|\.docker\/config\.json|gh\/hosts\.yml|com\.vercel\.cli\/auth\.json|\.config\/gcl
const writes = CREDENTIAL_WRITE.test(c) || />>?\s*\S*(?:\.npmrc|\.netrc|credentials|\.ssh\/|config\.json|hosts\.yml|auth\.json|\.kube\/config|\.pypirc|\.pgpass)|\b(?:cp|mv|tee|ln)\b|security\s+add-/i.
export const RISKY_FLAG = /^(?:--no-verify|--no-gpg-sign|--no-sign|-n|-f|--force(?:-[\w-]+)?|--dangerously[\w-]*|--permission-mode|--allow(?:ed)?-?tools|--privileged|--cap-add|--security-opt|--registr
'--privileged', '-y', '--yes', '--dry-run', '-q', '--quiet']);
export const RISKY_FLAG = /^(?:--no-verify|--no-gpg-sign|--no-sign|-n|-f|--force(?:-[\w-]+)?|--dangerously[\w-]*|--permission-mode|--allow(?:ed)?-?tools|--privileged|--cap-add|--security-opt|--registr
const DOCKER_ENV = 'DOCKER_HOST=unix://$HOME/.colima/default/docker.sock TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock TESTCONTAINERS_RYUK_DISABLED=true';
'ls', 'cat', 'echo', 'cd', 'rm', 'cp', 'mv', 'mkdir', 'chmod', 'sh', 'bash', 'zsh', 'fish', 'sudo', 'env', 'timeout', 'eslint', 'prettier',
const SUDO = /(?:^|[^\w./-])(?:[\w./-]*\/)?(?:sudo|doas|pkexec)(?![\w-])/i;
const SHELL_WORD = String.raw`(?:sudo\s+(?:-\S+\s+)*)?(?:env\s+(?:\S+=\S*\s+)*)?(?:[\w./-]*\/)?`;
['runs sudo', (c) => SUDO.test(c)],
const WRAPPERS = new Set(['sudo', 'doas', 'nice', 'nohup', 'time', 'exec', 'command', 'caffeinate', 'stdbuf', 'ionice', 'chrt']);
String.raw`\bxattr\s+-[a-z]*[dc]`, String.raw`\b(?:spctl|csrutil|systemsetup|dscl|nvram|crontab|chown)\b`, String.raw`\bdefaults\s+write\b`,
'/etc/profiles/per-user/$USER/bin',
CMD node -e "fetch('http://127.0.0.1:'+(process.env.PORT||3000)+'/healthz').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"url: `http://127.0.0.1:${port}`,const lines = text.replace(/^/, "").split(/\r?\n/);
const out = scrub("use ghp_abcdefghijklmnopqrstuvwxyz1234 and password: hunter2 for [email protected], key AKIAABCDEFGHIJKLMNOP");assert.deepEqual(redactSecrets(`export API_KEY="sk-abc123def456ghi789jkl012" && node x.js`),
"always use the token ghp_abcdefghijklmnopqrstuvwxyz0123456789",
const raw = call("GITHUB_TOKEN=ghp_abcdefghijklmnopqrstuvwxyz0123456789 go test ./...");const out = scrub("use ghp_abcdefghijklmnopqrstuvwxyz1234 and password: hunter2 for [email protected], key AKIAABCDEFGHIJKLMNOP");{ id: "s1111111-a", at: day(1), prompts: [{ text: "push with ghp_abcdefghijklmnopqrstuvwxyz0123456789 when https fails", at: day(1) }, { text: "always run go test with -race first", at: day(1) }] },{ id: "s2222222-b", at: day(3), prompts: [{ text: "again push with ghp_abcdefghijklmnopqrstuvwxyz0123456789 when https fails", at: day(3) }, { text: "please always run go test with -race first", at: d.ignore
.mailmap
Gates applied: no_behavioural_pass.
bb72cf81f312full audit observations/trust-audit/mcp-server/trailhq__trail-code.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-23 | bb72cf81f312 | BLOCK | F | 47 | first audit |
Questions
What is the Trail-Code MCP server?
Turbocharge Claude Code, Cursor, Codex, Gemini & every coding agent: faster, cheaper, with contextual understanding specific to your codebase.
What tools does Trail-Code expose?
27 in total: 24 read-only, 3 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Trail-Code safe to connect to an agent?
No — not without reading the findings first. The audit graded it F (47/100) and found 11 critical or high issues in the source. Each one is listed on this page with the file and line it is on.
What credentials does Trail-Code need?
It reads API_KEY, GH_TOKEN, GRAFT_POSTHOG_KEY and TRAIL_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How current is this page?
The grade is for one exact copy of the source (bb72cf81f312), read on 2026-10-23. The repository is watched and re-audited when it changes.
Add this badge to your README
Shows this page's audit result and links back to it. It updates when the audit does.
[](https://modelsatlas.com/mcp/trailhq/trail-code/)
Not your listing, or something out of date? Claim or update your listing.