Rule Cascade
AI agents and MCP

AI coding tools

Connect Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf and other AI coding tools to Rule Cascade, with agent instructions and the rcas MCP server.

AI coding agents are good at reading code and drafting rules, and bad at being trusted with them. Rule Cascade gives them two things: instructions (how to find decisions in code and write a ruleset that passes review) and tools over the Model Context Protocol (check, compile, evaluate, derive, analyze, and propose). The agent proposes; a person accepts with rcas proposals accept. The rulesets never change behind your back.

Choose how

OptionWhat you getCommand
Agent instructionsAGENTS.md and each tool's own file with the code-to-rules workflow and the engineering rules; Claude Code sub-agents and a skillrcas agent install
Local MCP serverThe tools, run by your AI tool on your machine, in your projectrcas mcp install <tool>
Both (recommended)Instructions that name the tools, and the toolsrcas init --agent all --mcp <tool>

Commit what they write (except .rcas/): everyone who clones the project gets the same setup, and the MCP entry starts the server with npx -y @rules-cascade/cli mcp, so nobody needs anything installed but Node.js.

Agent instructions

rcas agent install                     # every tool
rcas agent install --for claude,codex  # some
ToolFiles
every toolAGENTS.md: a managed block (between rcas:begin and rcas:end); the rest of the file is yours and kept
Claude CodeCLAUDE.md (imports AGENTS.md), sub-agents .claude/agents/rcas-analyst.md, rcas-author.md, rcas-reviewer.md, rcas-tester.md, skill .claude/skills/rules-cascade/SKILL.md
OpenAI Codexreads AGENTS.md; skill .agents/skills/rules-cascade/SKILL.md
Cursor.cursor/rules/rules-cascade.mdc (applied to *.ruleset.* and rcas.yaml); also reads AGENTS.md
GitHub Copilot.github/copilot-instructions.md (managed block)
Gemini CLIGEMINI.md (managed block)
Others (Windsurf, Zed, JetBrains Junie, Amp, Kiro, Cline, Roo, Goose, Warp, Factory, OpenCode)read AGENTS.md

The sub-agents split the work: rcas-analyst inventories the code and lists candidate rules with file:line, rcas-author writes rulesets with golden tests and proposes them, rcas-reviewer reviews a change against the authoring guidelines, and rcas-tester writes golden and parity tests. Running agent install again updates the managed blocks and leaves the other files alone (--force replaces them).

The MCP server, tool by tool

rcas mcp install claude      # one tool
rcas mcp install all         # every tool below
rcas mcp install all --print # show the configuration, change nothing

install merges one entry, named rules-cascade, into the tool's configuration and keeps every other server and setting. Where a tool has its own command (claude mcp add, codex mcp add) it uses that; --file writes the file instead. An entry that exists and differs is kept unless you pass --force.

rcas mcp install claude          # runs: claude mcp add -s project rules-cascade -- npx -y @rules-cascade/cli mcp

Writes .mcp.json in the project (commit it). --scope user registers it for every project.

.mcp.json
{
  "mcpServers": {
    "rules-cascade": { "command": "npx", "args": ["-y", "@rules-cascade/cli", "mcp"] }
  }
}

In Claude Code, /mcp lists the server and its tools; tools are named mcp__rules-cascade__check and so on.

Every other client

They all start the same command. Use this entry in the client's own format:

ClientWhereEntry
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json, %APPDATA%\Claude\claude_desktop_config.jsonmcpServers as for Claude Code, with "args": ["-y", "@rules-cascade/cli", "mcp", "--root", "/path/to/project"] (it has no project directory)
Zedsettings.json"context_servers": { "rules-cascade": { "command": "npx", "args": ["-y", "@rules-cascade/cli", "mcp"] } }
JetBrains (AI Assistant, Junie)Settings, Tools, AI Assistant, MCP, or .junie/mcp/mcp.jsonmcpServers, as for Cursor
Cline, Roo Codethe extension's MCP settings; Roo also .roo/mcp.jsonmcpServers, as for Cursor
Kiro.kiro/settings/mcp.jsonmcpServers, as for Cursor
Ampamp mcp add rules-cascade -- npx -y @rules-cascade/cli mcp
OpenCodeopencode.json"mcp": { "rules-cascade": { "type": "local", "command": ["npx", "-y", "@rules-cascade/cli", "mcp"] } }
Goosegoose configure, Add extension, Command-linenpx -y @rules-cascade/cli mcp
Continue.continue/mcpServers/rules-cascade.yamlcommand: npx, args: [-y, "@rules-cascade/cli", mcp]
Warp, Factory.warp/.mcp.json, .factory/mcp.jsonmcpServers, as for Cursor
LM Studio~/.lmstudio/mcp.jsonmcpServers, as for Cursor

On Windows, a client that cannot start npx directly needs "command": "cmd", "args": ["/c", "npx", "-y", "@rules-cascade/cli", "mcp"]; rcas mcp install writes that form there. With rcas installed, --command binary uses its absolute path instead of npx.

Check it works

rcas mcp --list-tools     # the tools the server offers
rcas doctor               # the project, the agent files and every MCP configuration it finds

Then ask the agent: "List the rules-cascade MCP tools and run check."

SymptomCauseFix
The tool says the server failed to start, or "connection closed"npx is not on the tool's PATH (GUI apps often have a short one)--command binary after installing rcas, or give the full path of npx
"no rulesets found"The server started outside the projectThe tool's working directory must be the project, or add --root /path/to/project to the args
propose_ruleset is missingmcp.readOnly: true in rcas.yaml, or --read-onlyIntended: that project accepts no proposals
mcp install says "kept"An entry with that name exists and differsCompare with --print, then --force
mcp install refuses a file with commentsThe file is JSON with comments (VS Code allows them)Add the entry by hand from --print
Windows: npx is not recognisedStarted without a shellUse the cmd /c npx form above

What the agent may do

Tool groupEffect
list_rules, explain_rule, evaluate_rules, check, test, compile, manifest, derive, analyze, get_*Read only. evaluate_rules is a dry run on the source rulesets; compile returns the bundle, it writes nothing
propose_rulesetWrites under .rcas/proposals/<id>/ and nowhere else; paths outside the project are refused
accepting a proposalNot a tool. Only rcas proposals accept <id>, run by a person

The actor of an evaluation never comes from the model in production: evaluate_rules accepts test roles for a dry run only. In an application, the actor comes from your authentication (see AI agent tools for agents that act for users at run time).

On this page