# K2 > One spaced-repetition engine, many drills. ## For AI agents There is a read-only MCP server exposing the curated study decks and the algorithm itself: - [MCP endpoint](https://k2kanji.com/api/mcp): streamable HTTP, JSON-RPC 2.0, no auth - Install (Claude Code): `claude mcp add --transport http k2kanji https://k2kanji.com/api/mcp` - Install (claude.ai): Settings -> Connectors -> Add custom connector -> `https://k2kanji.com/api/mcp` - [MCP manifest](https://k2kanji.com/.well-known/mcp.json): the tool roster in machine-readable form - [agents.txt](https://k2kanji.com/agents.txt): terms, scope, and the full endpoint list - [llms-full.txt](https://k2kanji.com/llms-full.txt): everything in one file (full algorithm, every deck and its page, the FAQ) - Tools: `list_decks`, `search_deck`, `get_entry`, `get_cube_algorithms`, `explain_k2_algorithm`, `simulate_k2_session`, `get_site_info` (call this first for the full map) - Prompts: `study_plan`, `explain_term`, `drill_me`, `port_k2` - Resources: `k2kanji://decks`, `k2kanji://k2-algorithm` - Rate limit: 60 JSON-RPC messages per minute per IP, best effort, batches of at most 20; over it, HTTP 429 (JSON-RPC -32000), and a larger batch gets HTTP 400 (-32600) - [agents.json](https://k2kanji.com/agents.json) and [For agents](https://k2kanji.com/for-agents): the agent manifest and the long-form guide `simulate_k2_session` runs the real engine over items you supply, so an agent can use K2 as a scheduler for its own drilling rather than reimplementing it. **Scope.** The server serves reference data and algorithm math only. Learner progress is private and per-user (authenticated), and the AI generation features are metered per account; neither is reachable through the MCP server. K2 is a family of browser drill apps built on an unusual spaced-repetition engine. Instead of scheduling review dates, every item carries a probability `p`: answer correctly and `p` halves, answer wrong and it doubles. Items are drawn by Monte Carlo rejection sampling, so a session self-organizes around whatever you are currently getting wrong, and the pool expands on its own once it cools. ## Apps Japanese kanji and vocabulary, Chinese (HSK), Korean Hangul, Spanish, French, classical Latin, medical Latin and anatomy, Rubik's cube algorithms, music theory, world geography, and more. Start at the [kanji app](https://k2kanji.com/); the method is written up in [the K2 paper](https://k2kanji.com/paper). Each aliased domain (k2anatomy.com, k2spanish.com, k2hangul.com, k2chinese.com, k2cube.com, k2tempo.com, k2mixology.com, k2french.com, k2pokemon.com) redirects to its mode on k2kanji.com. ## Comparisons - [K2 vs Anki](https://k2kanji.com/vs/anki): scheduled review dates and an overdue backlog, against rejection sampling with no due dates and a pool that grows on its own - [K2 vs WaniKani](https://k2kanji.com/vs/wanikani): a fixed level-by-level kanji curriculum with mnemonics, against an adaptive pool that expands when the current kanji have cooled ## The K2 algorithm - Each item holds `p` in [0.001, 1.0], starting at 0.5. - Correct: `p / 2` (the item cools). Incorrect: `p * 2` (it heats up). Competence moves by ln(2) per answer. - A *hinted* correct — answered with the reading/pinyin crutch visible — cools by sqrt(1/2) instead, a deliberately weaker reward. It is the one intentional break in the halve/double symmetry and never counts toward earned mastery. - Selection: pick a random item from the active pool, roll r in [0,1), accept if r < p, else retry. An item is therefore drawn in proportion to its `p`. - Pool expansion: judged on the active frontier only (items with p >= 0.1). When that frontier's average p drops below 0.15, a batch of 5-10 new items enters at p = 0.5 — the reheating step, keeping the learner near a flow boundary. - No dates, no queue, no per-item scheduling state beyond `p` and its counters. ## Data provenance The kanji dataset is generated from KanjiAPI.dev (1,006 Kyouiku kanji, grades 1-6), with meanings ordered by KANJIDIC2 (EDRDG, CC BY-SA 4.0). Cube algorithms come from JPerm and SpeedCubeDB, and every algorithm in the sets is machine-verified to solve its case by a cube simulator in CI. French audio links point at Wikimedia Commons. ## Contact - [Website](https://k2kanji.com) - Creator: Erik Bethke