Rulebricks MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Rulebricks MCP or direct API to build rules, test decision flows, execute published decisions, and inspect outcomes through natural language.

Rulebricks logoRulebricks
Api Key

Rulebricks is a decision automation platform for building, testing, publishing, and running business rules. It helps teams turn complex decisions into consistent, trackable workflows.

59 Tools

Try Rulebricks now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Rulebricks
Try asking
TOOLS

Supported Tools

Every Rulebricks action and event your agent gets out of the box.

Bulk Submit Context Data

Merge a non-empty batch into a Rulebricks context and execute ready bound rules or flows.

Cascade Context Instance

Re-evaluate registered pending rule and flow work for a Rulebricks context instance after dependencies may have become available.

Count Decision Logs

Count decision logs matching asset, status, trace, payload-content, or time-range filters without returning log payloads.

Create Asset Test

Create a saved test case for a Rulebricks rule or flow with an input, expected response, comparison policy, and criticality.

Create Context

Create a Rulebricks context with stored and derived fields, an identity fact, retention settings, and access controls.

Create Context Relationship

Create a has-many, has-one, or belongs-to relationship from one Rulebricks context to another.

Create Folder

Create a folder for rule, flow, or context assets; the asset type defaults to rule.

Create User

Create a new user directly with a password, bypassing the email invitation flow.

Create User Group

Create a new user group in your Rulebricks organization.

Delete Asset Test

Permanently delete one saved test case from a Rulebricks rule or flow.

Delete Context

Delete a Rulebricks context and all of its live instances, returning affected bindings and pending evaluations.

Delete Context Instance

Permanently delete one Rulebricks context instance and its history, cancel its pending evaluations, and re-evaluate dependent context instances.

Delete Context Relationship

Delete a specific relationship owned by a Rulebricks context.

Delete Flow

Permanently delete one Rulebricks flow by ID.

Delete Folder

Delete one folder by ID without deleting the assets it contains.

Delete Object

Delete a workspace object by ID or exact name and archive, delete, or detach its generated values.

Delete Rule

Permanently delete one Rulebricks rule by ID.

Delete Value

Delete one vocabulary value by ID and replace references from other values with its content; rule or flow references and object-managed namespaces can block deletion.

Execute Assets in Parallel

Execute multiple published Rulebricks rules or flows in parallel from one named map.

Execute Bulk Rule

Execute one published Rulebricks rule against up to 1000 ordered input objects and return one aligned result per input.

Execute Flow

Execute a published Rulebricks flow once or in bulk and return the ordered flow-defined output and execution ID for querying its decision logs.

Execute Rule

Execute a published Rulebricks rule with its input payload and return the rule-defined decision output.

Export Flow

Export one flow as a Rulebricks Flow Schema document that can be round-tripped through the flow import endpoint.

Export Asset Manifest

Export selected Rulebricks rules, flows, contexts, or values with their resolved dependencies, or preview the export.

Export Rule

Export one rule by ID as a raw rule document that can be round-tripped through the Rulebricks rule import endpoint.

Get Context

Retrieve a Rulebricks context by ID, including its schema, bindings, access controls, and relationships.

Get Context Instance

Retrieve the current base facts, derived facts, status, and selected execution or relationship data for one Rulebricks context instance.

Get Context Instance History

Retrieve newest-first historical values for all fields or one selected field on a Rulebricks context instance.

Get Object

Fetch one workspace object (JSON Schema) by its ID or exact name.

Get Usage

Return the organization's current plan and monthly Rulebricks execution usage, limit, and remaining allowance.

Import Flow

Create or update a flow from a Rulebricks Flow Schema document; imported flows publish by default unless publish (provider field _publish) is false.

Import Asset Manifest

Atomically create or update rules, flows, contexts, and values from a Rulebricks manifest.

Import Rule

Create a rule from a complete raw rule document, or partially update an existing rule when the document includes its ID.

Invite User

Invite a new user to the organization or update role or user group data for an existing user.

List Asset Tests

List saved test cases for a Rulebricks rule or flow, including expected responses and latest execution state.

List Context Relationships

List incoming and outgoing relationships configured for a Rulebricks context.

List Contexts

List contexts visible to the connected API key, optionally filtered or paginated by the provider's opaque cursor.

List Flows

List flows visible to the connected API key, optionally selecting an exact asset version or filtering by identifier, search, folder, labels, group, or name.

List Folders

List asset folders visible to the connected API key, optionally filtered by user group or name.

List Objects

List workspace objects (JSON Schemas) visible to the connected API key's user groups.

List Pending Context Evaluations

List rule and flow evaluations registered as pending for one Rulebricks context instance, including their missing dependencies.

List Rules

List rules visible to the connected API key, optionally selecting an exact asset version or filtering by identifier, search, folder, labels, group, or name.

List User Groups

List all user groups available in your Rulebricks organization.

List Users

List all users (including the admin and all team members) in the organization with their email, name, role, user groups, and join date.

List Values

Return one page of vocabulary values visible to the connected API key, with optional name, prefix, type, group, and usage filters.

Preview Asset Manifest Import

Return the server-authoritative plan for importing Rulebricks rules, flows, contexts, and values without writing any assets.

Preview Value Collection Sync

Preview the created, updated, unchanged, archived, and deleted values for one complete single-request collection synchronization without writing changes.

Preview Object Upsert

Validate and preview creating or updating a workspace object and synchronizing its JSON Schema enum values without writing any changes.

Query Decision Logs

Return one page of decision logs filtered by assets, status, trace, payload content, or time range.

Replace Value Metadata

Replace or clear all custom metadata for one vocabulary value by ID without resending its value payload.

Run Asset Tests

Run all saved tests, or only critical tests, against the latest draft of a Rulebricks rule or flow and return pass totals and failure diagnostics.

Solve Context Asset

Persist optional facts and execute one rule or flow bound to a Rulebricks context instance, or register it pending when dependencies are missing.

Submit Context Data

Merge facts into one Rulebricks context instance.

Sync Value Collection

Synchronize one vocabulary collection to a desired set.

Update Context

Update a Rulebricks context's name, schema, identity, retention, execution behavior, folder, or access groups.

Update Folder

Update an existing folder's required name and optional description by ID without changing its asset type.

Upload Manifest Part

Upload one plain UTF-8 or gzip-compressed part of a Rulebricks manifest larger than 4 MiB.

Upsert Object

Create a workspace object by name or update one by ID or name, then synchronize values generated from its JSON Schema enums.

Create or Update Values

Create new vocabulary values or update existing values by name, including nested values and per-value metadata.

SETUP GUIDE

Connect Rulebricks MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["rulebricks"],
  mcp: true,
});
Create a session scoped to Rulebricks and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Execute the published customer eligibility decision flow for a customer with an annual income of $85000, a credit score of 740, and an existing account history of 3 years.",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a Rulebricks request
SETUP GUIDE

Connect Rulebricks API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["rulebricks"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to Rulebricks
3

Run Rulebricks tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Execute the published customer eligibility decision flow for a customer with an annual income of $85000, a credit score of 740, and an existing account history of 3 years." }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the Rulebricks tool calls through the session, and print the final answer

Why Use Composio?

AI Native Rulebricks Integration

  • Supports both Rulebricks MCP and direct API integrations
  • Structured, LLM-friendly schemas for executing rules and decision flows reliably
  • Access practical tools for testing, publishing, and inspecting Rulebricks decisions

Managed Auth

  • Securely stores and uses your Rulebricks API key without hard-coding it in agent prompts
  • Central place to manage and revoke Rulebricks access
  • Separate credentials by user, workspace, or environment

Agent Optimized Design

  • Tools use clear inputs and outputs that help agents work with business rules and decision flows
  • Execution logs make it easier to see what ran, when it ran, and which inputs produced each result

Enterprise Grade Security

  • Control which agents and users can access Rulebricks tools
  • Use scoped access to protect rules, decision flows, and deployments
  • Maintain an audit trail of agent actions for review and compliance

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Start with Rulebricks.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Rulebricks tool your agent needs.Free to start.

Start building