MCP

mathlas: math retrieval and checking without an API key — search existing theorems first

For looking up real theorems, identifying constants or sequences in Claude Code or Cursor. Connect with uvx first; if Lean or a local OEIS copy is missing, tools say unavailable instead of inventing an answer.

Official source · mathlas

Install

claude mcp add mathlas -- uvx mathlas-mcp

Who it's for

You are doing math in Claude Code or Cursor and want the model to invent fewer theorems, constants, and sequences, without applying for another API key. mathlas itself does not run a large model, needs no key, and is free. It provides candidates, verdicts, inventories, and scaffolding; the reasoning still happens in your AI.

It fits two concrete jobs: recover real theorems with search_existing_math from an index of about 3.68 million papers; or identify an unknown constant with identify_constant (PSLQ plus closed-form matching, 50-digit precision), and identify an integer sequence with identify_sequence (exact OEIS term match).

Official repo on its own line:

https://github.com/Archerkattri/mathlas

First try in 3 minutes

Use only this official connect line. You need uv first. uv docs on their own line:

https://docs.astral.sh/uv/

Then run:

claude mcp add mathlas -- uvx mathlas-mcp

Prerequisite: uv is installed. No API key. Official text says nothing to install first, but it still depends on uv.

Where to configure: Claude Code uses the add line above; Cursor or another MCP client should point stdio at the same uvx mathlas-mcp. Do not also start python -m mathlas.server as the main path. The service prefers the official mcp SDK and, if that is missing, falls back to dependency-free stdio JSON-RPC; officially it always comes up.

Low-risk first step: call search_existing_math and look for an existing theorem in the 3.68M document index. This is retrieval: it returns data for the model to reason over and does not change your repo. Success signal is candidates or search hits, not a new proof. There are twelve tools; this page names only a few — do not invent the rest.

Do not read “no LLM, no API key” as offline or as no local reads. uvx starts a local process; search and verification may read optional local data. Even if readOnlyHint appears, that is not zero risk.

Use cases

Case 1: check a theorem that may be a hallucination. Call search_existing_math and look for a real theorem in the 3.68M document index. Official text also mentions verify_numeric and verify_formal for checking assertions, and claims zero hallucination risk; verify_formal needs a Lean toolchain and, when missing, clearly returns data/toolchain not available instead of fabricating an answer. This page has no parameter table for those tools.

Case 2: recognize a constant or integer sequence. Call identify_constant with PSLQ plus closed-form matching, precision stated as 50 digits. Or call identify_sequence for an exact OEIS term match. identify_sequence needs a local OEIS copy; without it it degrades honestly and returns unavailable instead of a fake hit. Official text gives no input-format example.

Limits

No API key is required, but uv is. Of the twelve tools this page only names search_existing_math, verify_numeric, verify_formal, identify_constant, identify_sequence. If Lean or a local OEIS copy is missing, tools say unavailable and do not invent. mathlas only returns data; the proof is still finished by the model. Optional local data, if not installed, shrinks the features. Official text does not describe index refresh frequency, resource use, or undo. Do not read “zero hallucination risk” as meaning the verification tools never touch this machine.