Skip to content

infigraph install writes incompatible MCP configurations for some coding agents #29

Description

@abdul3asith

infigraph install uses the same mcpServers JSON structure for several coding agents. However, some agents require different configuration paths or schemas.

I manually reproduced this with GitHub Copilot CLI and OpenCode. I also found possible mismatches for other integrations by comparing config_targets.rs with their official documentation.

Related issue

The equivalent Codex TOML configuration problem is already tracked in #26 and addressed by PR #27.

Codex is excluded here. This issue focuses on the shared JSON configuration writer and JSON-based integrations.

Manually tested

GitHub Copilot CLI

Infigraph writes:

~/.copilot/mcp.json

Copilot CLI expects:

~/.copilot/mcp-config.json

copilot mcp list did not detect Infigraph at the generated path. It was detected after placing the configuration at the documented path.

Documentation:
https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers

OpenCode

Infigraph writes:

~/.opencode/config.json

using a top-level mcpServers object.

OpenCode expects:

~/.config/opencode/opencode.json

using the following structure:

{
  "mcp": {
    "infigraph": {
      "type": "local",
      "command": ["/path/to/infigraph-mcp", "--mcp"]
    }
  }
}

OpenCode discovered and attempted to start Infigraph after using the documented path and schema.

Documentation:

Other documentation mismatches

The following integrations were compared against their documentation but were not manually tested by me:

Agent Infigraph writes Documentation suggests
VS Code ~/.vscode/mcp.json with mcpServers User/workspace MCP configuration using servers
Zed ~/.zed/mcp.json with mcpServers Zed settings using context_servers
Windsurf ~/.windsurf/mcp.json ~/.codeium/windsurf/mcp_config.json
Kiro ~/.kiro/mcp.json ~/.kiro/settings/mcp.json

Documentation:

Kiro requires additional verification because some of its documentation still mentions the older ~/.kiro/mcp.json path.

Cursor and Gemini appear to use the paths and mcpServers structure currently generated by Infigraph.

Root cause

All JSON-based targets use install_json_target(), which always writes an mcpServers object.

This assumes that every JSON-based coding agent uses the same path and schema.

Expected behavior

infigraph install should select the correct path and configuration writer for each supported agent.

Target-specific tests should verify:

  • The documented path and schema
  • Existing settings and other MCP servers are preserved
  • Running installation repeatedly does not create duplicates
  • Uninstallation removes only Infigraph

Environment

Infigraph version: 3.2.5
Rust version: rustc 1.97.1
macOS version: 15.2
Manually tested: GitHub Copilot CLI and OpenCode
Documentation comparison only: VS Code, Zed, Windsurf and Kiro

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions