lean-lsp-mcp
Created 5 months ago
Lean LSP MCP server for agentic interaction with the Lean theorem prover.
development
documentation
public
lean
language server
What is lean-lsp-mcp?
Interact with the [Lean theorem prover](https://lean-lang.org/) via the Language Server Protocol.
Documentation
Key Features
- Rich Lean Interaction: Access diagnostics, goal states, term information, hover documentation and more.
- External Search Tools: Use
leansearch,loogle,lean_hammerandlean_state_searchto find relevant theorems and definitions. - Easy Setup: Simple configuration for various clients, including VSCode, Cursor and Claude Code.
Setup# Overview
- Install uv, a Python package manager.
- Make sure your Lean project builds quickly by running
lake buildmanually. - Configure your IDE/Setup
Transport Methods
The Lean LSP MCP server supports the following transport methods:
stdio: Standard input/output (default)streamable-http: HTTP streamingsse: Server-sent events (MCP legacy, usestreamable-httpif possible)
Bearer Token Authentication
Transport via streamable-http and sse supports bearer token authentication. Set the LEAN_LSP_MCP_TOKEN environment variable to a secret token before starting the server.
Environment Variables
Some features and integrations of lean-lsp-mcp are configured using environment variables. These must be set in your shell or process environment before running the server.
Server Config
{
"mcpServers": {
"lean-lsp-mcp-server": {
"command": "npx",
"args": [
"lean-lsp-mcp"
]
}
}
}
Links & Status
Project Info
Hosted
Featured
Created At:
Jul 02, 2025
Updated At:
Aug 07, 2025
Author:
Oliver Dressler
Category:
community
License:
MIT
Tags:
development
documentation
public