Skip to main content

MCP server for Leeroopedia ML/AI knowledge search

Project description

Leeroopedia MCP Server

Give your AI coding agent access to best-practices of ML and AI.

PyPI Discord GitHub commit activity Y Combinator X25

Leeroopedia MCP overview


$20 free credit on sign-up : that's plenty of searches, plans, and diagnoses. Skip the guesswork on your next fine-tuning run or inference deployment. No credit card required. Get your API key →

What is Leeroopedia?

Your ML & AI Knowledge Wiki. Learnt by AI, built by AI, for AI.

Expert-level knowledge across the full ML & AI stack, from fine-tuning and distributed training, to inference serving and GPU kernel optimization, to building agents and RAG pipelines. 1000+ frameworks and libraries, all in one place.

This MCP server turns your AI coding agent (Claude Code, Cursor, OpenAI Codex, ...) into an ML/AI expert engineer.

Browse the full knowledge base at leeroopedia.com.

Want to go end-to-end?

Leeroopedia gives your agent the knowledge. Kapso gives it the ability to act on it : research, experiment, and deploy. Together: a complete ML/AI engineer agent.

Benchmarks

We measured the effect of Leeroopedia MCP on real ML tasks built by Claude Code.

  • ML Inference Optimization: Write CUDA/Triton kernels for 10 KernelBench problems. 2.11x geomean speedup vs 1.80x (+17%), with/without Leeroopedia MCP. → results

  • LLM Post-Training: End-to-end SFT + DPO + LoRA merge + vLLM serving + IFEval on 8×A100. 21.3 vs 18.5 IFEval strict-prompt accuracy, 34.6 vs 30.9 strict-instruction accuracy, 272.7 vs 231.6 throughput. → results

  • Self-Evolving RAG: Build a RAG service that automatically improves itself over multiple rounds. 45.16 vs 40.51 Precision@5, 40.32 vs 35.29 Recall@5, in 52 vs 62 min wall time. → results

  • Customer Support Agent: Multi-agent triage system classifying 200 tickets into 27 intents. 98 vs 83 benchmark performance, 11s vs 61s per query. → results

Quick Start

1. Install

No installation needed if you have uv. The MCP configs below use uvx to auto-download and run.

Alternative (manual install):

pip install leeroopedia-mcp

2. Get Your API Key

  1. Go to app.leeroopedia.com
  2. Create an account or log in
  3. Navigate to Dashboard > API Keys
  4. Copy your API key (format: kpsk_...)

3. Configure Claude Code

Add to your ~/.claude.json or project .mcp.json:

{
  "mcpServers": {
    "leeroopedia": {
      "command": "uvx",
      "args": ["leeroopedia-mcp"],
      "env": {
        "LEEROOPEDIA_API_KEY": "kpsk_your_key_here"
      }
    }
  }
}

Getting spawn uvx ENOENT? Your IDE can't find uvx in its PATH. Run which uvx (or where uvx on Windows) in your terminal to get the full path, then use it in your config:

"command": "/home/username/.local/bin/uvx"

Common locations: ~/.local/bin/uvx (Linux), ~/.local/bin/uvx (macOS curl install), /opt/homebrew/bin/uvx (macOS Homebrew).

4. Configure Cursor

Add to your Cursor settings (.cursor/mcp.json):

{
  "mcpServers": {
    "leeroopedia": {
      "command": "uvx",
      "args": ["leeroopedia-mcp"],
      "env": {
        "LEEROOPEDIA_API_KEY": "kpsk_your_key_here"
      }
    }
  }
}

Getting spawn uvx ENOENT? See the tip in Configure Claude Code above.

5. Configure OpenAI Codex

Run the CLI command:

codex mcp add leeroopedia --env LEEROOPEDIA_API_KEY=kpsk_your_key_here -- uvx leeroopedia-mcp

Or add to your ~/.codex/config.toml:

[mcp_servers.leeroopedia]
command = "uvx"
args = ["leeroopedia-mcp"]

[mcp_servers.leeroopedia.env]
LEEROOPEDIA_API_KEY = "kpsk_your_key_here"

Getting spawn uvx ENOENT? See the tip in Configure Claude Code above.

Available Tools

The MCP server provides 8 agentic tools. Each tool (except get_page) triggers an AI agent on the backend that searches the knowledge base from multiple angles, reads relevant pages, and synthesizes a structured response.

Search & Retrieve

search_knowledge — Search the KB for framework docs, APIs, and best practices

An AI agent synthesizes a grounded answer with [PageID] citations.

Parameter Required Description
query Yes What you want to find out
context No Optional context about what you're building
get_page — Retrieve a specific KB page by ID

Direct lookup — no AI agent needed. Use this to drill into [PageID] citations from other tools.

Parameter Required Description
page_id Yes Exact page ID (e.g., Workflow/QLoRA_Finetuning, Principle/LoRA_Rank_Selection)

Plan & Review

build_plan — Build a step-by-step ML execution plan

Returns an overview, key specs, numbered steps, and validation criteria — all grounded in KB evidence.

Parameter Required Description
goal Yes What you want to accomplish
constraints No Constraints or requirements (e.g., hardware limits, time budget)
review_plan — Review a plan against KB best practices

Catches incorrect assumptions before you write code. Returns approvals, risks, and improvement suggestions.

Parameter Required Description
proposal Yes The plan or proposal to review
goal Yes The intended goal of the plan

Verify & Debug

verify_code_math — Verify code against ML/math concepts

Checks your code against documented behavior and reference implementations. Returns a Pass/Fail verdict with analysis.

Parameter Required Description
code_snippet Yes The code to verify
concept_name Yes The mathematical/ML concept being implemented
diagnose_failure — Diagnose training/deployment failures

Matches symptoms against known failure patterns and misconfigurations. Returns diagnosis, fix steps, and prevention advice.

Parameter Required Description
symptoms Yes Description of the failure symptoms
logs Yes Relevant log output or error messages

Explore & Optimize

propose_hypothesis — Propose ranked next-step hypotheses

When you're stuck, get alternative approaches ranked by fit — backed by documented patterns. Returns ranked ideas with rationale and suggested experiments.

Parameter Required Description
current_status Yes Where the project stands now
recent_experiments No Description of recent experiments and their outcomes
query_hyperparameter_priors — Query hyperparameter values, ranges & heuristics

Start with battle-tested defaults instead of guessing. Returns a suggestion table with KB-grounded justification.

Parameter Required Description
query Yes Hyperparameter question (e.g., "learning rate for LoRA fine-tuning Llama-3 8B")

Environment Variables

Variable Required Default Description
LEEROOPEDIA_API_KEY Yes Your Leeroopedia API key
LEEROOPEDIA_API_URL No https://api.leeroopedia.com API endpoint
LEEROOPEDIA_POLL_MAX_WAIT No 300 Max seconds to wait for a search task
LEEROOPEDIA_POLL_INTERVAL No 0.5 Initial poll interval in seconds (grows via backoff)

Troubleshooting

Error Fix
spawn uvx ENOENT Your IDE can't find uvx. Run which uvx (or where uvx on Windows) in your terminal, then use the full path as the command value in your config
LEEROOPEDIA_API_KEY is required Set LEEROOPEDIA_API_KEY in your MCP config env block
Invalid or revoked API key (401) Re-copy your key from app.leeroopedia.com
Insufficient credits (402) Purchase more credits at app.leeroopedia.com
Rate limit exceeded (429) Wait for the retry period before making more requests
Search timed out (504) Try a more specific query, or increase LEEROOPEDIA_POLL_MAX_WAIT

Contributing

We welcome contributions! Please see our Contributing Guide for details on how to get started.

This project follows our Code of Conduct.

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

leeroopedia_mcp-0.1.5.tar.gz (17.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

leeroopedia_mcp-0.1.5-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file leeroopedia_mcp-0.1.5.tar.gz.

File metadata

  • Download URL: leeroopedia_mcp-0.1.5.tar.gz
  • Upload date:
  • Size: 17.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for leeroopedia_mcp-0.1.5.tar.gz
Algorithm Hash digest
SHA256 6f16fcbdb7ee01629fbe5a969314c3428a903e86c78dba9b3c1d3bc183376869
MD5 34948e9936bd0c7ee754e3f267105a47
BLAKE2b-256 fe86780d12c7ffec62069d1557ee875f90a9b1098df41a925a58b8fb091f75bf

See more details on using hashes here.

File details

Details for the file leeroopedia_mcp-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for leeroopedia_mcp-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d09a5d8c2f152f60a2169d25705995ef4ba3fae33b37ba67dfdaf0e976622b27
MD5 9efb0da14df42b04d1abd6eca271f120
BLAKE2b-256 f781c1f6ac0e00932e21af1767768ae498c3c36f796e9b33b68f28b41a2c8256

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page