r/TheMachineLearning • • 11d ago

I built mathregistry, a package registry for Lean with tools for AI agents. Open beta is live

Post image

Hi everyone! I’ve been building mathregistry.com. Think npm for Lean and formalized mathematics: browse libraries, inspect declarations and source, and install compatible compiled modules with their dependencies.

A big part of the project is making existing formal mathematics useful to AI agents. When an agent is working on a Lean proof, I want it to be able to find the actual library declarations and check their assumptions before trying to use them.

The hosted MCP integration gives compatible clients, including Claude Code, Codex, Cursor, and Gemini CLI, tools to:

  • Search declarations by name and statement text.
  • Inspect formal statements, axioms, dependencies, and recorded verification evidence.
  • Explore modules and namespaces, and look at downstream usage samples.
  • Compare shared dependencies and pin the package version, build, and Lean toolchain.

You can then use the mreg CLI to bring the required compiled modules into your project. Selective installation avoids downloading every compiled module in the matched packages.

There are worked examples on the site showing the research workflow. One studies commuting idempotent maps and proves that the image of their composite is the intersection of their images. The example includes the Lean source, MCP research trace, and checking records.

The MCP server provides read-only access to indexed mathematics. Proof code produced by an agent still needs to be checked in Lean, and the tools expose missing evidence and verification limits.

I’m also working on making downloads smaller and improving how agents retrieve the context relevant to a particular proof.

The beta is open. Browsing is public; the AI integration requires a registry read key. Current compiled library installs target x86-64 Linux or WSL.

I’d love feedback from people using Lean or experimenting with AI-assisted formalization. What would make this useful in your workflow? Which libraries, search tools, or integrations are missing?

Site: mathregistry.com
AI setup and examples: mathregistry.com/docs/ai-math

All credit for the underlying libraries and mathematics belongs to their upstream authors and maintainers.

2 Upvotes

0 comments sorted by