CLI-323 configure MCP for Copilot integration; Refactor Claude MCP#229
CLI-323 configure MCP for Copilot integration; Refactor Claude MCP#229sophio-japharidze-sonarsource wants to merge 1 commit intoCLI-217_integrate-copilotfrom
Conversation
b7c5b16 to
2b6c956
Compare
901dc1b to
280a13c
Compare
SummarySummaryThis PR configures MCP (Model Context Protocol) server support for Copilot integration and refactors the shared MCP setup logic to eliminate code duplication between Claude and Copilot. Key Changes:
Impact: Both Claude and Copilot can now use the same MCP infrastructure, with support for both global (~/.claude.json, ~/.copilot/mcp-config.json) and project-level (.mcp.json) configurations.
|
280a13c to
672fe93
Compare
672fe93 to
334f5c3
Compare
334f5c3 to
e93e68e
Compare
e93e68e to
19b3557
Compare
19b3557 to
10a9d09
Compare
damien-urruty-sonarsource
left a comment
There was a problem hiding this comment.
LGTM, I just foresee that this common MCP config will not be common for all agents, but for now it's fine. Another thing that bothers me is that we have 2 different folders that are used for shared helper functionality: lib/ and src/cli/commands/_common/. It's a bit confusing, and maybe we should group them. But it's out of scope of this PR
| import { error, info, success } from '../../../../ui'; | ||
|
|
||
| export async function setupMcpServerForAgent( | ||
| agent: 'claude' | 'copilot', |
There was a problem hiding this comment.
I don't think having a common method for all MCP configs will work in the long run. Each Agent comes with different syntax or subtleties in their MCP config files. But for now it should be fine
| 'Setup SonarQube integration for Claude Code. This will install secrets scanning hooks, configure SonarQube Agentic Analysis and MCP Server.', | ||
| ) | ||
| .option('-p, --project <project>', 'Project key') | ||
| .option('-p, --project <project>', 'Project key. Ignored when --global is used.') |
There was a problem hiding this comment.
Maybe to discuss with Clifford, but I know for some other commands, we fail if some options are incompatible. I think it's less confusing because as a user you don't know which option 'wins'



No description provided.