
LeanWarp
io.github.Isagoge-LabsPublished by GitHub account Isagoge-Labsv0.2.5Updated Nov 6, 2026
Check and verify Lean 4 proofs on hosted, warm Lean and Mathlib workers.
Overview
LeanWarp checks and verifies Lean 4 proofs on hosted, warm Lean and Mathlib workers, so an assistant can compile, inspect and repair proofs without a local…
- What you can do
- Check Lean files and report errors and warnings, including draft checks that reuse work on unchanged parts, and batch checks of up to 64 files
- Inspect goals and local context at a position in a proof, and try several tactics against a captured goal without editing the file
- Verify that a declaration proves exactly a given statement, including batches of up to 64 inline proofs
- Find every sorry and ?_ hole in a file, and suggest a tactic that closes a hole
- Move a sorry'd proof into a new named lemma, and list the declarations a file adds with their types and dependencies
- When to use it
- Useful when an assistant works on Lean 4 formal proofs and needs real kernel checking against Mathlib or other pinned libraries, without setting up Lean locally. Suits iterative proof editing where a warm worker keeps results consistent with the project's pinned toolchain.
- Requirements
- Runs as a local stdio process, installed from PyPI with uv (uv tool install leanwarp) or run via uvx; Linux, macOS or WSL. Needs a LeanWarp API key supplied through the LEANWARP_API_KEY environment variable, obtained by signing in with the CLI. A project directory path is passed to the server; network access to the hosted service is required. Prepaid credit is needed for worker time.
Installation
In SourceWeft
- Open LeanWarp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
[LeanWarp by Isagoge Labs]
LeanWarp is hosted Lean 4 for formal verification. It checks and verifies proofs
on workers that stay warm between edits, against a Lean release and the libraries
your project pins. This SDK is how you and your agents use it: the leanwarp
command, an MCP server and a Python library.
Get started · Agent setup · Reference · HTTP API · Documentation · Website
What it does
The reference
lists every command and option; leanwarp skill --reference prints it.
Coming soon
These are planned and not available yet:
- Proof simplification: replace a proof with a shorter one that still checks.
haveextraction: lift namedhaveblocks into top-level lemmas.- Batch repair: fill several holes in one operation.
Install in two steps
1. Install. In a terminal, with uv:
This installs the leanwarp command and its MCP server from
PyPI. leanwarp setup adds the LeanWarp
skill and MCP server to Claude Code, Codex and Cursor where they are installed,
and the skill to ~/.agents/skills. It runs on Linux, macOS and WSL. You don't
need Lean installed: LeanWarp runs Lean and Mathlib for you.
Or paste this into your agent:
Install LeanWarp: run
uv tool install leanwarp && leanwarp setup, then ask me to sign in.
Already have LeanWarp 0.2 from GitHub? Its leanwarp-sdk tool owns the
leanwarp command, so replace it instead:
2. Sign in, in your own terminal:
It opens the dashboard to create an API key; paste the key at the hidden prompt. Never paste it into an agent conversation. Then restart your agent.
When a new release is out, results include update_available; run
leanwarp update to upgrade and refresh the installed skills.
Quick start
From your Lean project or one of the examples:
If a command returns success: null (exit 3), run leanwarp wait until it
finishes before submitting another operation. Then verify:
Wait for that operation to finish too, then run leanwarp stop when you are done.
Every command prints one JSON object. Results start with success: true when
the check passed or the proof was verified, false when it did not, and null
while the work is still running, in which case run leanwarp wait. The exit code
says the same thing: 0 passed, 1 did not pass, 2 the command failed, 3
still running.
Use with an agent
Give your agent the project directory and this instruction:
Run
leanwarp skilland follow it. Use LeanWarp to check this Lean project and verify proofs against their intended statements. Reuse the workspace while you edit, and runleanwarp stopwhen you are done.
For MCP clients, add the server leanwarp --project /absolute/path/to/project mcp,
or uvx leanwarp --project /absolute/path/to/project mcp
without installing. It uses the same key and project state as the CLI. See agent setup.
Keep API keys out of prompts, source files and tool arguments.
Your project and its environment
LeanWarp uploads only your .lean files. Lean, Mathlib and every other
dependency come from an environment: a Lean release with pinned libraries,
already built on LeanWarp's workers. Run leanwarp environments to list them.
leanwarp files lists what would upload; patterns in .gitignore and
.leanwarpignore leave files out.
leanwarp connect picks the environment for you:
- If your project's
lean-toolchainandlake-manifest.jsonmatch an environment, it uses that one, so results agree with your local build. - If your project has neither file, as with a folder of
.leanfiles, it uses the only served environment, or the newest served stable Lean release when there are several. - If they match no environment, it stops and lists the ones available. Run
leanwarp connect --environment NAMEto check your files there anyway; they then compile against that environment's Lean and Mathlib.
To start a new project, copy one of the examples, which match the environments LeanWarp serves.
Lean versions and libraries
The LeanWarp engine supports every stable Lean 4 release from 4.26.0, with the
Lake libraries a project locks. The hosted service runs it in the environments
listed on the website, which today pair
Lean with Mathlib. Each one is built and tested before it is served, so your first
check starts from compiled libraries. If your project needs another Lean release
or library, open an issue with its lean-toolchain and
lake-manifest.json.
Billing
You pay from prepaid credit, billed by the second while a worker runs. Run
leanwarp resources to see the published worker's starting minute price, whether
charges depend on usage, startup credit hold and idle timeout. LeanWarp selects
the worker. Use leanwarp connect --max-spend 2 to create a workspace with a $2
cap, or edit an existing cap in the dashboard. Reconnecting without a cap keeps
the saved cap.
When the worker uses usage billing, CPU and RAM charges increase independently above their reserved baselines. The starting rate is a paid minimum while the worker runs, including idle time. Bursting depends on available host capacity. Otherwise, the listed minute rate applies for the time the worker runs. Existing workspaces keep their saved billing terms.
A worker starts with your first operation and stays warm between calls. Run
leanwarp stop when finished; closing the SDK client or your terminal does not
stop it. Unused held credit is released once shutdown and final usage are confirmed.
Stopping keeps your uploaded files and
completed results; the next operation reconstructs the worker. Set a spending cap
for each workspace in the dashboard.
Concepts
Documentation
The agent instructions ship with the package: leanwarp skill prints the
workflow and leanwarp skill --reference the full reference. Run
leanwarp --help or leanwarp COMMAND --help for arguments.
Source: README.md at commit 00e43fe
Tools
0Version history
1- v0.2.5LatestNov 6, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts