VS Code / Copilot
CCE integrates with GitHub Copilot’s chat agent in VS Code through MCP configuration and a Copilot instructions file.
Quick setup
Section titled “Quick setup”cce init --agent copilotOr let CCE auto-detect (if .vscode/ exists in your project):
cce initFiles created
Section titled “Files created”.vscode/mcp.json
Section titled “.vscode/mcp.json”Registers the CCE MCP server for Copilot’s agent mode.
{ "servers": { "context-engine": { "command": "cce", "args": ["serve", "--project-dir", "/path/to/your/project"] } }}Note: VS Code uses "servers" as the key, not "mcpServers".
.github/copilot-instructions.md
Section titled “.github/copilot-instructions.md”Contains instructions for Copilot to use context_search for code questions. The CCE block is wrapped in markers so your own Copilot instructions are preserved during upgrades.
Verify it’s working
Section titled “Verify it’s working”- After
cce init, reload VS Code (Cmd/Ctrl+Shift+P, then “Developer: Reload Window”) - Open Copilot Chat (Ctrl+Shift+I or the Copilot icon)
- Switch to Agent mode (click the mode selector at the top of the chat panel)
- Ask a code question:
How does the payment processing work?Copilot should call context_search and return results from your indexed codebase. Check the tool call output to confirm.
Then verify savings:
cce savingsRequirements
Section titled “Requirements”- VS Code 1.99+ (MCP support was added in early 2025)
- GitHub Copilot extension installed and active
- Agent mode enabled in Copilot Chat settings
If you don’t see MCP tools in Copilot Chat, check that “Agent mode” is enabled: Settings → Extensions → GitHub Copilot → enable “Chat: Agent”
Working with existing MCP servers
Section titled “Working with existing MCP servers”If you already have a .vscode/mcp.json with other MCP servers, cce init merges the CCE entry without touching your existing servers.
Troubleshooting
Section titled “Troubleshooting”Copilot doesn’t use context_search
Section titled “Copilot doesn’t use context_search”- Confirm Agent mode is active (not “Edit” or “Chat” mode)
- Check
.github/copilot-instructions.mdexists and contains the CCE block - Reload VS Code window after setup
”cce: command not found”
Section titled “”cce: command not found””VS Code inherits PATH from how it was launched. If you installed cce with uv tool install:
- macOS/Linux: Add
~/.local/binto your shell profile, then launch VS Code from a new terminal withcode . - Windows: The installer usually adds to PATH automatically. If not, add
%USERPROFILE%\.local\binto your system PATH, then restart VS Code
Windows: UnicodeDecodeError during init
Section titled “Windows: UnicodeDecodeError during init”Upgrade to CCE v0.4.24+ which fixes Windows encoding issues. Run:
uv tool install "code-context-engine[local]" --upgradeMCP server starts but Copilot can’t connect
Section titled “MCP server starts but Copilot can’t connect”Check that no firewall or antivirus is blocking localhost connections. CCE’s MCP server communicates via stdio (not HTTP) by default, so this is rare.