Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): let Claude approve Yes/No MCP confirmation forms #31315

OpenEphraim-9(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/31315/headopened View on GitHub

Showing 3 changed files with 84 additions and 3 deletions.

x
0 of 3 viewed, 3 left
55 additions and 0 deletionsapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.test.tsModified
View file
@@ -1579,6 +1579,35 @@
+ // mongodb-mcp-server's Elicitation.CONFIRMATION_SCHEMA (@mongodb-js/mcp-core 3.2.2).
+ it("answers a Yes/No confirmation form with the affirmative choice", () => {
+ assert.deepEqual(
+ ClaudeAdapterV2.claudeMcpElicitationAcceptance(
+ form(
+ {
+ confirmation: {
+ type: "string",
+ title: "Would you like to confirm?",
+ description: "Would you like to confirm?",
+ enum: ["Yes", "No"],
+ enumNames: ["Yes, I confirm", "No, I do not confirm"],
+ },
+ },
+ ["confirmation"],
+ ),
+ ),
+ { action: "accept", content: { confirmation: "Yes" } },
+ );
+ for (const choice of ["yes", "Confirm", "Proceed", "OK", "continue"]) {
+ assert.deepEqual(
+ ClaudeAdapterV2.claudeMcpElicitationAcceptance(
+ form({ answer: { type: "string", enum: ["No", "Cancel", choice] } }, ["answer"]),
+ ),
+ { action: "accept", content: { answer: choice } },
+ );