Rule Cascade
AI agents and MCP

MCP server

The Rule Cascade Model Context Protocol server, on your machine or hosted at mcp.rulescascade.com - transports, tools, prompts, resources and safety model.

Rule Cascade serves the Model Context Protocol (MCP), so any AI agent can read the specification, check and evaluate rulesets, derive rules from API schemas and, on your machine, propose rules for a person to accept. There are two ways to use it.

Local: rcas mcpHosted: https://mcp.rulescascade.com/mcp
Installationnpx -y @rules-cascade/cli mcp (Node), or the rcas binaryNone
SeesYour project: its rulesets, schemas and codeOnly the files the agent sends with each call
Can propose rulesetsYes, propose_ruleset (a person accepts)No
Finds rules in code (analyze)YesNo
TransportsStandard input and output, or HTTPHTTP
StoresProposals under .rcas/proposals/Nothing

Use the local server in a project. Use the hosted one to ask about the language, to try a ruleset without installing anything, or from a client that only takes a URL (Claude.ai and ChatGPT connectors).

Connect an agent

rcas mcp install writes the entry each tool expects; AI coding tools lists them all.

# the local server, started by the tool (the default)
npx -y @rules-cascade/cli mcp install claude cursor vscode

# the hosted server
npx -y @rules-cascade/cli mcp install claude cursor vscode --url https://mcp.rulescascade.com/mcp

By hand, the hosted server is:

ToolEntry
Claude Codeclaude mcp add --transport http rules-cascade https://mcp.rulescascade.com/mcp
Codexcodex mcp add rules-cascade --url https://mcp.rulescascade.com/mcp
Gemini CLIgemini mcp add --transport http rules-cascade https://mcp.rulescascade.com/mcp
Cursor, Kiro, Junie, Amp, Zed, Warp{ "url": "https://mcp.rulescascade.com/mcp" }
VS Code, Copilot CLI, Factory, Augment, Amazon Q{ "type": "http", "url": "https://mcp.rulescascade.com/mcp" }
Cline{ "type": "streamableHttp", "url": "https://mcp.rulescascade.com/mcp" }
OpenCode, Kilo{ "type": "remote", "url": "https://mcp.rulescascade.com/mcp", "enabled": true }
Devin, Windsurf{ "serverUrl": "https://mcp.rulescascade.com/mcp" }
Claude.ai, Claude DesktopSettings, Connectors, Add custom connector: the URL, no sign-in (the configuration file of Claude Desktop takes only local servers)
ChatGPTAdd a custom MCP server with the URL

Transports and protocol revisions

TransportHowFor
Standard input and outputrcas mcpTools that start the server (the default of mcp install)
Streamable HTTPPOST /mcpEvery current client; the hosted server
HTTP+SSE (deprecated)GET /sse, then POST /messagesClients from before March 2025

The HTTP server also answers GET /health with ok (and /healthz, for probes), and GET / with a short text that says what it is.

Every transport speaks every revision from 2024-11-05 to 2026-07-28. A client on the current revision (2026-07-28) sends its protocol version and capabilities with each request and can call server/discover; an older client opens with initialize. Either way the server remembers nothing between requests, so one process serves any number of clients and needs no sticky sessions.

On Streamable HTTP, every request is answered with one JSON object, except subscriptions/listen, which is answered with an event stream that stays open. The server checks the MCP-Protocol-Version, Mcp-Method and Mcp-Name headers of a current request against its body (400, code -32020, when they differ), answers an unknown revision with the ones it supports (400, code -32022), and answers GET and DELETE on /mcp with 405: there is no standalone stream and no session to end.

Run the HTTP server on your machine

For a client that only takes a URL, or to share one server between several tools:

rcas mcp --http 127.0.0.1:8765          # your project, this machine only
rcas mcp --hosted --http 127.0.0.1:8765 # no project, like mcp.rulescascade.com
rcas mcp [--root <dir>] [--read-only] [--hosted] [--list-tools]
         [--http <addr> [--allow-origin <origins>] [--no-sse]]
FlagMeaning
--root <dir>The project. Default: the directory the tool starts it in; rcas.yaml is looked up from there
--read-onlyLeave out propose_ruleset. Also mcp.readOnly: true in rcas.yaml
--hostedServe no project: tools take the files as an argument, keep nothing, and analyze and the proposal tools are left out
--list-toolsPrint the tools and exit
--http <addr>Serve HTTP. host:port; without a port, $PORT, else 8765; the host defaults to 127.0.0.1
--allow-origin <origins>Browser origins that may call it, comma separated, or *
--no-sseLeave out the deprecated HTTP+SSE transport

Logs go to standard error; on standard input and output, standard output carries protocol messages only. The environment variables RCAS_MCP_TOKEN, RCAS_MCP_MAX_BODY_BYTES, RCAS_MCP_MAX_SSE_SESSIONS and RCAS_MCP_MAX_FILES set the token and the limits.

The hosted server keeps at most one instance, starts on the first request and stops when idle; a cold start takes under a second.

To run your own, start the command the hosted server runs, on any machine or container that has rcas:

rcas mcp --hosted --http 0.0.0.0:8080

Tools

ToolArguments (required in bold)Returns
list_rulesruleset, entity, operationThe rules that apply to an operation on an entity: id, title, kind, severity, field, enforcement, who may accept the risk
explain_ruleruleset, rule_idOne rule in full, as in the server manifest
evaluate_rulesruleset, entity, operation, data_json, original_json, channel, actor_roles, resolutions_jsonThe result of a dry run: decision, findings, effects, commands
checkpaths, contentLint, load and golden tests of rulesets, or of a draft passed as content (checked where it would live, written nowhere)
testpaths, contentThe same as check
compilepath, include_bundleId, version, checksum and channels of the compiled bundle (and the bundle on request)
manifestpath, channelThe client or server manifest
derivesource, id, schema, pointer, entity, scopeThe baseline ruleset YAML from an OpenAPI component schema or a JSON Schema, and what could not be derived
analyzepath, paths, module, feature, include, exclude, changed, baseline, min_confidence, max_filesThe inventory of schemas and decisions in code, with file:line, module and confidence; the names decided in several languages, with drift; and the rulesets that already name a hit (local only)
propose_rulesetid, title, files (path, content), rationale, source_refsThe stored proposal and its status: pending, or invalid with the problems check found (local only)
list_proposalsstatusProposals and their status (local only)
get_proposalidOne proposal with the content of its files (local only)
get_spec_sectionsectionA section of the specification by number (4.4) or words; without one, the list of sections
get_operator_referenceoperatorThe operator table, or the lines about one operator
get_authoring_guidetopic (authoring, naming, enforcement, openapi, cookbook), sectionA guide, or one section of it

On the hosted server, the first eight tools also take files: the rulesets (with their parents) and the schemas and API documents they refer to, each {path, content}, with paths relative to a project root such as rules/payments-transfer.ruleset.yaml. They are written to a temporary directory for the call and removed after it; a path that leaves it is refused. check without paths checks every ruleset sent.

Every tool except propose_ruleset is marked read-only and idempotent (readOnlyHint, idempotentHint). A tool that fails returns its error as text with isError, so the model can read it and correct its call.

Prompts

A person picks a prompt in the client, often as a slash command.

PromptArgumentsWhat the agent does
derive-rulessource (local), schemaderive, then completes the ruleset with the OpenAPI guide and check
capture-rulespath, module, featureanalyze, compare the values of each candidate and flag drift, one ruleset per module and one per feature that extends it, with golden tests, check, then propose_ruleset (local only)
review-rulesetrulesetLists every MUST and SHOULD of the authoring guide a ruleset breaks, with a fix; changes nothing
explain-decisionruleset, entity, operation, data_jsonevaluate_rules and explain_rule, explained in plain words

Resources

URIContent
rcas://docs/{topic}The specification and the guides, as Markdown (specification, authoring, naming, enforcement, openapi, cookbook)
rcas://spec/{section}One section of the specification, e.g. rcas://spec/4.3 for the operators
rcas://rulesets/{id}The source of each ruleset of the project (local only)

The documents are embedded in the command, so they match its version and need no network. The arguments of the templates and prompts can be completed (completion/complete).

Safety model

  • Proposals only. The one tool that writes, propose_ruleset, writes under the proposals directory (.rcas/proposals/ by default). A proposal may contain only *.ruleset.yaml, *.ruleset.yml, *.ruleset.json and *.schema.json files under the rules directory, none of them hidden: never configuration, version control, CI or tool files. A path that leaves the project, by .., an absolute path or a symbolic link, is refused. accept checks the same again.
  • What was reviewed is what is accepted. An agent cannot replace a proposal that exists; it must propose under a new id.
  • Reads stay in the project. Schemas and API documents a draft refers to are read only from inside the project (on the hosted server, from inside the files of the call).
  • A person accepts. rcas proposals accept <id> writes the files, and refuses when a target file changed after the proposal was made, or when the proposal does not pass check (--force overrides both, deliberately).
  • Evaluation is a dry run on the source rulesets. The actor of a dry run is a test value; in production the actor always comes from authentication, never from a model.
  • No shell, no outgoing connections. The server reads the project and writes proposals; it starts no processes and opens no connections. Over HTTP it accepts connections: by default only from this machine (127.0.0.1), with Origin checked against DNS rebinding, a request size limit, and, with RCAS_MCP_TOKEN, a bearer token. Serve a project beyond your machine only with a token and TLS in front.

Try it by hand

# current revision: no handshake, the version travels with each request
printf '%s\n' \
  '{"jsonrpc":"2.0","id":1,"method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientCapabilities":{}}}}' \
  | rcas mcp

# an older client
printf '%s\n' \
  '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18"}}' \
  '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"check","arguments":{}}}' \
  | rcas mcp

# over HTTP
curl -s https://mcp.rulescascade.com/mcp -H 'Content-Type: application/json' \
  -H 'MCP-Protocol-Version: 2026-07-28' -H 'Mcp-Method: tools/call' -H 'Mcp-Name: get_spec_section' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_spec_section","arguments":{"section":"4.3"},"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28","io.modelcontextprotocol/clientCapabilities":{}}}}'

On this page