arquimedes-mcp
Query a 1,038,963-problem competition/olympiad math database — search it, sample practice sets from it, and pull full problem records with answers, hints, solutions, and reasoning traces.
Get stats (
arquimedes_stats) — summary counts by dataset, category, competition, and solution kind; takes no arguments.Search problems (
arquimedes_search) — full-text search over keywords, theorem names (e.g.Cauchy-Schwarz,pigeonhole), or LaTeX snippets; requiredquery, optional filters ondataset,category,competition, andmin_mohs/max_mohs(1.0–10.0); returns 1–50 results (default 10).Sample problems (
arquimedes_sample) — uniform random draw (default 5, max 50) with optionalseedfor reproducibility, plus filters foryear,has_choices(multiple-choice vs free-response/proof),has_diagram(SVG/JPG figures), difficulty, category, dataset, and competition; suited to practice sets, mock olympiads, and eval benchmarks.Fetch a problem by ID (
arquimedes_get_problem) — returns the full LaTeX statement, answer choices, verified answer, progressive hints, written proof solutions, and diagram references, withinclude_solutions(default true) andinclude_tracesfor deepmath long-CoT R1 reasoning traces.Safety profile — every tool is read-only, non-destructive, and closed-world; all are idempotent except
arquimedes_sample, which varies unless a seed is supplied.
Arquimedes: Math Problem Database
A structured, deduplicated database of competition and benchmark mathematics:
1,038,963 problems across 9 datasets, each with a normalized LaTeX statement,
calibrated Mohs difficulty (1.0 to 10.0), answer metadata, and solutions in a
uniform JSON schema (v2).
1,038,963 problems with full statements and 99.98% domain categorization
797,671 written solutions: proof-sketch (797,631), strategy (22), answer-only (18)
277,002 model-reasoning traces (
deepmathdataset, JSONL shards)1,219 diagram images (SVG and JPG), content-addressed by hash
Unified Mohs difficulty (
1.0–10.0) populated across all 1,038,963 recordsFast CLI & MCP Server: installable via
uv(arquimedesCLI andarquimedes-mcpserver)Decontaminated Train/Eval Splits: one-command export (
972,458decontaminated train /10,533canonical eval)Interactive Web Explorer: minimalistic browser catalog in
site/ready for GitHub Pages
Datasets
dataset | contents | problems | notable fields |
| NuminaMath problems, the largest dataset | 840,924 | origin tags per problem, Mohs difficulty |
| DeepMath problems with R1 reasoning traces | 92,334 | three model-reasoning traces per problem, difficulty rating |
| Big-Math-RL-Verified problems with verified answers | 77,527 | Llama-8B solve-rate difficulty note, hierarchical domain tags |
| MATH benchmark problems | 12,401 | difficulty levels |
| curated competition problems (AMC program, IMO, HMMT, and more) | 10,645 | concept tags, course/source difficulty ratings, progressive hints, solve time |
| Omni-MATH olympiad problems | 2,640 | difficulty rating from |
| OlympiadBench olympiad problems | 1,389 | diagram images (JPG), answer-type tags |
| CEMC multiple-choice contests (Gauss, Pascal, Cayley, Fermat) | 792 | five answer choices per problem, reference URLs |
| competition problems with community-written solutions | 311 | collection, year, and problem code per record |
Related MCP server: mathlas
Category Distribution
category | problems | share |
| 386,699 | 37.22% |
| 243,231 | 23.41% |
| 183,930 | 17.70% |
| 129,482 | 12.46% |
| 38,809 | 3.74% |
| 35,493 | 3.42% |
| 19,935 | 1.92% |
| 1,225 | 0.12% |
| 159 | 0.02% |
Per-dataset category breakdowns and field notes: docs/datasets.md.
Competition Coverage
The source.collection field labels records that come from a named
competition or benchmark:
AMC program (
core): AHSME 1,810 · AMC 8 1,025 · AMC 10A 625 · AMC 10B 625 · AMC 10 50 · AMC 12A 625 · AMC 12B 625 · AMC 12 50 · AIME I 405 · AIME II 405 · AIME 255 · USAMO 153 · USA TST 45 · USA TSTST 48IMO (
core): 156HMMT (
core): February 2,606 · November 1,072 · Invitational 65CEMC (
cemc): Gauss (Grade 7) 174 · Gauss (Grade 8) 166 · Pascal (Grade 9) 134 · Cayley (Grade 10) 150 · Fermat (Grade 11) 168AoPS (
aops): IMO Shortlist 102 · USAJMO 91 · Canadian MO 83 · APMO 28 · Putnam 7OlympiadBench (
olympiadbench): 1,389MATH (
math): 12,401
Records in omnimath, deepmath, numina, and bigmath carry origin and domain labels in source.tags.
CLI & MCP Server (uv)
arquimedes ships a zero-dependency Python package with both a fast CLI (arquimedes) and a Model Context Protocol server (arquimedes-mcp) backed by SQLite + FTS5 (with automatic JSONL shard fallback when SQLite is absent).
Install from PyPI
The package name is arquimedes-mcp. It does not contain the problems. Download them once from the Hugging Face dataset (about 1.3 GB of shards, then a lean index of about 0.8 GB):
uvx arquimedes-mcp fetchThat copy lives in the user data directory (~/Library/Application Support/arquimedes on macOS), so the next uvx run finds it.
{
"mcpServers": {
"arquimedes": {
"command": "uvx",
"args": ["arquimedes-mcp"]
}
}
}uvx --from arquimedes-mcp arquimedes stats
uvx --from arquimedes-mcp arquimedes search "Cauchy-Schwarz" --min-mohs 7.0 -n 5From a checkout
# Build the local 1.7 GB SQLite + FTS5 database (~50 seconds)
uv run arquimedes build
# or a 0.8 GB index that reads solutions from the shards
uv run arquimedes build --lean
# Show corpus summary
uv run arquimedes stats
# Sub-20ms full-text search across 1,038,963 problems
uv run arquimedes search "Cauchy-Schwarz" --min-mohs 7.0 -n 5
# Sample calibrated problems by competition, category, or Mohs difficulty
uv run arquimedes sample --competition IMO --category geometry -n 3
# Inspect a full problem record with choices, answer, hints, and proof
uv run arquimedes show prob.ahsme-1950-p10MCP server from a checkout
Add to your mcp.json or claude_desktop_config.json when the shards are already in a checkout:
{
"mcpServers": {
"arquimedes": {
"command": "uv",
"args": ["--directory", "/path/to/arquimedes", "run", "arquimedes-mcp"]
}
}
}Exposed MCP tools (all read-only; arguments in docs/usage.md):
arquimedes_get_stats: dataset, category, competition, and solution countsarquimedes_search_problems: full-text search with category, dataset, competition, andmin_mohs/max_mohsfiltersarquimedes_sample_problems: uniform random draw among problems matching the filters, repeatable with a seedarquimedes_get_problem: full LaTeX statement, choices, answer, hints, solutions, and optional deepmath reasoning traces by id
Stability (1.x)
From 1.0.0 on, these interfaces only change in backward-compatible ways until a 2.0.0 release:
the v2 problem record schema in
docs/schema.md: fields are not removed or renamed, and their types do not changethe MCP tool names, their arguments, and the shape of their results
the
arquimedesCLI commands and flags, and their--jsonoutputthe SQLite tables and columns built by
arquimedes buildthe
ArquimedesEnginemethodsget_stats,search,sample, andget_problem
New fields, tools, flags, and data fixes can arrive in minor and patch
releases. Corrections to individual records (a wrong answer, a mislabeled
category) are data fixes, not breaking changes. Counts and difficulty.mohs
values can change as records are corrected; mohs is a calibration, not a
measured difficulty. Changes are listed in CHANGELOG.md.
Decontaminated Train / Eval Splits
For LLM post-training and RLVR (Reinforcement Learning with Verifiable Rewards), tools/export_splits.py (or uv run arquimedes splits) produces a decontaminated training set and a canonical evaluation benchmark:
uv run arquimedes splits --out-dir splits/Evaluation split (
splits/eval.jsonl.gz— 10,533 problems):mathtest split (4,974),omnimath(2,640),olympiadbench(1,389),core2023+ contests (931),aops(311), andcemc2023+ contests (288).Decontaminated training split (
splits/train.jsonl.gz— 972,458 problems): filters out 46,057 unverifiable records and strips 9,915 near-duplicate benchmark leaks detected via 5-gram token shingle overlap acrossnumina,bigmath,core,math,deepmath, andcemc.
Quickstart (Python & SQLite)
Read a problem directly from a shard with the Python standard library:
import gzip, json
with gzip.open("problems/core/shard-00000.jsonl.gz", "rt", encoding="utf-8") as fh:
prob = json.loads(fh.readline())
print(prob["title"], "Mohs:", prob["difficulty"]["mohs"])
print(prob["statement"]) # raw LaTeX with \( \) delimiters
print(prob["answer"]) # {'letter': 'd', 'value': '3+\\sqrt6'}
print(prob["solutions"][0]["text"][:200])Query SQLite + FTS5 directly:
SELECT p.id, p.title, p.difficulty_mohs, p.answer_value
FROM problems_fts f
JOIN problems p ON p.rowid = f.rowid
WHERE problems_fts MATCH '"pigeonhole"'
AND p.difficulty_mohs BETWEEN 5.0 AND 8.5
LIMIT 10;Layout
problems/<dataset>/shard-*.jsonl.gz gzipped JSON Lines, one v2 problem record per line
images/<hash>.svg, images/<hash>.jpg 1,219 content-addressed diagram files
data/index.json summary index (counts by dataset, category, competition)
data/problems.sqlite queryable SQLite + FTS5 database (build locally)
arquimedes/ uv-installable CLI and MCP server package
site/ minimalistic interactive web explorer (GitHub Pages)
tools/ converters, shard normalizer, split exporter, DB builder
docs/ schema, usage, and dataset documentationDocumentation
docs/schema.md: full v2 record reference, shard format, SQLite + FTS5 schema, LaTeX convention, image storedocs/usage.md: CLI, MCP server, SQL & FTS5 queries, reasoning traces, decontaminated splitsdocs/datasets.md: per-dataset contents, field notes, category distributions, deduplication rules, and upstream licenses
License
Code in arquimedes/, tools/, and site/ is MIT. The Mohs calibration, the category labels assigned by this project, and data/index.json are CC BY 4.0. Problem statements, solutions, answers, and diagrams are not relicensed; the upstream terms are in docs/datasets.md. A Hugging Face copy keeps every record and stamps the holder's notice on it: richard01172000/arquimedes. See LICENSE.
Available Tools
4 toolsarquimedes_get_problemARead-onlyIdempotent
Fetch one problem by its id, as returned by arquimedes_search_problems or arquimedes_sample_problems (e.g. 'prob.ahsme-1950-p10', 'prob.numina-000369'). Returns the full record: LaTeX statement, answer choices, answer, written solutions with progressive hints, difficulty, source, and diagram references. Ids cannot be guessed; an unknown id returns an error, so discover ids with search or sample first.
Inputs: problem_id (required), include_traces, include_solutions.
arquimedes_get_statsARead-onlyIdempotent
Summarize what the Arquimedes math problem database holds: 1,038,963 problems across 9 datasets, with problem counts by dataset, category, and competition, and written-solution counts by kind. Call it first to learn which category, dataset, and competition values exist before filtering arquimedes_search_problems or arquimedes_sample_problems. Takes no arguments.
Inputs: no named parameters.
arquimedes_sample_problemsARead-only
Draw random problems from 1,038,963 competition and olympiad math problems, uniformly among those matching optional filters: category, dataset, competition, contest year, Mohs difficulty range (1.0 to 10.0), multiple-choice only, or with a diagram. Use it to build practice sets, mock contests, or evaluation samples; pass the same seed to repeat a draw. Results are summaries without solutions; pass an id to arquimedes_get_problem for solutions. To find problems about a specific topic or keyword, use arquimedes_search_problems.
Inputs: seed, year, limit, dataset, +6 more.
arquimedes_search_problemsARead-onlyIdempotent
Find problems by keyword in 1,038,963 competition and olympiad math problems. Full-text search returns problems whose statement or title contains all the query words: a topic, a theorem name such as 'Cauchy-Schwarz', or a LaTeX fragment. Optional filters narrow by category, dataset, competition, and Mohs difficulty (1.0 to 10.0). Results are summaries (id, title, competition, year, difficulty, answer, statement) without solutions; pass an id to arquimedes_get_problem for solutions and hints. To get random problems instead of keyword matches, use arquimedes_sample_problems.
Inputs: query (required), limit, dataset, category, +3 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: get_stats (metadata survey), search_problems (keyword lookup), get_problem (fetch by id), and sample_problems (random draw). Descriptions explicitly cross-reference each other, telling the agent when to prefer search over sample and vice versa. There is no meaningful overlap that could cause misselection.
All four tools follow a uniform arquimedes_verb_noun pattern (get_stats, search_problems, get_problem, sample_problems) in consistent snake_case. Verb choice maps cleanly to action, and the server prefix is applied uniformly. No convention mixing.
Four tools is compact but each earns its place in a read-only database workflow: discover facets, search, retrieve, and sample. Nothing feels redundant or padded. The scope (browsing a problem corpus) is fully served without bloat.
The surface covers the core read lifecycle: facet discovery via stats, keyword search with filters, id-based full retrieval including solutions/hints, and random sampling. Minor gaps exist (e.g., no bulk multi-id fetch or explicit pagination controls), but these are workarounds an agent can handle. No single-purpose dead ends.
Maintenance
Related MCP Connectors
Search Luogu problems, fetch statements, explore problem sets and get practice recommendations.
Search Codeforces problems and inspect public problem metadata through the official Codeforces API.
Search AtCoder problems and fetch public problem statements through MCP.
Daily verified GRE and GMAT quant drill: graded answers, hints and worked solutions.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides exact arithmetic and verification tools using SymPy and fractions to solve math competition problems precisely. It enables users to perform rigorous calculations and export notebook-ready Python code for further analysis.-
- AlicenseAqualityBmaintenanceAirtight math tools an AI uses over MCP — 3.7M-theorem search, PSLQ constant ID, OEIS, real Lean kernel checks, applicability checklists. No LLM inside, no API key.1231 PyPI14Apache 2.0
- AlicenseNot gradedqualityCmaintenanceRead-only MCP server for accessing AtCoder problem statements and samples, enabling problem retrieval and search without contest interference.MIT
- AlicenseNot gradedqualityCmaintenanceEnables searching and retrieving metadata for Codeforces problems by title, id, rating, or tag, and provides service health status.MIT