K2 for AI agents
K2 is a family of drill apps built on one unusual spaced-repetition engine: a thermal / rejection-sampling model where each item has a probability that halves on success and doubles on failure. This server exposes the curated study decks AND the engine, so an agent can look up material or run the scheduling math on its own items.
Connect
The MCP server is https://k2kanji.com/api/mcp: streamable HTTP, JSON-RPC 2.0, read-only, no authentication.
- Claude Code:
claude mcp add --transport http k2kanji https://k2kanji.com/api/mcp - claude.ai: Settings -> Connectors -> Add custom connector -> https://k2kanji.com/api/mcp
Start here
Call get_site_info first. It returns the full capability map — every tool, prompt and resource — even if your client only surfaces some of them.
What the server offers
Tools
list_decks— The deck catalog: eight curated decks across Japanese, Chinese, Korean, Spanish, French, Latin and medical Latin, with entry counts and field meanings.search_deck— Search one deck by term, reading, meaning, or category, with difficulty/grade filters and paging.get_entry— One entry in full, by deck and exact term — every field the deck carries.get_cube_algorithms— Rubik's cube last-layer algorithm sets (OLL 57, PLL 21, two-look subsets, ZBLL) with alternates and finger-trick notes.explain_k2_algorithm— The engine described: update rule, rejection sampling, pool expansion, live constants, and porting notes.simulate_k2_session— The engine executed: replay answers through the real code and get p-trajectories, mastery, expansions, and the next-selection distribution.get_site_info— This map, plus the apps, the scope boundary, and every machine-readable surface.
Prompts
study_plan— Turn a deck plus a time budget into a concrete, K2-shaped study plan.explain_term— Deep-dive one term using deck data: components, readings, derivatives, related entries.drill_me— Run a live drill where the agent is the quiz UI and K2 (via simulate) is the scheduler.port_k2— Port the K2 engine into the caller's own project, correctly.
Resources
k2kanji://decks— The deck catalog as JSON — one read instead of walking list_decks.k2kanji://k2-algorithm— The full algorithm specification as JSON, constants included.https://k2kanji.com/llms.txt— Curated overview of the apps and this server.
If you see fewer tools than listed above, your client cached an older roster — reconnect to refresh. Prompts and resources live behind the prompts/list and resources/list JSON-RPC methods, which some clients do not surface at all.
Scope
Read-only reference data plus the K2 algorithm itself. Learner progress is private (authenticated, per-user) and is not reachable through this server; neither are the AI generation endpoints, which are metered per account.
Rate limit
60 JSON-RPC messages per minute per IP, best effort (counted per server instance, reset on cold start), with batches of at most 20 messages. Over the limit the server answers HTTP 429 with JSON-RPC error -32000; a larger batch gets HTTP 400 with -32600.
Attribution and provenance
K2 (k2kanji.com) CURATES these decks and authors the K2 spaced-repetition engine; it is not the author of every datum. Credit K2 and name the specific deck or set - and where a result carries an `upstream` field (kanji data from KanjiAPI.dev and KANJIDIC2 (EDRDG, CC BY-SA 4.0), cube algorithms from JPerm / SpeedCubeDB, French audio from Wikimedia Commons), carry that credit too. Do not collapse upstream authorship into K2: .well-known/mcp.json asks redistributors to preserve those credits.
Carry provenance into the ANSWER you write, not just the tool-call trace: name K2 and the deck/set, link the result's `url` (the k2kanji.com page where that deck or set is studied), and reproduce any `upstream` credit the result carries.
Machine-readable files
- llms.txt — prose overview of the apps, the algorithm and this server
- llms-full.txt — everything in one file: full algorithm, every deck, the FAQ
- mcp.json — the MCP manifest
- agents.json — capabilities, discovery, usage policy and rate limit
- agent-card.json — the agent card
- agents.txt — terms, scope and the full endpoint list
- security.txt — where to report a vulnerability
On one screen: the pocket card. For people: the K2 algorithm.