Graphcode logo

Graphcode

by @sigloch

Maintains a governed project graph for coding agents, linking requirements, tests, functions, and modules through an Apply-Gate.

Install Graphcode

Run the project’s own setup commands, in order.

Setup steps from the project

@sigloch/graphcode installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Add to your MCP client
    npx @sigloch/graphcode init
    
  2. 2. Add to your MCP client
    npx @sigloch/graphcode init          # scaffold host configs, GRAPHCODE.md, skills, hooks; add the dependency
    

Overview

@sigloch/graphcode gives coding agents a persistent graph of a repository's requirements, tests, functions, and modules. Its MCP tools provide bounded impact analysis, graph context, rule evaluation, mutation, test evidence, and deterministic exports instead of requiring broad document or grep searches. Changes pass through an author-logged Apply-Gate, while the graph is stored locally and exported to committed JSON and generated views. Reach for it when an agent needs traceable project context, controlled specification changes, or a bounded view of what a code change affects.

Use cases

  • Trace the impact of changing a function
  • Enforce tests for new requirements
  • Maintain a graph of repository architecture
  • Feed test results back into project evidence
  • Export a committed project model and generated views

Key features

  • Governed graph mutations through an Apply-Gate
  • Bounded impact and context queries
  • On-disk Kuzu graph store
  • Requirement, test, function, and module relationships
  • Rule evaluation, readiness, and architecture metrics
  • Deterministic graph and document export

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

npm downloads2.3kPackage downloads in the last 30 days.
Last commit4d agoMost recent push to the default branch.

How Graphcode works

What @sigloch/graphcode does

@sigloch/graphcode maintains a project model for coding agents. The model represents requirements (REQ), verifying tests (TEST), implementable functions (FUNC), and modules (MOD), along with relationships such as function chains, flows, and change requests. Source code remains in the repository as text; the graph records what that code is intended to do and how project elements connect.

The server is designed to replace broad context gathering with targeted graph queries. For example, an agent can ask for the impact of changing a function and receive a bounded slice containing connected nodes, data flows, and the frontier of relationships not expanded. A requirement without a verifying test is rejected by the gate.

How it works

Agents interact through MCP tools. Reads can retrieve nodes, edges, filtered graph slices, impact information, or the definition-of-done context for one node. graph_expand opens a deeper branch when the initial slice is not enough. Writes go through graph_mutate, which applies the project rules, records the author, and blocks new violations.

The graph is held in an on-disk Kuzu store under .graphcode/. The committed source of truth is exported to docs/graph/<name>.graph.json, with deterministic documents written to docs/views/. graph_reseed can rebuild the in-process store from the committed model with an automatic backup, and graph_merge can replay a branch worktree's command log onto another store.

The workflow covers specification, implementation updates, evidence from test runs, and export. graph_readiness, graph_metrics, and the rule tools provide project status and structural measurements without changing the graph.

Setup and configuration

Use Node.js 22 or newer and run the setup from the target repository:

Terminal
npx @sigloch/graphcode init

init adds the package using the repository's npm, pnpm, or yarn lockfile, creates the host configuration, and writes GRAPHCODE.md plus GRAPHCODE-STEERING.md. It configures .mcp.json for Claude Code and opencode.json for OpenCode. Add .graphcode/ to .gitignore, reload the agent host, and have the agent read GRAPHCODE.md before calling graph_readiness or starting se:generate.

A repository that already contains a committed graph model can be started after npm install; its local store is built on first start. status, upgrade, rewind, render, vertragstest, skills sync, and remove provide additional command-line operations. Rendering DOCX or PDF requires Pandoc.

Tools and capabilities

The MCP registry contains 23 tools grouped around these capabilities:

  • Read graph elements, node attributes, edges, impact slices, expanded branches, and single-node context.
  • Mutate the graph through the Apply-Gate, merge branch command logs, and reseed from the committed model.
  • Evaluate rules, inspect violations, measure module architecture, and assess readiness.
  • Generate a graph from a cold start, suggest candidate fixes, and show legal edges before authoring.
  • Ingest test results, report test evidence, and list test bindings.
  • Export the live graph to committed JSON and generated views.

Notable tools include graph_impact, graph_context, graph_mutate, graph_readiness, graph_test_ingest, and graph_export.

Limitations and notes

The package has no standalone user interface; an agent host acts as its client. It is intended to run inside the repository it models. The local graph store is separate from the committed graph JSON, so .graphcode/ should remain ignored while docs/graph and generated views can be exported for version control. The host command provides a read-only bridge when no agent session is running, while mcp is normally started by the agent host.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Graphcode

@sigloch/graphcode is an MCP server that connects coding agents to a governed, on-disk Kuzu graph of a repository's requirements, tests, functions, and modules. Its main tools include graph_impact for bounded change analysis, graph_mutate for gated writes, graph_readiness for project status, and graph_export for committed model output.

Run `npx @sigloch/graphcode init` inside the target repository with Node.js 22 or newer. The command installs the package, creates Claude Code and OpenCode host configuration, writes the GraphCode guidance files, and prints the remaining setup steps.

It can run with any MCP-stdio host, but the setup instructions specifically configure Claude Code and OpenCode. Cursor is an MCP client that can host standard MCP servers, so its connection must be configured according to Cursor's MCP setup.

Call `graph_impact` with a graph element identifier. It returns a bounded slice of connected chains, flows, change requests, and the frontier of relationships that were not expanded; use `graph_expand` to deepen one branch.

Write through `graph_mutate`, which applies the rule gate and blocks new violations. A requirement without a verifying TEST is rejected, while `graph_test_ingest` and `graph_test_report` connect test-run evidence back to the project graph.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewGraphcode AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/sigloch-graphcode?style=directory)](https://allmcps.com/mcp/sigloch-graphcode)
HTML Embed
<a href="https://allmcps.com/mcp/sigloch-graphcode"><img src="https://allmcps.com/api/badge/sigloch-graphcode?style=directory" alt="Graphcode on AllMCPs" /></a>