Assura — Claude Code MCP server: contract checking
This MCP server for Claude Code checks Assura contracts with Z3. An agent can verify a contract, infer a skeleton from Rust code, or explain an error code.
MIT ★ 9 updated 2026-11-16
Open on GitHubWhat Assura does
Assura parses and checks a contract, then returns Verified, Counterexample, or Unknown. For a contract without an implementation, it tests whether the postcondition follows from the preconditions; a counterexample gives input values that violate it.
The server includes tools to infer contract skeletons from Rust, map Rust types to Assura types, and check Implementation IR with Z3 or CVC5. Another tool renders a prompt for producing IR. Running it requires a Rust toolchain, edition 2024, and rustc 1.88 or newer; the z3 crate provides Z3 for a standard build. Start the server with assura mcp; it communicates over stdin and stdout.
What it helps with
- check whether a postcondition follows from preconditions
- find input values that break a contract
- infer a contract skeleton from Rust code
- map a Rust type to its Assura equivalent
- check Implementation IR against a contract
Example prompts for the agent
- Check the Assura contract in this file and explain the result.
- Infer an Assura contract skeleton from this Rust code.
- Map the Rust type
Vec<i64>to an Assura type.
How to install Assura
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Assura
How do I install Assura in Claude Code?
Install Assura with cargo install assura --locked, then start its MCP server with assura mcp. Building requires a Rust toolchain with edition 2024 and rustc 1.88 or newer.
What does Assura do?
The MCP server checks Assura contracts and returns Verified, Counterexample, or Unknown. Its tools can also infer contract skeletons from Rust and check Implementation IR.
What does Assura need to run?
It requires a Rust toolchain with edition 2024 and rustc 1.88 or newer. The z3 crate supplies Z3 for a standard build, so a separate Z3 installation is not needed.