# @sigloch/graphcode [Health: Active]

**Category:** 🤖 Coding Agents  
**Repository:** https://github.com/andreassigloch/graphcode  
**GitHub Stars:** 0  
**npm Downloads (last month):** 2267  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/sigloch-graphcode

## Description
Governed graph substrate for coding agents (Claude Code, OpenCode, any MCP-stdio host) — Apply-Gate + on-disk Kuzu store + MCP tools

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/andreassigloch/graphcode), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Add to your MCP client:

```sh
npx @sigloch/graphcode init
```

2. Add to your MCP client:

```sh
npx @sigloch/graphcode init          # scaffold host configs, GRAPHCODE.md, skills, hooks; add the dependency
```

## Documentation

## 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:

```bash
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.

_Full upstream README: https://allmcps.com/mcp/sigloch-graphcode/readme_

