MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / send

Function send

scripts/test_mcp_interactive.py:86–94  ·  view source on GitHub ↗
(process: subprocess.Popen[bytes], message: dict[str, Any])

Source from the content-addressed store, hash-verified

84
85
86def send(process: subprocess.Popen[bytes], message: dict[str, Any]) -> None:
87 if process.stdin is None:
88 raise SmokeFailure("MCP stdin is unavailable")
89 encoded = json.dumps(message, separators=(",", ":")).encode("utf-8") + b"\n"
90 try:
91 process.stdin.write(encoded)
92 process.stdin.flush()
93 except (BrokenPipeError, OSError) as error:
94 raise SmokeFailure("MCP server closed stdin early") from error
95
96
97def wait_response(

Callers 7

send_allFunction · 0.85
connection_write_fullFunction · 0.85
requestFunction · 0.85
run_scenarioFunction · 0.85
th_send_allFunction · 0.85
ipc_test_socket_send_allFunction · 0.85

Calls 1

SmokeFailureClass · 0.70

Tested by

no test coverage detected