fix(mcp): use SDK protocol version in debug (#32243)

This commit is contained in:
Aiden Cline 2026-06-13 23:54:45 -05:00 committed by GitHub
parent f55a931f59
commit 231f4944c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,6 +5,7 @@ import { Cause } from "effect"
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { UnauthorizedError } from "@modelcontextprotocol/sdk/client/auth.js"
import { LATEST_PROTOCOL_VERSION } from "@modelcontextprotocol/sdk/types.js"
import * as prompts from "@clack/prompts"
import { UI } from "../ui"
import { MCP } from "../../mcp"
@ -752,7 +753,7 @@ export const McpDebugCommand = effectCmd({
jsonrpc: "2.0",
method: "initialize",
params: {
protocolVersion: "2024-11-05",
protocolVersion: LATEST_PROTOCOL_VERSION,
capabilities: {},
clientInfo: { name: "opencode-debug", version: InstallationVersion },
},