Code Analyzer provides one-click MCP server configuration for 11+ AI coding agents. Once configured, your agent gains access to code analysis, PR review, impact analysis, cross-repo intelligence, and more — directly through chat.
# Detect installed agents
code-analyzer agent detect
# Configure all detected agents
code-analyzer agent configure
# Check status
code-analyzer agent status
# List all supported agents
code-analyzer agent list| Agent | Config File | Format | Detection |
|---|---|---|---|
| Claude Code | ~/.claude/mcp.json |
JSON | ~/.claude/ exists |
| Cursor | ~/.cursor/mcp.json |
JSON | ~/.cursor/ exists |
| Windsurf | ~/.windsurf/mcp.json |
JSON | ~/.windsurf/ exists |
| Continue.dev | ~/.continue/config.json |
JSON | ~/.continue/ exists |
| Aider | ~/.aider.conf.yml |
YAML | ~/.aider.conf.yml or ~/.aider/ exists |
| Cline | ~/.cline/mcp_settings.json |
JSON | ~/.cline/ exists |
| Codex (OpenAI) | ~/.codex/config.yml |
YAML | ~/.codex/ exists |
| Gemini CLI | ~/.gemini/mcp.json |
JSON | ~/.gemini/ exists |
| Cody (Sourcegraph) | ~/.cody/mcp.json |
JSON | ~/.cody/ exists |
| Amazon Q Developer | ~/.aws/amazonq/mcp.json |
JSON | ~/.aws/ exists |
| GitHub Copilot Chat | ~/.vscode/settings.json |
JSON | ~/.vscode/ exists |
All agents use a shared MCP server entry that connects to Code Analyzer:
{
"command": "npx",
"args": ["@agentix-e/code-analyzer", "mcp"],
"env": {
"CODE_ANALYZER_ROOT": "${workspaceFolder}"
}
}The exact serialization format varies by agent:
{
"mcpServers": {
"code-analyzer": {
"command": "npx",
"args": ["@agentix-e/code-analyzer", "mcp"],
"env": {
"CODE_ANALYZER_ROOT": "${workspaceFolder}"
}
}
}
}{
"mcpServers": {
"code-analyzer": {
"command": "npx",
"args": ["@agentix-e/code-analyzer", "mcp"],
"env": {
"CODE_ANALYZER_ROOT": "${workspaceFolder}"
}
}
}
}{
"github.copilot.chat.mcpServers": {
"code-analyzer": {
"command": "npx",
"args": ["@agentix-e/code-analyzer", "mcp"],
"env": {
"CODE_ANALYZER_ROOT": "${workspaceFolder}"
}
}
}
}mcp_servers:
- name: code-analyzer
command: npx
args:
- "@agentix-e/code-analyzer"
- mcp
env:
CODE_ANALYZER_ROOT: "${workspaceFolder}"| Variable | Description | Default |
|---|---|---|
CODE_ANALYZER_ROOT |
Root directory to analyze | ${workspaceFolder} |
NODE_ENV |
Environment mode | production |
- The auto-configuration creates
~/.claude/mcp.json - Restart Claude Code after configuration
- Verify: ask "What MCP servers are available?"
- Configuration writes to
~/.cursor/mcp.json - Restart Cursor or reload the window (Cmd/Ctrl+Shift+P → "Reload Window")
- Verify: the MCP tools appear in the chat panel
- Configuration writes to
~/.windsurf/mcp.json - Restart Windsurf
- Verify: check the MCP server list in settings
- Configuration merges into
~/.continue/config.json - Restart VS Code with Continue extension
- Verify:
@code-analyzerslash commands appear in chat
- Auto-configuration appends MCP settings to
~/.aider.conf.yml - Existing config is preserved and merged
- Verify: run aider with
--mcpflag
- Configuration writes to
~/.cline/mcp_settings.json - Restart VS Code
- Verify: the code-analyzer server appears in the MCP panel
- Configuration adds MCP section to
~/.codex/config.yml - Restart Codex session
- Verify: list available MCP tools in the Codex terminal
- Configuration writes to
~/.gemini/mcp.json - Restart Gemini CLI
- Verify: run
gemini mcp list
- Configuration writes to
~/.cody/mcp.json - Restart VS Code
- Verify: ask "What tools do you have?"
- Configuration writes to
~/.aws/amazonq/mcp.json - Restart IDE
- Verify: check MCP tools in the Amazon Q panel
- Configuration merges into
~/.vscode/settings.json - Reload the VS Code window
- Verify: open Copilot Chat and ask "List available MCP tools"
If you prefer to configure manually, copy the appropriate config block from above into each agent's config file. The MCP server entry is the same for all agents.
Create or edit ~/.cursor/mcp.json:
{
"mcpServers": {
"code-analyzer": {
"command": "npx",
"args": ["@agentix-e/code-analyzer", "mcp"],
"env": {
"CODE_ANALYZER_ROOT": "${workspaceFolder}"
}
}
}
}The detection is filesystem-based. Ensure the agent has been run at least once
(which creates its config directory). If an agent is installed but uses a custom
config location, use code-analyzer agent configure --target <agent-id> to force
configuration.
- Restart the agent — most agents require a restart to pick up MCP config
- Check the config file — verify the file was created with
code-analyzer agent status - Check
npxavailability — ensure Node.js and npx are in your PATH - Check package access — the package
@agentix-e/code-analyzermust be published or linked locally
When Code Analyzer configures an agent, it backs up any existing config file
with a .code-analyzer-backup suffix. To restore:
# Restore a specific agent's backup
code-analyzer agent restore <agent-id>Or manually:
mv ~/.cursor/mcp.json.code-analyzer-backup ~/.cursor/mcp.jsonIf you see permission errors when writing config files:
- The config files are written to your home directory (
~) - Ensure your user has write permissions to these directories
- VS Code settings.json may be read-only if synced — disable settings sync temporarily
It is safe to configure multiple agents to use code-analyzer simultaneously. Each agent connects independently to its own MCP server instance.
After configuration, verify your setup:
ls -la ~/.cursor/mcp.json
ls -la ~/.claude/mcp.json
# ... etc.code-analyzer agent statusIn any configured agent, ask:
What code analysis tools are available?
You should see tools for code review, impact analysis, dependency graphs, and more.
Analyze this repository and show me the dependency graph
The agent should use the MCP tools to perform the analysis.
# Detect installed agents
code-analyzer agent detect
# Configure all detected agents
code-analyzer agent configure
# Configure all supported agents (even those not detected)
code-analyzer agent configure --all
# Configure specific agents
code-analyzer agent configure --target "cursor,windsurf,claude-code"
# Dry run (preview without making changes)
code-analyzer agent configure --dry-run
# List all supported agents with status
code-analyzer agent list
# Show configuration status
code-analyzer agent statusTo remove Code Analyzer from all configured agents:
# Remove MCP server entries from config files manually, or
# restore from backups created during configuration:
for f in ~/.cursor/mcp.json.code-analyzer-backup \
~/.claude/mcp.json.code-analyzer-backup \
~/.windsurf/mcp.json.code-analyzer-backup \
~/.continue/config.json.code-analyzer-backup \
~/.cline/mcp_settings.json.code-analyzer-backup \
~/.gemini/mcp.json.code-analyzer-backup \
~/.cody/mcp.json.code-analyzer-backup \
~/.aws/amazonq/mcp.json.code-analyzer-backup \
~/.vscode/settings.json.code-analyzer-backup; do
orig="${f%.code-analyzer-backup}"
if [ -f "$f" ]; then mv "$f" "$orig"; fi
doneFor Aider and Codex, check ~/.aider.conf.yml and ~/.codex/config.yml for
the mcp_servers: section and remove it.
Need help? Open an issue at github.com/AgentiX-E/code-analyzer/issues