Lean 4 MCP server: compile, prove theorems, and formalize math with Mathlib.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
Inspect callable tools, capabilities, and parameters exposed to AI agents by Prover.
lean4_buildCompile Lean 4 source code in a Mathlib-enabled sandbox. Code is sent to external cloud services for compilation; if proving, also for AI processing.
lean4_prove_theoremsAutomatically prove Lean 4 theorems that contain `sorry`. Code is sent to external cloud services for compilation and AI proving.
lean4_get_job_statusPoll for the status and result of any ax-prover job.
Lean 4 MCP server: compile and prove theorems with Mathlib.
Add to your MCP client (e.g. Claude Desktop claude_desktop_config.json):
Authentication uses OAuth 2.1 via GitHub β your MCP client handles the flow automatically.
job_id)| Tool | Description |
|---|---|
lean4_build | Compile Lean 4 source code in a Mathlib-enabled sandbox. Code is sent to external cloud services for compilation; if proving, also for AI processing. |
lean4_prove_theorems | Automatically prove Lean 4 theorems that contain sorry. Code is sent to external cloud services for compilation and AI proving. |
| Tool | Description |
|---|---|
lean4_get_job_status | Poll for the status and result of any ax-prover job. |
All submit tools are asynchronous β they return a job_id immediately.
Poll with lean4_get_job_status(job_id) until status is completed or failed.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/prover)<a href="https://allmcps.com/mcp/prover"><img src="https://allmcps.com/api/badge/prover?style=directory" alt="Prover on AllMCPs" /></a>