Skip to content
BOE Docs

Connect an agent with the BOE MCP server

MCP, the Model Context Protocol, is the standard way an AI agent finds and calls tools. The BOE MCP server gives an agent seven tools to register rulesets, execute them and read the decision log.

Endpoint and key

The server answers at https://mcp.boerules.com/mcp. It speaks MCP over Streamable HTTP, keeps no session between calls and replies in JSON.

Every request carries a BOE project API key in the Authorization header as Bearer [key]. Create the key in the console under Keys. One project key covers all seven tools. A request with no key receives a 401.

terminal
export BOE_API_KEY="[YOUR PROJECT KEY]"

OAuth sign in for the claude.ai and ChatGPT connectors is planned. The server takes an API key today.

Connect Claude Code

Run one command. Claude Code lists the seven tools on its next start.

terminal
claude mcp add --transport http boe https://mcp.boerules.com/mcp \
  --header "Authorization: Bearer $BOE_API_KEY"

Connect another host

Hosts that accept a remote MCP server by URL take the same two values: the endpoint and the Authorization header. This is the shape for Cursor. Each host names the file and the key interpolation in its own way, so check its MCP page for the exact spelling.

.cursor/mcp.json
{
  "mcpServers": {
    "boe": {
      "url": "https://mcp.boerules.com/mcp",
      "headers": {
        "Authorization": "Bearer ${env:BOE_API_KEY}"
      }
    }
  }
}

The seven tools

An agent reads each tool's description and input schema from the server, so it needs no extra setup. This table names what each tool does.

BOE MCP tools
ToolWhat it does
execute_rulesetRuns one ruleset on a set of facts and returns the decision. Takes rulesetShortCode and facts. Each call writes one decision log entry.
submit_batchQueues up to 100 executions of one ruleset and returns a batchCode at once. The items run in the background.
get_batch_statusReads a batch's progress. Set includeBatchItems to true to page through each item's result. Batch item results come back from this tool.
list_executionsLists decision log entries from single execute_ruleset calls, newest first. Filters cover the ruleset, the engine mode, a date window of up to 90 days and free text.
get_executionReads one decision log entry by executionId. The answer carries lineageAvailable.
register_rulesetRegisters a ruleset definition as a new version and makes it live in Dev. The answer carries the shortCode that execute_ruleset takes. Sending the same definition again is safe.
list_rulesetsLists the rulesets the key may read, with each ruleset's shortCode, engine mode, active version and state.

An example call

The agent calls execute_ruleset with a short code and facts. Facts are grouped by type, as in the SDK quickstart. Setting includeLineage to true returns the lineage record in the same answer. The ruleset name and facts here are made up.

execute_ruleset arguments
{
  "rulesetShortCode": "loan-gate",
  "facts": {
    "Applicant": [{ "income": 82000, "missedPayments": 0 }]
  },
  "includeLineage": true
}

The shape of result depends on the engine mode. A call that omits includeLineage returns a smaller answer with no lineage member. The agent keeps the executionId to read the decision later with get_execution.

Refused calls

A refusal comes back as a tool error. Its first line reads BOE answered, then the status, the reason and BOE's sentence. The agent reads the line and corrects the call.

Common refusals from execute_ruleset
StatusMeaning
400The facts failed validation. The answer lists validationErrors.
401 or 403BOE refused the API key for this ruleset.
404The ruleset has no version live in the key's environment.
410A person archived the ruleset.
429The account subscription refuses execution.