connect_simulator
Establish a connection to SimVision via the MCP bridge for real-time simulation control and debugging of RTL and gate-level designs.
Instructions
Connect to a SimVision instance running mcp_bridge.tcl.
Args: host: SimVision host (use localhost with SSH tunnel for remote). port: TCP port of the Tcl bridge (default 9876). timeout: Connection timeout in seconds.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | localhost | |
| port | No | ||
| timeout | No |
Implementation Reference
- src/xcelium_mcp/server.py:37-64 (handler)The `connect_simulator` function is defined as an MCP tool, establishing a connection to the SimVision Tcl bridge. It initializes the `_bridge` global variable and performs an initial connection check and environment query.
@mcp.tool() async def connect_simulator( host: str = "localhost", port: int = 9876, timeout: float = 30.0, ) -> str: """Connect to a SimVision instance running mcp_bridge.tcl. Args: host: SimVision host (use localhost with SSH tunnel for remote). port: TCP port of the Tcl bridge (default 9876). timeout: Connection timeout in seconds. """ global _bridge if _bridge and _bridge.connected: await _bridge.disconnect() _bridge = TclBridge(host=host, port=port, timeout=timeout) ping = await _bridge.connect() # Get current simulation context try: where = await _bridge.execute("where") except TclError: where = "(unknown — simulation may not be loaded)" return f"Connected to SimVision at {host}:{port} (ping={ping})\nCurrent position: {where}"