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

Method request

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

Source from the content-addressed store, hash-verified

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

Callers 5

initializeMethod · 0.95
tools_listMethod · 0.95
call_toolMethod · 0.95
app_test_request_taggedFunction · 0.80

Calls 3

_sendMethod · 0.95
_read_messageMethod · 0.95
McpErrorClass · 0.85

Tested by 1

app_test_request_taggedFunction · 0.64