TheoremSearch-MCP
Provides semantic search over mathematical statements from arXiv, with support for filtering by type, year, citations, and graph-based exploration of statement dependencies.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TheoremSearch-MCPsearch for the theorem that every projective module over a local ring is free"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
English |
TheoremSearch-MCP
An MCP wrapper for TheoremSearch (UW Math AI Lab), which semantically searches about 9.27 million mathematical statements across 8 sources including arXiv, Stacks Project, and ProofWiki.
This repository provides two integration paths:
Path | Description | Tools |
A. Official Remote MCP | Register | 1 tool ( |
B. Local MCP Wrapper (this repo) | Python MCP server that calls TheoremSearch REST APIs | 5 tools (search + filters + graph) |
Quick Test (No MCP Setup Needed)
If you just want to evaluate search quality first, run the script (only requests is required).
Use the Python executable inside the virtual environment directly (recommended), so you do not need activation-specific shell commands.
Windows (PowerShell/CMD):
python -m venv .venv
.venv\Scripts\python -m pip install -r requirements.txt
.venv\Scripts\python scripts\quick_test.pymacOS/Linux (bash/zsh):
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txt
.venv/bin/python scripts/quick_test.pyIt demonstrates semantic search, filtered search (source/type/year), whole-corpus graph search (including formal Lean), paper autocomplete, and dependency graph traversal.
You can also call the API directly with curl:
curl -s -X POST https://api.theoremsearch.com/search -H "Content-Type: application/json" -d '{"query":"Any projective module over a local ring is free","n_results":3}'Related MCP server: mathlas
Path A: Official Remote MCP (Fastest)
Codex
Add this to .codex/config.toml in your target project:
[mcp_servers.theoremsearch_remote]
url = "https://api.theoremsearch.com/mcp"
tool_timeout_sec = 120VS Code (GitHub Copilot / MCP-capable clients)
Create .vscode/mcp.json in the project:
{
"servers": {
"theoremsearch-remote": {
"type": "http",
"url": "https://api.theoremsearch.com/mcp"
}
}
}Claude Desktop
Add this to claude_desktop_config.json:
{
"mcpServers": {
"theoremsearch-remote": {
"type": "http",
"url": "https://api.theoremsearch.com/mcp"
}
}
}The official remote MCP exposes a single tool,
theorem_search, with parameters matchingPOST /search(includingsources,types,year_range,citation_range,citation_weight, etc.), and supportsinitialize/tools/list/tools/call.
Path B: Local MCP Wrapper (This Repo, Recommended)
This wrapper provides 5 tools, adding graph capabilities beyond the official MCP:
Tool | Backend | Purpose |
|
| Main semantic search with filters (source/author/type/year/citations) and optional citation weighting |
|
| Whole-corpus semantic search ( |
|
| Traverse dependency edges from a |
|
| Retrieve all statements and dependency edges for a paper/Lean repo (via arXiv ID, repo slug, or UUID) |
|
| Paper title / arXiv ID autocomplete |
Install and Run
Windows (PowerShell/CMD):
python -m venv .venv
.venv\Scripts\python -m pip install -r requirements.txtmacOS/Linux (bash/zsh):
python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txtVirtual environment path differences:
Windows executables are under
.venv\\Scripts\\.macOS/Linux executables are under
.venv/bin/.
After activating your virtual environment, add this to .codex/config.toml in the target project:
[mcp_servers.theoremsearch]
command = "python"
args = ["-E", "./server.py"]
cwd = "./"
tool_timeout_sec = 120
-EignoresPYTHONPATH, preventing a localmcp/directory from shadowing the official MCP SDK required byfastmcp.
For VS Code, use .vscode/mcp.json:
{
"servers": {
"theoremsearch-local": {
"type": "stdio",
"command": "python",
"args": ["-E", "${workspaceFolder}/server.py"]
}
}
}You can also manually run the server in stdio mode for validation:
.venv\Scripts\python -E .\server.py.venv/bin/python -E ./server.pyUsage Examples
Use theorem-like statements as queries (more complete statements usually work better):
theorem_search(query="Any projective module over a local ring is free", n_results=5)Filtered search example (lemmas in Stacks Project after 2010):
theorem_search(query="smooth DM stack has a dense open subscheme", sources=["Stacks Project"], types=["Lemma"], year_range=[2010, 2024])Citation-weighted search example (highly cited classical results):
theorem_search(query="Hahn-Banach separation theorem", citation_weight=0.5, citation_range=[100, 5000])Two-step dependency-graph workflow: first get a statement_id from whole-corpus graph search, then traverse dependencies (graph_statement accepts informal or formal, not both):
graph_search(query="any projective module over a local ring is free", formality="both", n_results=1)
graph_statement(statement_id="<statement_id from previous step>", direction="both", formality="informal")Notes
Public API examples do not require an API key, but production rate limits are not publicly specified. Control request frequency (for example, global serialized 1 req/s).
Default request timeout is 180s (
/graph/embeddingwithformality=formalcan exceed 60s in practice). Largen_resultsordb_top_kincreases latency.year_rangeandcitation_rangeshould be 2-item arrays:[min, max].There are a few live-API vs doc mismatches (corrected here based on observed behavior):
/graph/statementaccepts onlyinformal/formal; response shape is{root, nodes, edges}instead of documented{statement, neighbors};/graph/paperreturns{paper, statements, edges}instead of{..., dependencies}. Recheck if upstream APIs change.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP server that enables MCP clients to directly access and process arXiv papers by fetching the LaTeX source, improving mathematical content understanding.Last updated4142MIT
- AlicenseAqualityAmaintenanceAirtight 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.Last updated129Apache 2.0
- AlicenseAqualityBmaintenanceMCP server for searching and retrieving arXiv papers with full-text PDF extraction.Last updated51MIT
- Flicense-qualityDmaintenanceA lightweight MCP server for querying arXiv with semantic and keyword search, supporting natural language queries and structured filters.Last updated2
Related MCP Connectors
Academic research MCP server for paper search, citation checks, graphs, and deep research.
Educational MCP server with 17 math/stats tools, visualizations, and persistent workspace
Semantic Scholar Academic Graph MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/FDscend/TheoremSearch-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server