connect_to_game

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...

Server Portals portals-mcp
Category Execute
Risk class High
Parameters 10 required

What connect_to_game does on Portals

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.

ParameterTypeRequiredDescription
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.

Why connect_to_game needs a policy

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.

Questions about connect_to_game

What does the connect_to_game tool do? +

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.

What parameters does connect_to_game accept? +

connect_to_game accepts 1 parameter: forcePort. The full parameter table on this page comes from the server's own tool schema.

How do I enforce a policy on connect_to_game? +

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.

What risk level is connect_to_game? +

connect_to_game is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit connect_to_game? +

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.

How do I block connect_to_game completely? +

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.

What MCP server provides connect_to_game? +

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.

// LOOK UP ANOTHER 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 →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.