verified-zkevm/clean/lean-mcp
Claude Code and agent skill by verified-zkevm/clean
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install verified-zkevm/clean/lean-mcpSKILL.md
Lean LSP via mcporter - Skill
This skill enables interactive inspection of Lean proof states using the Lean Language Server Protocol via mcporter.
When to use this skill
- You're stuck on a Lean proof and need to see the exact goal state after simplifications
- Your
rworsimpcommands aren't matching the expected pattern - You want to understand what a tactic is actually doing
- You need to verify a proof compiles without waiting for full
lake build
Setup (one-time)
The config/mcporter.json in the repo is already configured for the lean-lsp MCP server.
Key Commands
1. View proof state at a line (MOST IMPORTANT)
Returns:
goals_before: Goal state at the start of the linegoals_after: Goal state at the end of the line (after tactic executes)- Shows exactly how the tactic transforms the goal
Example:
2. Get diagnostics (errors/warnings)
3. Try multiple tactics without modifying the file
Returns the goal state after each tactic, so you can see which one makes progress.
4. Get type/documentation for a symbol
Column should be at the START of the identifier you want to inspect.
5. Search for theorems/lemmas
All Available Tools
Run mcporter list lean-lsp --schema to see all 18 available tools with full documentation.
Key tools include:
lean_goal- proof states (use this the most!)lean_diagnostic_messages- errors/warningslean_hover_info- type informationlean_completions- autocompletionslean_multi_attempt- try multiple tacticslean_local_search- search project declarationslean_leansearch,lean_loogle,lean_leanfinder- theorem searchlean_state_search,lean_hammer_premise- find relevant lemmas for goals
Workflow Tips
- When a proof step fails: Use
lean_goalto see the exact goal state before and after the tactic - When rewrite doesn't match: Check
goals_afterthe previous line to see the exact pattern - When stuck: Try
lean_multi_attemptwith several candidate tactics - When looking for lemmas: Use
lean_local_searchfirst (fast), then external search tools if needed
Common Issues
- Timeouts: The first call after opening a file can be slow (LSP server starting). Subsequent calls are fast.
- File paths: Must be absolute paths (not relative)
- Line numbers: 1-indexed (first line is 1, not 0)
- Column numbers: 1-indexed, should point to the START of an identifier for hover info
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/lean-mcp/SKILL.md
Popularity
- Repository stars
- 154
- Repository forks
- 22
- 7-day trend score
- 25
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/verified-zkevm/clean/lean-mcp)