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

Method request

tests/windows/mcp_stdio.py:87–98  ·  view source on GitHub ↗
(self, method, params=None, timeout=60)

Source from the content-addressed store, hash-verified

85 return json.loads(line.decode("utf-8", "strict"))
86
87 def request(self, method, params=None, timeout=60):
88 self._id += 1
89 rid = self._id
90 self._send({"jsonrpc": "2.0", "id": rid, "method": method,
91 "params": params or {}})
92 deadline = time.time() + timeout
93 while True:
94 msg = self._read_message(timeout=max(1, deadline - time.time()))
95 if msg.get("id") == rid:
96 return msg
97 if time.time() > deadline:
98 raise McpError("timeout waiting for id=%d" % rid)
99
100 def notify(self, method, params=None):
101 self._send({"jsonrpc": "2.0", "method": method, "params": params or {}})

Callers 3

initializeMethod · 0.95
tools_listMethod · 0.95
call_toolMethod · 0.95

Calls 3

_sendMethod · 0.95
_read_messageMethod · 0.95
McpErrorClass · 0.85

Tested by

no test coverage detected