Overview¶
lean-proof-auto-mcp is an MCP server for deterministic Lean 4 analysis, proof
automation probing, proof validation, and context extraction.
Implemented MCP tools¶
scan_filescan_theoremrank_targetsverifyprobeprobe_filesearch_automated_prooftry_automated_proofget_proof_context
Current architecture shape¶
The runtime follows a composition-root pattern in tools/*.py:
- Validate/coerce MCP args.
- Build command/config objects.
- Wire concrete adapters (querier, validator, metadata, workspace provider).
- Call core handler/orchestrator.
- Normalize to stable JSON response.
See docs/architecture/system_overview.md for detailed diagrams and runtime flows.
Runtime guarantees¶
- Deterministic response envelopes with
statusandrun_id. - Explicit status semantics (tool-level success/fail/timeout/error style).
- Lean server reuse across tool calls per project root.
- Range-based harness construction for proof-attempt tools.
Workspace behavior (current)¶
- Auto-detection currently resolves to
nonemode in runtime adapters. nonemode runs against the project root directly (no temp/worktree isolation).worktreeandtempproviders still exist in adapter code but are not the default path used by the current composition roots.
See docs/workspace_modes.md for details.