← MCP servers · trailhq

Graft

CAUTIONgrade B · trust 89/100

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

ai agentsanthropicclaude codeclicode graphcodexcontext engineeringcursor

Overview

From the repository's own README, as read at the audited commit.

<div align="center"><img src="assets/graft-hero.png" alt="Graft — open-source context layer for large codebases" width="100%"/>### Turbocharge Claude Code, Cursor, Codex, Gemini & every coding agent: faster, cheaper, with contextual understanding specific to your codebase.<a href="https://trendshift.io/repositories/92209?utm_source=trendshift-badge&utm_medium=badge&utm_campaign=badge-trendshift-92209" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/trendshift/repositories/92209/daily?language=TypeScript" alt="trailhq/Graft | Trendshift" width="250" height="55"/></a><p>  <a href="https://github.com/NanoNets/Graft"><img src="https://img.shields.io/github/stars/NanoNets/Graft?style=for-the-badge&logo=github&logoColor=white&label=Star%20on%20GitHub&color=FFC83D" /></a>  <a href="https://graft.nanonets.ai"><img src="https://img.shields.io/badge/website-graft.nanonets.ai-546FFF?style=for-the-badge" /></a>  <a href="https://discord.gg/zxmKweAA29"><img src="https://img.shields.io/badge/Discord-join-5865F2?style=for-the-badge&logo=discord&logoColor=white" /></a>  <a href="https://www.npmjs.com/package/@nanonets/graft"><img src="https://img.shields.io/npm/v/%40nanonets%2Fgraft?style=for-the-badge&logo=npm&logoColor=white&label=npm" /></a>  <a href="https://www.npmjs.com/package/@nanonets/graft"><img src="https://img.shields.io/npm/dm/%40nanonets%2Fgraft?style=for-the-badge&logo=npm&logoColor=white&label=downloads" /></a>  <a href="https://nodejs.org"><img src="https://img.shields.io/node/v/%40nanonets%2Fgraft?style=for-the-badge&logo=nodedotjs&logoColor=white" /></a>  <img src="https://img.shields.io/badge/TypeScript-strict-3178C6?style=for-the-badge&logo=typescript&logoColor=white" />  <img src="https://img.shields.io/badge/License-MIT-20C997?style=for-the-badge" />  <a href="TELEMETRY.md"><img src="https://img.shields.io/badge/telemetry-anonymous%2C%20opt--out-546FFF?style=for-the-badge" /></a>  <a href="https://scorecard.dev/viewer/?uri=

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 GH_TOKEN=${GH_TOKEN} --env GITHUB_TOKEN=${GITHUB_TOKEN} --env GRAFT_BRAIN_BUILD_SECRET=${GRAFT_BRAIN_BUILD_SECRET} --env GRAFT_BRAIN_TOKEN=${GRAFT_BRAIN_TOKEN} -- npx -y @nanonets/[email protected]
claude-desktop
{
  "mcpServers": {
    "graft": {
      "command": "npx",
      "args": [
        "-y",
        "@nanonets/[email protected]"
      ],
      "env": {
        "GH_TOKEN": "${GH_TOKEN}",
        "GITHUB_TOKEN": "${GITHUB_TOKEN}",
        "GRAFT_BRAIN_BUILD_SECRET": "${GRAFT_BRAIN_BUILD_SECRET}",
        "GRAFT_BRAIN_TOKEN": "${GRAFT_BRAIN_TOKEN}"
      }
    }
  }
}

Exposed tools (10) 8 read · 2 write · 0 destructive

ToolRiskDescription
areadd
breadd
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:
record_graphreadd
record_namesreadRecord one name per cluster.

Details

Source
trailhq/Graft
npm
@nanonets/graft@0.18.0
Credentials it reads
GH_TOKENGITHUB_TOKENGRAFT_BRAIN_BUILD_SECRETGRAFT_BRAIN_TOKENGRAFT_POSTHOG_KEYGRAFT_PUBLIC_GITHUB_TOKEN
License
MIT
Stars
8,437 · pushed 0d ago

Trust audit

Install with care. The audit found things worth knowing before you trust its output.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeWARN
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (3 observation(s))
Network
declared (5 observation(s))
Shell
declared (5 observation(s))
Dependencies
not all pinned
Secrets in source
none-found

Findings (16)

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/brain/signup.ts:99
const url = new URL(req.url ?? "/", "http://127.0.0.1");
MEDIUMNetwork egress · net.raw_ip · CWE-200, CWE-319
src/viz/serve.ts:139
url: `http://127.0.0.1:${port}`,
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
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
src/graph/lsp/enrich.ts:15
import { relPosix } from "../../util/paths.js";
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
test/graph-follow-nested-repos.test.ts:78
'import { depAValue } from "../../dep_a/src/api.js";\n' +
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
test/telemetry-contract.test.ts:170
assert.equal(langsValue(['ts', '../../etc/passwd']), 'ts');
LOWNetwork egress · net.beacon_words · CWE-200, CWE-319
test/telemetry-contract.test.ts:38
assert.equal(track('exfiltrate', { anything: 'here' }, { home, env: OPEN }), null);
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
test/app-review-process.test.ts:117
url: `http://127.0.0.1:${port}`,
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
test/app-server.test.ts:69
url: `http://127.0.0.1:${port}`,
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@anthropic-ai/sdk, commander, dotenv, gray-matter, openai, tree-sitter, tree-sitter-go, tree-sitter-java
Why it matters. 24 dependency range(s) float
Fix. pin exact versions or ship a lockfile
INFOInventory / provenance · inv.oversize · CWE-1104
assets/graft-comparison-demo.gif
assets/graft-comparison-demo.gif
Why it matters. 5317843 bytes not read
INFOInventory / provenance · inv.oversize · CWE-1104
assets/graft-hook-blast-radius-demo.gif
assets/graft-hook-blast-radius-demo.gif
Why it matters. 17593393 bytes not read
INFOInventory / provenance · inv.oversize · CWE-1104
assets/graft-site-act-demo.gif
assets/graft-site-act-demo.gif
Why it matters. 1387508 bytes not read
INFOInventory / provenance · inv.oversize · CWE-1104
assets/graft-viz-demo.gif
assets/graft-viz-demo.gif
Why it matters. 15360796 bytes not read

Gates applied: no_behavioural_pass.

Audited 2026-09-18 · audit v0.4.0 · source sha 6bd383c03303 · full audit: observations/trust-audit/mcp-server/trailhq__graft.json · Report an issue or request a re-scan

Audit history

DateSourceVerdictGradeScoreChange
2026-09-186bd383c03303CAUTIONB89first audit

Alternatives

Other servers in the same categories, safer ones first.

More from trailhq

Questions

What is the Graft MCP server?

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

What tools does Graft expose?

10 in total: 8 read-only, 2 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is Graft safe to connect to an agent?

With care. The audit graded it B (89/100) and found 16 things worth knowing before you trust this server, listed below with the exact line each was found on.

What credentials does Graft need?

It reads GH_TOKEN, GITHUB_TOKEN, GRAFT_BRAIN_BUILD_SECRET, GRAFT_BRAIN_TOKEN, GRAFT_POSTHOG_KEY and GRAFT_PUBLIC_GITHUB_TOKEN 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 (6bd383c03303), read on 2026-09-18. The repository is watched and re-audited when it changes.

Provenance: OBSERVED · read 2026-09-18 · job trust-audit-2026-09-18