Skip to main content
The GoRules CLI exposes an MCP (Model Context Protocol) server that lets AI assistants interact with your GoRules BRMS projects. When connected, AI tools can read, modify, simulate, and test your decision graphs directly.

How it works

The GoRules CLI starts a lightweight MCP server that connects to your browser session via WebSocket. When an AI assistant sends a tool call, the CLI forwards it to the GoRules web app running in your browser, which executes the operation against your in-memory decision graphs and returns the result. This architecture keeps all execution local - decision graphs are evaluated in your browser, and no data leaves your machine.

Setup

1. Start the MCP server

npx @gorules/cli mcp start
The CLI starts on port 41919 by default and generates an 8-character token displayed in the terminal.

2. Connect in the browser

  1. Open GoRules in your browser and navigate to a branch.
  2. Click the MCP Server button in the editor toolbar.
  3. Enter the 8-character token from the terminal.
  4. The status dot turns green when connected.

3. Configure your AI assistant

claude mcp add gorules --transport http http://localhost:41919/mcp

Available tools

Tools are dynamically registered by the GoRules browser editor when it connects. The exact tools depend on your project, but generally cover graph introspection, graph mutation, decision table operations, simulation, test management, and file operations.
The MCP server instructs AI assistants to call get_current_context first. This provides the assistant with full context about available tools and the connected project.

Connection status

The MCP Server button in the GoRules toolbar shows the connection state:
StatusIndicatorMeaning
ConnectedGreen pulsing dotMCP server is active and linked to your session
ConnectingAmber dotWebSocket connection is being established
DisconnectedGray dotNo active connection
Click the MCP Server button again to disconnect.

Configuration

OptionDefaultDescription
--port, -p41919Port the bridge listens on
--host, -hlocalhostHost the bridge binds to
--url, -u-GoRules server URL (used with --open)
--openfalseOpen the GoRules editor in browser on start

Security

  • Connections are authenticated with an 8-character token generated per session.
  • All tool execution happens in your browser - decision graphs are never sent to the CLI or AI assistant directly.
  • The WebSocket connection runs on localhost only.
  • Only one browser tab can be active on the MCP bridge at a time.

Troubleshooting

“Browser not connected” - The GoRules editor hasn’t connected yet. Open your project and click MCP Server. “Tool execution timed out (60s)” - The browser tab may be in the background or unresponsive. Bring the GoRules editor tab to the foreground. “Browser disconnected” - The WebSocket connection was lost. Reconnect from the GoRules editor.