Skip to content
Merged
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
7 changes: 6 additions & 1 deletion src/message-transport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Transport,
TransportSendOptions,
} from "@modelcontextprotocol/sdk/shared/transport.js";
import { TOOL_INPUT_PARTIAL_METHOD } from "./spec.types";

/**
* JSON-RPC transport using `window.postMessage` for iframe↔parent communication.
Expand Down Expand Up @@ -123,7 +124,11 @@ export class PostMessageTransport implements Transport {
* @param options - Optional send options (currently unused)
*/
async send(message: JSONRPCMessage, options?: TransportSendOptions) {
console.debug("Sending message", message);
// Skip debug log for high-frequency streaming notifications — these
// can fire dozens of times per second and flood the console.
if ((message as { method?: string }).method !== TOOL_INPUT_PARTIAL_METHOD) {
console.debug("Sending message", message);
}
this.eventTarget.postMessage(message, "*");
}

Expand Down
Loading