Copilot / MCP Integration
What Is MCP?
Section titled “What Is MCP?”The Model Context Protocol (MCP) lets AI agents like GitHub Copilot call external tools. IntentWeave exposes its index queries as MCP tools, so Copilot can search your code index, find connections, and check drift — all from chat.
1. Start the MCP server
Section titled “1. Start the MCP server”iw mcp --session my-project -v2. Configure VS Code
Section titled “2. Configure VS Code”Add to .vscode/mcp.json:
{ "servers": { "intentweave-kg": { "command": "npx", "args": ["@intentweave/cli", "mcp", "--session", "my-project", "-v"] } }}VS Code Copilot will auto-discover the server and make the tools available in chat.
CARI Tools
Section titled “CARI Tools”These tools work with the local SQLite index — no Neo4j or LLM needed.
| Tool | Purpose | Key Parameters |
|---|---|---|
cari_retrieve | Ranked file retrieval by topic or symbol | query, scope?, limit? |
cari_connections | Cross-layer connections + gap detection | entity, include?, limit? |
cari_check | CI drift detection for changed files | changed, severity? |
Usage Examples
Section titled “Usage Examples”Ask Copilot:
- “Find files about authentication” → Copilot calls
cari_retrievewith query=“authentication” - “What’s connected to AuthService?” → Copilot calls
cari_connectionswith entity=“AuthService” - “I changed auth.ts — any docs to update?” → Copilot calls
cari_checkwith changed files
Knowledge Graph Tools (Optional)
Section titled “Knowledge Graph Tools (Optional)”If you have Neo4j running, additional tools are available:
| Tool | Purpose | Key Parameters |
|---|---|---|
kg_query | Natural language or Cypher query | question, cypher?, limit? |
kg_context | Build RAG context from graph | topic?, entity?, hops? |
kg_entities | List/search entities | type?, search?, limit? |
kg_impact | Semantic impact analysis | files, hops? |
kg_doc_health | Documentation freshness | files? |
kg_schema | Graph schema description | (none) |
MCP Server Options
Section titled “MCP Server Options”iw mcp [options]| Option | Default | Description |
|---|---|---|
-s, --session | — | Default session scope |
-v, --verbose | off | Log tool invocations |
Next Steps
Section titled “Next Steps”- CARI Overview — understand what the tools query
- CI Integration — automate with GitHub Actions