lean-lsp-mcp
Lean Theorem Prover MCP
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive MIT license. It is purpose-built for integrating Lean with LLM agents and IDEs—if you are working with Lean 4 projects and want agentic proof assistance, this is the standard tool. Install it if you use Cursor, Claude Code, or similar platforms with Lean projects.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.10, a Lean project with lakefile.toml or lakefile.lean, and the Lean toolchain (elan/lake) installed.
- Running `lake build` before starting the MCP is recommended to avoid timeouts.
- Low install friction with a pure Python wheel and four runtime dependencies.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2026-07-28 (17 days) · last repo commit 2026-07-30 · 475 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,386,931 downloads/mo, #3,093 on PyPI
Alternatives
Verify before relying
pip install lean-lsp-mcp
# Configure in your IDE (e.g., VSCode mcp.json):
# {
# "servers": {
# "lean-lsp": {
# "type": "stdio",
# "command": "uvx",
# "args": ["lean-lsp-mcp"]
# }
# }
# }
# Or run directly:
uvx lean-lsp-mcp- Whether all external search tools (LeanSearch, Loogle, Lean Finder, Lean Hammer, Lean State Search) are functional without additional setup or API keys.
- Performance characteristics when handling large Lean projects or concurrent agent requests.
- Compatibility with Lean versions beyond the current toolchain.
What it is and what it does
lean-lsp-mcp is an MCP (Model Context Protocol) server that bridges the Lean theorem prover and LLM agents by exposing Lean's language server capabilities as a set of tools. It runs as a stdio-based service that agents can invoke to inspect proof states, retrieve diagnostics, search for theorems and definitions, and interact with Lean projects programmatically.
The package wraps leanclient to communicate with Lean's LSP, and provides tools for goal inspection, term information, hover documentation, and external theorem search via services like Loogle and Lean Hammer. It integrates with IDEs (VSCode, Cursor, Claude Code, Mistral Vibe) and supports optional features like REPL-based code execution and ripgrep-powered local search. Configuration is minimal—the server works out-of-the-box but allows customization via environment variables for logging, tool disabling, and performance tuning.
Use it for
- Enable Claude Code or other agentic IDEs to assist with Lean 4 theorem proving by providing real-time proof state and diagnostic information.
- Automate theorem discovery and proof search by querying external databases like Loogle and Lean Hammer through a unified interface.
- Build custom agents that analyze Lean projects, extract goal states, and suggest relevant theorems or lemmas for proof completion.
- Integrate Lean proof verification into LLM-based code generation workflows where formal correctness is required.
- Provide local search capabilities for Lean definitions and theorems using ripgrep for faster development iteration.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive MIT license. It is purpose-built for integrating Lean with LLM agents and IDEs—if you are working with Lean 4 projects and want agentic proof assistance, this is the standard tool. Install it if you use Cursor, Claude Code, or similar platforms with Lean projects.
Install
lean-lsp-mcp on PyPI
Before you install
Low install friction with a pure Python wheel and four runtime dependencies. Active maintenance with a recent release 17 days ago and 475 repository stars indicate ongoing development.
Requires Python >=3.10, a Lean project with lakefile.toml or lakefile.lean, and the Lean toolchain (elan/lake) installed. Running `lake build` before starting the MCP is recommended to avoid timeouts.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install lean-lsp-mcp
# Configure in your IDE (e.g., VSCode mcp.json):
# {
# "servers": {
# "lean-lsp": {
# "type": "stdio",
# "command": "uvx",
# "args": ["lean-lsp-mcp"]
# }
# }
# }
# Or run directly:
uvx lean-lsp-mcp
Verify before relying
- Whether all external search tools (LeanSearch, Loogle, Lean Finder, Lean Hammer, Lean State Search) are functional without additional setup or API keys.
- Performance characteristics when handling large Lean projects or concurrent agent requests.
- Compatibility with Lean versions beyond the current toolchain.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesleanclientmcporjsoncertifi |
| Maintenance | Actively maintained 17 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,386,931 / month, #3,093 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: lean_lsp_mcp-0.29.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “lean theorem prover integration”
- lean-lsp-mcpProvides an MCP server that exposes the Lean theorem prover to LLM…
- leanclientInteract with a Lean 4 language server running in a subprocess via…
- z3-solverZ3 is a theorem prover and SMT (satisfiability modulo theories)…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also leanclient · mcp-server-qdrant · z3-solver · wikipedia-mcp · mcpo · mcp-server-odoo · ha-mcp · mcp · postgres-mcp · cisco-ai-mcp-scanner