Skip to content

fix: correct OpenCode and Copilot MCP configs - #56

Open
abdul3asith wants to merge 1 commit into
intuit:mainfrom
abdul3asith:fix/mcp-configs
Open

fix: correct OpenCode and Copilot MCP configs#56
abdul3asith wants to merge 1 commit into
intuit:mainfrom
abdul3asith:fix/mcp-configs

Conversation

@abdul3asith

Copy link
Copy Markdown

Summary

Addresses part of Issue #29.

This PR corrects MCP installation for GitHub Copilot CLI and OpenCode.

  • Writes Copilot CLI configuration to
    ~/.copilot/mcp-config.json
  • Adds Copilot's expected local MCP fields
  • Writes OpenCode configuration to
    ~/.config/opencode/opencode.json
  • Uses OpenCode's expected mcp schema and command array
  • Preserves unrelated settings and MCP servers
  • Supports idempotent installation and targeted uninstallation
  • Adds regression tests for both integrations

The remaining integrations mentioned in #29 are intentionally left for
follow-up work after manual verification.

Test plan

  • cargo test --all passes
  • cargo clippy --all-targets passes
  • Tested manually (described below)

Additional automated verification:

  • cargo test -p infigraph-cli passes
  • cargo fmt --all --check passes
  • All 12 config_targets tests pass

Manual verification:

  • Ran infigraph install using an isolated home directory.
  • Confirmed GitHub Copilot CLI discovered Infigraph through
    ~/.copilot/mcp-config.json.
  • Launched Copilot CLI from a TypeScript repository and successfully
    queried the repository using Infigraph MCP tools.
  • Confirmed OpenCode discovered Infigraph through
    ~/.config/opencode/opencode.json.
  • Launched OpenCode from a TypeScript repository and successfully called
    the Infigraph list_projects, index_project, and search tools.
  • Confirmed both clients returned TypeScript function results from the
    indexed repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant