Atlas / MCP servers / trailhq / Trail-Code

Trail-CodeBLOCK

mcp/trailhq/trail-code

Turbocharge Claude Code, Cursor, Codex, Gemini & every coding agent: faster, cheaper, with contextual understanding specific to your codebase.

Verdict
BLOCK
Grade
F
Trust score
47 /100
Exposed tools
27 24r · 3w · 0d
Transport
—
License
MIT
Stars
10,675
01

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.

Read from source at commit bb72cf81f312OBSERVED · 2026-10-23
Advertisement
02

Connect

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-code
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]
claude-desktop
{
  "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}"
      }
    }
  }
}
03

Exposed tools (27)

24 read · 3 write · 0 destructive.

ToolRiskDescription
areadd
breadd
demo-kitread
draw_diagramreadd
get_contextreadThe rules from your Trail workspace
get_rulesreadEvery rule in one of your Trail workspace
graft-fingerprint-cache-bugreaddeleting fingerprint.*.json triggers a full re-parse (46s); prune extract.*.json only
graft_check_freshnesswriteReport whether the committed graph is in sync with the code (drift check).
graft_file_apireadSignatures-only view of one file — every definition
graft_find_allreadRegex search over the graph\
graft_find_codereadQuery 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_mapreadToken-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_callswriteStructural edges for a symbol, over call/reference/import/implements/extends ($0, no LLM). Defaults to direct callers (who depends on it). Set direction:
late-namereadtoo late
list_agentsreadRemote: agents.
list_brainsreadYour Trail workspace
publish-acme-cliwritePublish acme-cli to npm—then check it with npm view.
record_graphreadd
record_namesreadRecord one name per cluster.
release-npmreadPublishes the package to npm
search_rulesreadSearch the rules in your Trail workspace
ship-beta-then-prodreadShips 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-prodread
stray-itemreadnot asked for
tests-clireadRuns the tests.
workflow-releasereadfine
xread
04

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.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeFAIL
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (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)

HIGHFilesystem / path · fs.credential_store · CWE-22, CWE-59
src/skills/never-save.ts:87
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
Why it matters. touches a credential store
HIGHFilesystem / path · fs.credential_store · CWE-22, CWE-59
src/skills/never-save.ts:130
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.
Why it matters. touches a credential store
HIGHNetwork egress · net.tls_off · CWE-200, CWE-319
src/skills/risk-delta.ts:19
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
Why it matters. certificate verification is disabled
Fix. leave verification on
HIGHContainer / deploy · priv.container · CWE-250, CWE-16
src/skills/anchors-wide.ts:140
'--privileged', '-y', '--yes', '--dry-run', '-q', '--quiet']);
HIGHContainer / deploy · priv.container · CWE-250, CWE-16
src/skills/risk-delta.ts:19
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
HIGHContainer / deploy · priv.container · CWE-250, CWE-16
src/trace/walls.ts:54
const DOCKER_ENV = 'DOCKER_HOST=unix://$HOME/.colima/default/docker.sock TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE=/var/run/docker.sock TESTCONTAINERS_RYUK_DISABLED=true';
HIGHPrivilege escalation / persistence · priv.escalate · CWE-269, CWE-250
src/init/prefs.ts:217
'ls', 'cat', 'echo', 'cd', 'rm', 'cp', 'mv', 'mkdir', 'chmod', 'sh', 'bash', 'zsh', 'fish', 'sudo', 'env', 'timeout', 'eslint', 'prettier',
Why it matters. asks for elevated privileges
HIGHPrivilege escalation / persistence · priv.escalate · CWE-269, CWE-250
src/skills/never-save.ts:57
const SUDO = /(?:^|[^\w./-])(?:[\w./-]*\/)?(?:sudo|doas|pkexec)(?![\w-])/i;
Why it matters. asks for elevated privileges
HIGHPrivilege escalation / persistence · priv.escalate · CWE-269, CWE-250
src/skills/never-save.ts:58
const SHELL_WORD = String.raw`(?:sudo\s+(?:-\S+\s+)*)?(?:env\s+(?:\S+=\S*\s+)*)?(?:[\w./-]*\/)?`;
Why it matters. asks for elevated privileges
HIGHPrivilege escalation / persistence · priv.escalate · CWE-269, CWE-250
src/skills/never-save.ts:113
['runs sudo', (c) => SUDO.test(c)],
Why it matters. asks for elevated privileges
HIGHPrivilege escalation / persistence · priv.escalate · CWE-269, CWE-250
src/trace/repairs.ts:108
const WRAPPERS = new Set(['sudo', 'doas', 'nice', 'nohup', 'time', 'exec', 'command', 'caffeinate', 'stdbuf', 'ionice', 'chrt']);
Why it matters. asks for elevated privileges
MEDIUMPrivilege escalation / persistence · fs.persistence · CWE-269, CWE-250
src/skills/risk-delta.ts:28
String.raw`\bxattr\s+-[a-z]*[dc]`, String.raw`\b(?:spctl|csrutil|systemsetup|dscl|nvram|crontab|chown)\b`, String.raw`\bdefaults\s+write\b`,
MEDIUMFilesystem / path · fs.system_paths · CWE-22, CWE-59
src/trace/guard-fast.ts:39
'/etc/profiles/per-user/$USER/bin',
MEDIUMNetwork egress · net.raw_ip · CWE-200, CWE-319
Dockerfile:74
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))"
MEDIUMNetwork egress · net.raw_ip · CWE-200, CWE-319
src/viz/serve.ts:140
url: `http://127.0.0.1:${port}`,
MEDIUMObfuscation / stealth · obf.zero_width · CWE-506, CWE-94
src/skills/skill-file.ts:43
const lines = text.replace(/^/, "").split(/\r?\n/);
MEDIUMHard-coded secrets · secret.aws · CWE-798, CWE-321
test/trail-cold-start.test.ts:132
const out = scrub("use ghp_abcdefghijklmnopqrstuvwxyz1234 and password: hunter2 for [email protected], key AKIAABCDEFGHIJKLMNOP");
MEDIUMHard-coded secrets · secret.generic · CWE-798, CWE-321
test/trace-redact.test.ts:26
assert.deepEqual(redactSecrets(`export API_KEY="sk-abc123def456ghi789jkl012" && node x.js`),
MEDIUMHard-coded secrets · secret.github · CWE-798, CWE-321
test/init-prefs.test.ts:49
"always use the token ghp_abcdefghijklmnopqrstuvwxyz0123456789",
MEDIUMHard-coded secrets · secret.github · CWE-798, CWE-321
test/trace-repairs.test.ts:148
const raw = call("GITHUB_TOKEN=ghp_abcdefghijklmnopqrstuvwxyz0123456789 go test ./...");
MEDIUMHard-coded secrets · secret.github · CWE-798, CWE-321
test/trail-cold-start.test.ts:132
const out = scrub("use ghp_abcdefghijklmnopqrstuvwxyz1234 and password: hunter2 for [email protected], key AKIAABCDEFGHIJKLMNOP");
MEDIUMHard-coded secrets · secret.github · CWE-798, CWE-321
test/trail-cold-start.test.ts:142
{ 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) }] },
MEDIUMHard-coded secrets · secret.github · CWE-798, CWE-321
test/trail-cold-start.test.ts:143
{ 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
LOWInventory / provenance · inv.hidden_file · CWE-1104
.ignore
.ignore
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
.mailmap
.mailmap
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose

Gates applied: no_behavioural_pass.

Audited 2026-10-23 · audit v0.4.1 · source sha bb72cf81f312full audit observations/trust-audit/mcp-server/trailhq__trail-code.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-23bb72cf81f312BLOCKF47first audit
06

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.

ModelsAtlas audit badge

Markdown
[![ModelsAtlas audit: Trail-Code](https://modelsatlas.com/mcp/trailhq/trail-code/badge.svg)](https://modelsatlas.com/mcp/trailhq/trail-code/)

Not your listing, or something out of date? Claim or update your listing.

Advertisement