@graph-ir/mcp-server
v0.2.3
Published
MCP server for Graph-IR validation, generation, and layout
Maintainers
Readme
@graph-ir/mcp-server
Private 0.2.3 candidate
This checkout packages GraphIR Tools MCP server as a private 0.2.3 candidate for Coral
0.2.8. It is not tagged or published. Install the verified graph-ir-mcp-server-0.2.3.tgz
archive from the candidate artifact set; do not substitute the published
0.2.2 package with different bytes. The server also requires the candidate
Core archive when resolving its exact 0.2.3 dependency.
The released GraphIR 3/2 provenance remains unchanged. Reviewed GraphIR 4 successor exports remain a separately identified candidate contract. The source release branch includes the latest Coral parser compatibility work. Existing 0.2.2 registry commands below describe the preceding published release; they do not install this private candidate.
MCP (Model Context Protocol) server for Graph-IR validation, generation, visualization, and layout.
Installation
npm install @graph-ir/mcp-serverUsage with Claude Code
Add to your Claude Code configuration:
claude mcp add graph-ir-tools -- node /home/coreyt/projects/graph-ir-tools/packages/mcp-server/dist/index.jsOr add to .claude/settings.json:
{
"mcpServers": {
"graph-ir-tools": {
"command": "node",
"args": ["/home/coreyt/projects/graph-ir-tools/packages/mcp-server/dist/index.js"]
}
}
}Available Tools
validate_ir
Validate Graph-IR JSON against schema and semantic rules.
Input:
ir(string, required): Graph-IR JSON stringstrict(boolean): Treat warnings as errors
Output:
valid: Whether the IR is validerrors: Array of error objectswarnings: Array of warning objectsstats: Node and edge counts
generate_ir
Generate Graph-IR from natural language description.
Input:
description(string, required): Natural language descriptionstyle(string): Generation style (default, compact, detailed)
Output:
success: Whether generation succeededir: Generated Graph-IR objectnotes: Generation notes
visualize_ir
Generate ASCII visualization of Graph-IR.
Input:
ir(string, required): Graph-IR JSON stringstyle(string): Visualization style (box, compact, tree)
Output:
success: Whether visualization succeededvisualization: ASCII art string
layout_ir
Resolve graph geometry using a capability-safe ELK adapter.
Input:
ir(string, required): Graph-IR JSON stringalgorithm(string): Layout algorithm (layered, force, mrtree, box, stress)options(object): Transient layout-request options
Output:
success: Whether layout succeededresolved: Separate node rectangles, generated edge routes, and boundserrors: Stable validation, capability, conflict, or verification diagnostics
The tool never writes computed geometry into authored GraphIR. It rejects constraints, authored routes, exact positions/pins, label placement, and other intent that this adapter cannot currently guarantee. Leaf fixed dimensions, supported graph layout options, hierarchy/padding, and collision-safe opaque port IDs are lowered and post-verified. Root node rectangles are graph-relative; nested rectangles are local to the immediate parent's outer rectangle. The flat resolved edge list uses graph-absolute route points.
Development
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Start server (for debugging)
npm start