Skip to content

Commit f43b68d

Browse files
committed
feat: Show initialize request/response in History panel (modelcontextprotocol#269)
- Add logging for initialize request and response in useConnection.connect - Include server capabilities, version, and instructions in history
1 parent 3032a67 commit f43b68d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: client/src/lib/hooks/useConnection.ts

+9
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,15 @@ export function useConnection({
316316

317317
try {
318318
await client.connect(clientTransport);
319+
320+
const initializeRequest = {
321+
method: "initialize",
322+
};
323+
pushHistory(initializeRequest, {
324+
capabilities: client.getServerCapabilities(),
325+
serverInfo: client.getServerVersion(),
326+
instructions: client.getInstructions(),
327+
});
319328
} catch (error) {
320329
console.error(
321330
`Failed to connect to MCP Server via the MCP Inspector Proxy: ${mcpProxyServerUrl}:`,

0 commit comments

Comments
 (0)