feat(mcp): upgrade client SDK to v2 (#39247)

Co-authored-by: Matt Carey <mcarey@cloudflare.com>
This commit is contained in:
Aiden Cline
2026-07-27 23:19:33 -05:00
committed by GitHub
parent 199e80d83e
commit fb3b8fd059
28 changed files with 271 additions and 1028 deletions
@@ -20,6 +20,7 @@ export const AuthStartResponse = Schema.Struct({
})
export const AuthCallbackPayload = Schema.Struct({
code: Schema.String,
iss: Schema.optional(Schema.String),
})
export const AuthRemoveResponse = Schema.Struct({
success: Schema.Literal(true),
@@ -38,7 +38,7 @@ export const mcpHandlers = HttpApiBuilder.group(InstanceHttpApi, "mcp", (handler
payload: typeof AuthCallbackPayload.Type
}) {
return yield* mcp
.finishAuth(ctx.params.name, ctx.payload.code)
.finishAuth(ctx.params.name, ctx.payload.code, ctx.payload.iss)
.pipe(
Effect.catchTag("MCP.NotFoundError", (error) =>
Effect.fail(