Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4197,6 +4197,16 @@
"scope": "window",
"order": 50
},
"gitlens.gitkraken.mcp.experimental.enabled": {
"type": "boolean",
"default": false,
"markdownDescription": "Specifies whether to enable experimental features for the GitKraken MCP server (passes `--experimental` flag to the CLI)",
"scope": "window",
"order": 55,
"tags": [
"experimental"
]
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We're explicitly leaving this out of the package.json/contributions.json so it doesn't show in the settings UI.

"gitlens.terminal.overrideGitEditor": {
"type": "boolean",
"default": true,
Expand Down
9 changes: 6 additions & 3 deletions src/env/node/gk/mcp/integrationBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,6 @@ export abstract class GkMcpProviderBase implements Disposable {

try {
const args = ['mcp', 'config', appName, '--source=gitlens', `--scheme=${env.uriScheme}`];
if (configuration.get('gitkraken.mcp.experimental.enabled')) {
args.push('--experimental');
}
if (configuration.get('gitkraken.cli.insiders.enabled')) {
args.push('--insiders');
}
Expand All @@ -168,6 +165,12 @@ export abstract class GkMcpProviderBase implements Disposable {
throw new Error(`Invalid MCP configuration: missing required properties (${output})`);
}

// Append --experimental to the MCP server args (not the config command)
// so the server itself runs with experimental features enabled
Comment on lines +168 to +169
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This comment explains the fix, but doesn't really feel necessary or make sense out of context. It should probably just be removed.

if (configuration.get('gitkraken.mcp.experimental.enabled') && !config.args.includes('--experimental')) {
config.args.push('--experimental');
}

this.onRegistrationCompleted(cliInstall.version);

return {
Expand Down
Loading