Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 19, 2025

The init command now enables MCP (Model Context Protocol) configuration by default, replacing the opt-in --mcp flag with an opt-out --no-mcp flag. The --mcp flag is kept for backward compatibility but hidden from help.

Changes

  • Flag changes: Added --no-mcp flag to skip MCP setup, kept --mcp flag hidden for backward compatibility
  • Default behavior: gh aw init now creates .vscode/mcp.json and .github/workflows/copilot-setup-steps.yml automatically
  • Backward compatibility: --mcp flag still works but is hidden from --help output
  • Help text: Updated documentation to reflect MCP as default behavior
  • Tests: Updated all test cases to expect MCP files by default, added TestInitRepositoryWithNoMCP and TestInitRepositoryWithMCPBackwardCompatibility

Example

# Before: MCP opt-in
gh aw init          # No MCP files
gh aw init --mcp    # Creates MCP files

# After: MCP opt-out with backward compatibility
gh aw init          # Creates MCP files
gh aw init --no-mcp # No MCP files
gh aw init --mcp    # Creates MCP files (hidden flag, still works)

The implementation handles both flags with --mcp taking precedence when explicitly set for backward compatibility.

Original prompt

Update the "init" command to always apply the "--mcp" flag. Add support for a "--no-mcp" flag to disable update these files.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits December 19, 2025 20:06
- Changed --mcp flag to --no-mcp flag (MCP now enabled by default)
- Updated help text to reflect that MCP is enabled by default
- Updated all tests to reflect new default behavior
- Added new test TestInitRepositoryWithNoMCP for --no-mcp flag
- Updated examples to show --no-mcp instead of --mcp

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
All changes implemented and verified:
- Default behavior now enables MCP (creates .vscode/mcp.json and copilot-setup-steps.yml)
- --no-mcp flag added to skip MCP configuration
- All tests updated and passing
- Help text updated with new behavior
- Manual testing confirms correct behavior

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Update init command to apply --mcp flag always Make MCP configuration default in init command, add --no-mcp flag Dec 19, 2025
Copilot AI requested a review from pelikhan December 19, 2025 20:09
@pelikhan
Copy link
Contributor

@copilot keep --mcp flag for app compat (hide it from help)

- Keep --mcp flag for app compatibility but hide it from help
- --mcp flag still works and enables MCP (backward compatible)
- --no-mcp flag disables MCP (new recommended way)
- Default behavior: MCP enabled
- Updated tests to verify --mcp flag is hidden but functional
- Added TestInitRepositoryWithMCPBackwardCompatibility test

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 19, 2025

@copilot keep --mcp flag for app compat (hide it from help)

Done in commit 0c9ed9f. The --mcp flag is now hidden from help but still functional for backward compatibility.

Changes:

  • --mcp flag kept and still works (hidden from --help output)
  • --no-mcp flag added as the new recommended way to disable MCP
  • Default behavior: MCP enabled
  • Logic handles both flags: --mcp takes precedence if explicitly set

Help output:
Only --no-mcp appears in help, but --mcp still works:

Flags:
  --no-mcp    Skip configuring GitHub Copilot Agent MCP server integration

Tested:

  • gh aw init - MCP enabled by default
  • gh aw init --mcp - MCP enabled (backward compat)
  • gh aw init --no-mcp - MCP disabled

@pelikhan pelikhan marked this pull request as ready for review December 19, 2025 21:54
@pelikhan pelikhan merged commit baeecbd into main Dec 19, 2025
4 checks passed
@pelikhan pelikhan deleted the copilot/update-init-command-for-mcp-flag branch December 19, 2025 21:55
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.

2 participants