MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / connect

Method connect

tests/integration/test_mcp.py:60–69  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

58 # ------------------------------------------------------------------
59
60 def connect(self) -> None:
61 self._sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
62 self._sock.settimeout(self.timeout)
63 try:
64 self._sock.connect((self.host, self.port))
65 except (ConnectionRefusedError, socket.timeout) as exc:
66 raise ConnectionError(
67 f"Cannot connect to Serial Studio MCP at {self.host}:{self.port}. "
68 "Ensure Serial Studio is running with API Server enabled."
69 ) from exc
70
71 def disconnect(self) -> None:
72 if self._sock:

Callers 15

__enter__Method · 0.95
mcpFunction · 0.95
fresh_mcpFunction · 0.95
safe_commandFunction · 0.45
_sqlite_tablesFunction · 0.45
_row_countFunction · 0.45
safe_commandFunction · 0.45
mosquitto_brokerFunction · 0.45
__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected