MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / sendMcpMessage

Method sendMcpMessage

source code/cli/structuredIO.ts:760–775  ·  view source on GitHub ↗

* Sends an MCP message to an SDK server and waits for the response

(
    serverName: string,
    message: JSONRPCMessage,
  )

Source from the content-addressed store, hash-verified

758 * Sends an MCP message to an SDK server and waits for the response
759 */
760 async sendMcpMessage(
761 serverName: string,
762 message: JSONRPCMessage,
763 ): Promise<JSONRPCMessage> {
764 const response = await this.sendRequest<{ mcp_response: JSONRPCMessage }>(
765 {
766 subtype: 'mcp_message',
767 server_name: serverName,
768 message,
769 },
770 z.object({
771 mcp_response: z.any() as z.Schema<JSONRPCMessage>,
772 }),
773 )
774 return response.mcp_response
775 }
776}
777
778function exitWithMessage(message: string): never {

Callers 3

updateSdkMcpFunction · 0.80
sendMethod · 0.80
sendMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected