CedarDraft MCP proved 12 of 12 Cedar rule patterns and rejected 8 of 8 broken drafts
An MCP server that turns plain English or Spanish access rules into Cedar, proves each draft with the official Cedar 4.14.0 tools, then gates agent tool calls. Keyless run, 85 of 85 decisions agreed.
By David Discua
Measured in the lab
- 12/12
- patterns drafted and proven
- 85/85
- gate_call decisions agreeing
- 8/8
- broken drafts rejected
- 13.6 ms
- gate_call median
- Off-by-one limit (< 50000 instead of <= 50000) rejected at the table stage
- Permit-everything draft rejected
- cedar run-tests passed 85 of 85 table cases
- Crate matched the CLI on all 85 cases
- Example rule set accepted through all 8 proof stages
From reports/cedardraft.json · run on October 21, 2026. cedar-policy-cli 4.14.0, engine on cedar-policy 4.14.0; template drafter only, keyless
How it is wired
01/03You write access rules for agent tools in English or Spanish.
Cedar is an open policy language with an official Rust crate and CLI, and version 4.14.0 added an external keyword so many schema fragments can share one base. CedarDraft is an MCP server that turns plain access rules for agent tool calls, in English or Spanish, into Cedar policies, refuses any draft it cannot prove, and then answers ALLOW or DENY for each proposed call with the ids of the policies that decided it. In our keyless run all 12 documented patterns proved, all 8 deliberately broken drafts were rejected, and gate_call agreed with the expected decision on 85 of 85 calls. The catch is that the proof checks the policy against the rule as parsed, so a wrong rule still proves.
The catch
If you write "at most 500000" when you meant 50000, CedarDraft drafts exactly that and the proof passes. Review the source sentence next to each rule in draft.json. The template drafter also only understands six sentence patterns, with one condition and one server per sentence. Anything else is an error that names the sentence, so you rephrase. Optional Gemini drafting exists for other phrasings, and the live path was not run in this lab. It is covered only by unit tests with mocked responses.
The authorization table is generated from the rule intent and the tool catalog, never from the policy text. It probes boundary values and every tool against every role plus an outsider, which makes it a strong test and still short of a symbolic proof. JSON number arguments that are not integers have no Cedar type, so they are left out of the context and no rule can reference them.
What we ran (keyless)
bun install --frozen-lockfile
bun run setup
bun run cedardraft -- draft --file examples/rules.en-es.txt --out .cedardraft/example
bun run cedardraft -- prove .cedardraft/example
bun run cedardraft -- gate .cedardraft/example --agent a1 --role soporte \
--server billing --tool refund --args '{"invoice_id":"i1","amount":50001,"currency":"USD"}'
bun run report
That last gate call is a refund of 50001 against a cap of 50000, and it comes back DENY with exit code 2. From reports/cedardraft.json, run on October 21, 2026 with cedar-policy-cli 4.14.0:
| Measure | Result |
|---|---|
| Patterns drafted keyless and proven | 12/12 (6 patterns, EN and ES) |
| Example rule set, 6 mixed EN/ES rules | accepted |
| Its generated table | 85 cases: 19 allow, 66 deny (10 forbid, 56 default deny) |
cedar run-tests / crate agreement | 85/85 passed, 85/85 matched |
| Broken drafts rejected | 8/8 |
gate_call vs expected decision and policies | 85/85 |
gate_call latency, one engine process per call | median 13.6 ms, p95 19.1 ms |
The broken drafts covered a widened limit, an off-by-one (< instead of <=), a string where a number belongs, an unknown argument, a missing @id, an extra policy nobody asked for, a permit-everything policy, and a fragment that defines Agent instead of declaring it external. Each failed at a named stage.
How it is wired
The server exposes three tools. draft_policy writes one Cedar policy per rule plus a schema fragment built from the tool catalog. prove_policy runs eight stages: tool versions, intent, schema link, crate validation, strict cedar validate, policy ids, cedar run-tests on the generated table, and the same table through the crate. gate_call only answers against a bundle whose proof is accepted and whose files still hash to that proof. A call to tool refund on server billing becomes the Cedar action billing___refund, with the tool arguments typed into context.input.
Minilab (open source)
Upstream is cedar-policy/cedar (1,811 stars, Apache-2.0, Rust, as of October 24, 2026). Write your own rules in examples/rules.en-es.txt, re-run bun run report, and check that wrong_drafts in reports/cedardraft.json still shows every mutation rejected.
Run it yourself
SkilledDragonCorp/cedardraft-mcp
Clone, install and run the report with no API keys. The numbers above are what that run writes.
bun install --frozen-lockfile && bun run setup && bun run reportSkilledDragon is not affiliated with the Cedar project, Amazon Web Services, Google, Anthropic or the Model Context Protocol project. Numbers are from our own keyless lab run; re-run the report before relying on them. Marks belong to their owners.
All labs