You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: update README with context command, MCP server, and AI integration guide
Document the new features added in tasks 16-19: context CLI subcommand,
Claude Code slash commands, auto-context workflow, and MCP server mode
with configuration examples for VS Code, Cursor, and other MCP clients.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This launches a Model Context Protocol server exposing the code graph as tools for AI agents and IDEs. See [AI Integration](#ai-integration) for configuration details.
109
+
78
110
### Output Formats
79
111
80
112
Most commands support `--format` with options: `table` (default), `json`, or `csv` (where applicable).
@@ -88,7 +120,9 @@ By default, the database is stored at `./ai-code-graph/graph.db`. Use `--db <pat
- Integration tests that exercise the full pipeline (when MSBuild is available)
145
184
185
+
## AI Integration
186
+
187
+
AI Code Graph can be used as a context source for AI coding assistants. It provides architectural awareness — complexity, call relationships, duplicates, and clusters — so AI agents make better-informed edits.
188
+
189
+
### Claude Code
190
+
191
+
AI Code Graph ships with Claude Code slash commands in `.claude/commands/`. After analyzing your solution, use these commands inside Claude Code:
192
+
193
+
| Command | Description |
194
+
|---------|-------------|
195
+
|`/context <method>`| Get full method context (complexity, callers, callees, cluster, duplicates) before editing |
196
+
|`/hotspots`| Show top complexity hotspots as refactoring candidates |
197
+
|`/duplicates`| Show detected code clones grouped by type |
198
+
|`/drift`| Run drift detection against a saved baseline |
199
+
200
+
**Setup:**
201
+
202
+
1. Analyze your solution: `ai-code-graph analyze YourSolution.sln`
203
+
2. The slash commands read from `./ai-code-graph/graph.db` by default
204
+
3. Use `/context MethodName` before modifying any method to understand its role
205
+
206
+
**Auto-context (CLAUDE.md):** The project's `CLAUDE.md` instructs Claude Code to automatically run `ai-code-graph context` before modifying methods when the graph database exists. This gives the agent architectural awareness without manual intervention.
207
+
208
+
### MCP Server (for IDEs and Other AI Agents)
209
+
210
+
The `mcp` subcommand runs a JSON-RPC stdio server implementing the [Model Context Protocol](https://modelcontextprotocol.io/). This lets VS Code, Cursor, Windsurf, and any MCP-compatible client query the code graph.
0 commit comments