Skip to content

feat: Add support for Goose CLI in mcp setup (#116)#631

Closed
DhineshPonnarasan wants to merge 17 commits intoCodeGraphContext:mainfrom
DhineshPonnarasan:feat/goose-cli-support
Closed

feat: Add support for Goose CLI in mcp setup (#116)#631
DhineshPonnarasan wants to merge 17 commits intoCodeGraphContext:mainfrom
DhineshPonnarasan:feat/goose-cli-support

Conversation

@DhineshPonnarasan
Copy link
Copy Markdown
Contributor

@DhineshPonnarasan DhineshPonnarasan commented Feb 11, 2026

#116

This PR adds support for the Goose CLI tool in the cgc mcp setup workflow.

Changes introduced:

  • Added a dedicated _configure_goose handler following the existing IDE integration pattern.
  • Implemented cross-platform detection for Goose configuration file paths (Linux/macOS and Windows).
  • Added safe YAML loading and non-destructive merging to preserve existing user configuration.
  • Integrated Goose into the MCP setup selection flow.
  • Updated CLI command description to include Goose as a supported tool.

The implementation mirrors the structure and abstraction boundaries used for other supported tools to ensure architectural consistency and avoid duplication of shared logic. Changes are scoped only to the required files and do not impact existing integrations.

Manual verification performed:

  • Verified config file creation when absent.
  • Verified safe merging when configuration already exists.
  • Verified repeated setup does not duplicate entries.
  • Verified integration via cgc mcp setup.
image image image image image image

Copilot AI review requested due to automatic review settings February 11, 2026 07:13
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 11, 2026

@DhineshPonnarasan is attempting to deploy a commit to the shashankss1205's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Goose CLI as a supported target in the cgc mcp setup wizard, following the existing IDE/CLI integration flow.

Changes:

  • Introduces a new _configure_goose() handler to write MCP server settings into Goose’s config.yaml.
  • Extends the MCP setup selection prompt to include “Goose” and routes selection to the new handler.
  • Updates cgc mcp setup help text to list Goose as a supported tool.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

File Description
src/codegraphcontext/cli/setup_wizard.py Adds Goose configuration handler and integrates Goose into the MCP setup wizard prompts/selection flow.
src/codegraphcontext/cli/main.py Updates CLI docstring/help text to mention Goose support.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@Shashankss1205 Shashankss1205 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont understand why do we create a dedicated function for putting the .json files when we already have a function that does the same? Is there something that I am missing or is it a redundancy?

@DhineshPonnarasan
Copy link
Copy Markdown
Contributor Author

Hi @Shashankss1205
Thanks for checking this. The separate _configure_goose function is necessary because Goose follows a different pattern than the other supported tools:

  1. File Format: Goose uses YAML (config.yaml), whereas the shared _configure_ide logic is hardcoded for JSON operations (json.load/dump).
  2. Schema Structure: Most tools (VS Code, Claude, etc.) share the standard {"mcpServers": {...}} schema. Goose uses a custom schema under an extensions: key with specific fields like type: stdio and cmd/args located differently.
  3. Global vs Local: The existing convert_mcp_json_to_yaml function is specific to generating a local devfile.yaml for Amazon Q. Goose requires safely editing a simplified global configuration file in the user's home directory.

Using a dedicated handler keeps the main _configure_ide clean and avoids adding complex conditional logic for file formats/schemas inside the main loop. I’ve ensured it follows the same safe-load/merge pattern to prevent data loss.

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.

3 participants