Skip to content

Latest commit

 

History

History
85 lines (63 loc) · 2.82 KB

File metadata and controls

85 lines (63 loc) · 2.82 KB
title Connect your agent
description Setup notes for Claude Code, Cursor, Copilot, Windsurf, Aider, and MCP hosts
icon robot

.graph.* files are plain text read with cat and grep. Any agent that can read files can use them — the only thing that varies is how each agent picks them up by default.

At a glance

Agent Setup
Claude Code Run supermodel; install the hook for live updates (the setup wizard does this)
Cursor Run supermodel; sidecars appear in context when you open any source file
GitHub Copilot Run supermodel; open .graph.* files in the editor to include them in context
Windsurf Same as Cursor
Aider Run supermodel, then pass --read '**/*.graph.*' to include all graph files
Any other agent Run supermodel — if it can read files, it can read graph files

Claude Code

Claude Code reads sidecar files automatically as it explores your repo. For live updates as you code, install the PostToolUse hook so every Write or Edit triggers an incremental graph update:

{
  "hooks": {
    "PostToolUse": [{
      "matcher": "Write|Edit",
      "hooks": [{ "type": "command", "command": "supermodel hook" }]
    }]
  }
}

The hook command forwards the file path to the running watch daemon over UDP. If no daemon is running, it's a no-op.

Cursor & Windsurf

Both editors include co-located files in context when you open a source file. After running supermodel, the matching .calls.*, .deps.*, and .impact.* sidecars are surfaced automatically.

GitHub Copilot

Copilot uses files that are open in the editor. Open the relevant .calls.* file alongside the source file you're working on to include graph context.

Aider

Aider's --read flag lets you include files as read-only context. Glob the sidecars:

aider --read '**/*.graph.*'
# or for the three-file format:
aider --read '**/*.calls.*' --read '**/*.deps.*' --read '**/*.impact.*'

MCP server

For agents that speak the Model Context Protocol, the CLI ships a stdio MCP server. It exposes graph analysis as callable tools instead of as files.

Add it to Claude Code (~/.claude/config.json):

{
  "mcpServers": {
    "supermodel": {
      "command": "supermodel",
      "args": ["mcp"]
    }
  }
}

Exposed tools

Tool What it does
analyze Upload repo and run full analysis
dead_code Find functions with no callers
blast_radius Find files affected by a change
get_graph Return a filtered graph slice

Pass --repo /path/to/your/repo to override the working directory.

File mode and the MCP server are complementary, not exclusive. File mode covers the passive read path; the MCP server lets agents trigger fresh analysis on demand.