Connect to the live game client in the browser via WebSocket bridge. Sends an mcp_connect event and waits for the browser to confirm with the room ID. The confirmed room ID from the game client is automatically set for subsequent tools. Call this after authenticating. After connecting, use poll_g...
AI agents invoke connect_to_game to trigger actions in Portals. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call — builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
forcePort | boolean | — | Kill any stale process occupying the WS bridge port and restart the bridge. Only set to true after the user confirms. |
Parameters from the server's own tool schema.
This tool initiates an external connection to a live game client via WebSocket, triggers events, and modifies global state (sets the room ID for subsequent tools). It can also forcibly kill processes on port 3099 with forcePort:true. These are active external operations with side effects beyond simple reads or writes, classifying it as Execute. The ability to kill processes elevates severity to high.
From the tool's definition Connect to the live game client in the browser via WebSocket bridge. Sends an mcp_connect event and waits for the browser to confirm with the room ID. The confirmed room ID from the game client is automatically set for subsequent tools.
Attacks that exploit this kind of access
Connect to the live game client in the browser via WebSocket bridge. Sends an mcp_connect event and waits for the browser to confirm with the room ID. The confirmed room ID from the game client is automatically set for subsequent tools. Call this after authenticating. After connecting, use poll_game_events to receive events. If the connection times out due to a stale process on port 3099, call again with forcePort: true to kill it and retry. It is categorised as a Execute tool in the Portals MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
connect_to_game accepts 1 parameter: forcePort. The full parameter table on this page comes from the server's own tool schema.
Register the Portals MCP server in PolicyLayer and add a rule for connect_to_game: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Portals. Nothing to install.
connect_to_game is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the connect_to_game rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for connect_to_game. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
connect_to_game is provided by the Portals MCP server (portals-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →