# Lean Theorem Prover MCP

> Interact with Lean through the Language Server Protocol.

- **URL**: https://followmcp.com/en/servers/lean-lsp-mcp
- **Category**: Dev Tools
- **Origin**: Community
- **Stars**: 575
- **FMRS Score**: 59/100 (Grade C)
- **Source**: https://github.com/oOo0oOo/lean-lsp-mcp
- **Transports**: stdio (local process), Streamable HTTP, SSE
- **Runtimes**: Python
- **Auth**: No credential needed

## Overview
Lean Theorem Prover MCP is an MCP server that uses the Language Server Protocol and leanclient to help agents understand, analyze, and interact with Lean projects. It provides access to diagnostics, goal states, term information, and hover documentation, and can use LeanSearch, Loogle, Lean Finder, and Lean Hammer to search for theorems and definitions.

## Best for
- Developers and researchers working with Lean 4 and Lake projects.
- Users who want an MCP client to inspect proof states, diagnostics, and Lean project contents.

## Not for
- Users who do not work with Lean projects or theorem-proving workflows.
- Users who expect the server to provide the Lean toolchain; the project still needs a Lean toolchain.
- Workflows that require tool calls to be strictly read-only or free of side effects.

## Required permissions
- Needs access to files in the active Lean project, resolved .lake/packages dependencies, and Lean standard-library source tree.
- Build and analysis tools execute project or supplied Lean code, which may have I/O effects.
- Remote search tools may access the external network; operators can disable the relevant tools.

## Risks
- The README describes the server as a research tool and says it is in beta.
- Local file access, build and code-analysis capabilities, and network access for remote search present security risks.
- The initial local Loogle Mathlib index can use substantial memory; the README reports a measured peak of about 13 GiB.

## Client config (JSON)
```json
{"mcpServers":{"lean-lsp":{"command":"uvx","args":["lean-lsp-mcp"]}}}
```
