Lean Mathlib Docs
FreeNot checkedA minimal MCP local server for Lean Mathlib 4 Documentation Search Implemented using Python
About
A minimal MCP local server for Lean Mathlib 4 Documentation Search Implemented using Python
README
This project provides a Minimal MCP (Model Context Protocol) Server for searching Lean Mathlib 4 documentation. It allows LLMs to query Lean Mathlib 4 declarations and retrieve relevant documentation links and details. The MCP server is only available for VSCode at the moment.
Features
- Search Lean Mathlib 4 Documentation: Query the documentation for declarations, modules, and instances.
- MCP Server Integration: Implements the MCP protocol for seamless integration with tools.
- Local Data Handling: Downloads and processes Lean Mathlib 4 documentation data locally after the first run.
Prerequisites
- Python 3.11 or higher
requestslibrarymcpMCP Server library
Installation
Clone the repository:
git clone https://github.com/CriticalLine/lean-mathlib-docs-mcp.git cd lean-mathlib-docs-mcpInstall the required Python dependencies:
conda env create -f environment.yml conda activate lean-mathlib-docs-envEnsure the
mcp.jsonfile is correctly configured in the.vscodefolder or the project root.
Usage
- VSCode will automatically start the MCP server when you launch it with the appropriate configuration.
- Query the server by explicitly using
#search_lean_doc <query>or tell the LLM to use the search function.
Project Structure
lean-mathlib-docs-mcp/
├── LICENSE
├── README.md
├── src/
│ ├── lean_docs_server.py
│ └── mcp.json
Development
- test the mcp server
- add check the original code
License
This project is licensed under the GPLv3 License. See the LICENSE file for details.
Prohibits all commercial use.
Acknowledgments
- Lean Mathlib 4 for the documentation data.
- The MCP Server library for providing the protocol implementation.
Installing Lean Mathlib Docs
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/CriticalLine/lean-mathlib-docs-mcpFAQ
Is Lean Mathlib Docs MCP free?
Yes, Lean Mathlib Docs MCP is free — one-click install via Unyly at no cost.
Does Lean Mathlib Docs need an API key?
No, Lean Mathlib Docs runs without API keys or environment variables.
Is Lean Mathlib Docs hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Lean Mathlib Docs in Claude Desktop, Claude Code or Cursor?
Open Lean Mathlib Docs on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Notion
Read and write pages in your workspace
by NotionLinear
Issues, cycles, triage — from Claude
by LinearGoogle Drive
Search and read your Drive files
by Googlemindsdb/mindsdb
Connect and unify data across various platforms and databases with [MindsDB as a single MCP server](https://docs.mindsdb.com/mcp/overview).
by mindsdbCompare Lean Mathlib Docs with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All productivity MCPs
