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
| Option | What you get | Command |
|---|---|---|
| Agent instructions | AGENTS.md and each tool's own file with the code-to-rules workflow and the engineering rules; Claude Code sub-agents and a skill | rcas agent install |
| Local MCP server | The tools, run by your AI tool on your machine, in your project | rcas mcp install <tool> |
| Both (recommended) | Instructions that name the tools, and the tools | rcas 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| Tool | Files |
|---|---|
| every tool | AGENTS.md: a managed block (between rcas:begin and rcas:end); the rest of the file is yours and kept |
| Claude Code | CLAUDE.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 Codex | reads 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 CLI | GEMINI.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 nothinginstall 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 mcpWrites .mcp.json in the project (commit it). --scope user registers it for every project.
{
"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:
| Client | Where | Entry |
|---|---|---|
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json, %APPDATA%\Claude\claude_desktop_config.json | mcpServers as for Claude Code, with "args": ["-y", "@rules-cascade/cli", "mcp", "--root", "/path/to/project"] (it has no project directory) |
| Zed | settings.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.json | mcpServers, as for Cursor |
| Cline, Roo Code | the extension's MCP settings; Roo also .roo/mcp.json | mcpServers, as for Cursor |
| Kiro | .kiro/settings/mcp.json | mcpServers, as for Cursor |
| Amp | amp mcp add rules-cascade -- npx -y @rules-cascade/cli mcp | |
| OpenCode | opencode.json | "mcp": { "rules-cascade": { "type": "local", "command": ["npx", "-y", "@rules-cascade/cli", "mcp"] } } |
| Goose | goose configure, Add extension, Command-line | npx -y @rules-cascade/cli mcp |
| Continue | .continue/mcpServers/rules-cascade.yaml | command: npx, args: [-y, "@rules-cascade/cli", mcp] |
| Warp, Factory | .warp/.mcp.json, .factory/mcp.json | mcpServers, as for Cursor |
| LM Studio | ~/.lmstudio/mcp.json | mcpServers, 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 findsThen ask the agent: "List the rules-cascade MCP tools and run check."
| Symptom | Cause | Fix |
|---|---|---|
| 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 project | The tool's working directory must be the project, or add --root /path/to/project to the args |
propose_ruleset is missing | mcp.readOnly: true in rcas.yaml, or --read-only | Intended: that project accepts no proposals |
mcp install says "kept" | An entry with that name exists and differs | Compare with --print, then --force |
mcp install refuses a file with comments | The file is JSON with comments (VS Code allows them) | Add the entry by hand from --print |
Windows: npx is not recognised | Started without a shell | Use the cmd /c npx form above |
What the agent may do
| Tool group | Effect |
|---|---|
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_ruleset | Writes under .rcas/proposals/<id>/ and nowhere else; paths outside the project are refused |
| accepting a proposal | Not 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).