intuit / intuit/infigraph

`infigraph install` writes incompatible MCP configurations for some coding agents

Open
#29 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
88
Forks
16
PR merge metrics
No merged PRs in 30d

Description

`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:

```text
~/.copilot/mcp.json
```

Copilot CLI expects:

```text
~/.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:

```text
~/.opencode/config.json
```

using a top-level `mcpServers` object.

OpenCode expects:

```text
~/.config/opencode/opencode.json
```

using the following structure:

```json
{
"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:

- https://opencode.ai/docs/config/
- https://opencode.ai/docs/mcp-servers/

## 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:

- VS Code: https://code.visualstudio.com/docs/agent-customization/mcp-servers
- Zed: https://zed.dev/docs/ai/mcp
- Windsurf: https://docs.windsurf.com/windsurf/cascade/mcp
- Kiro: https://kiro.dev/docs/mcp/configuration/

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

```text
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
```

Contributor guide

Open the contributing guide

Research direction

Start in config_targets.rs, especially install_json_target(), where all JSON-based integrations currently share one writer. Compare each target with the documented paths and schemas, beginning with Copilot CLI and OpenCode, then add target-specific tests for preservation, repeated installation, and selective uninstallation. Done means supported JSON integrations are detected at their documented locations without duplicates.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.