A Python library implementing the Model Context Protocol (MCP) for integration with the Lean Theorem Prover's language server (LSP). It enables AI agents to inspect Lean environments, check proofs, get goals, and run commands via the Lean LSP. Version 0.26.2 (current) supports Python >=3.10. Release cadence is active, with frequent updates.
pip install lean-lsp-mcpNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize a Lean LSP client, execute a command (checking a simple equality), and print the resulting goals.
Update imports to `from lean_lsp_mcp import ...`.
Replace `LeanClient` with `LeanLspClient` in your code.
Set `lean_path` to the path of the `lean` binary, often found at `/path/to/.elan/bin/lean`.