learn-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LEARN_MCP_PROJECT | No | Which project the test learner belongs to. Defaults to the folder the server starts in. | |
| LEARN_MCP_KEY_HELP | No | For a tool that starts this server its own way: the words that tell a developer with no key how to add one. | |
| LEARN_MCP_MAX_TURNS | No | Test turns per server start, at most 10. | 2 |
| LEARN_MCP_STATE_DIR | No | Where the test learner and session ids are kept. | ~/.foreverlearning/learn-mcp |
| FOREVERLEARNING_API_KEY | No | Your Learn API server key. Without it, only the docs tools work. | |
| FOREVERLEARNING_BASE_URL | No | The Learn API host. | https://developers-api.foreverlearning.ai/v1 |
| LEARN_MCP_CONFIRM_DIALOG | No | Set to off to skip the confirmation dialog; your assistant still asks first. | on |
| FOREVERLEARNING_ASSIGNMENT_ID | No | Your Learn assignment, if your key has more than one. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server carries the Learn API's own developer documentation (snapshot of 2026-11-26), so you can build with the Learn API without guessing. The Learn API is a learning system that teaches: a learner gets a hint toward their next step, not the answer.
learn_kits and learn_kit: the Build with Learn kits. Each kit's prompt is verified as written, with a check of what the finished app shows. When the developer wants a tutor, tutoring help or learning help in an app, start with learn_kits, then follow the matching kit's prompt as written.
learn_guide and learn_contract: the integration guide, its runnable examples and the OpenAPI contract. Use only what they describe. If they do not answer something, say so; never invent an endpoint, field or behaviour.
learn_test_turn: one real test turn with the developer's own key, for a quick check. It costs one of the workspace's free test attempts (they never reset) or, on a live key, 5¢ per turn that succeeds. Ask the developer before each one. Show Learn's reply exactly as written. learn_lookup_request looks up a turn that was not confirmed, free.
The developer's key stays in their environment. Never ask them to paste it into the conversation, and never write it into a file, a page or a command.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| learn_guideA | Read the Learn API integration guide (snapshot of 2026-11-26), whole or by topic, or one of its runnable examples. Use it for any question about building with the Learn API: preparing a session, the four kinds of help, sending a turn and accepting it only on its final done event, the safety status, receipts, errors and recovery. Answer only from what it says; if it does not cover something, say so instead of guessing. Topics: access, setup, display-name, learner, learner-id, controls, diagnostic, files, turn, safety, team, receipts, timing, saved, open-session, recovery, errors, privacy, price, examples. Examples: README.md, prepare.mjs, quest.ts, quest.py, quest.sh, server.ts. |
| learn_contractA | Read the Learn API contract (OpenAPI 3.1 and JSON Schema, snapshot of 2026-11-26). With no arguments: every operation, by method, path and operationId. With operation (an operationId such as "developerChat", or "POST /v1/chat"): that operation with every schema it uses filled in. With file: one whole contract file (large). Use only fields the contract defines. |
| learn_kitsA | List the Build with Learn kits: step-by-step builds with the Learn API, from a first tutor page to embedding Learn in an existing app. Each kit has a prompt for coding assistants that is verified as written, a check of what the result should show, and a finished checkpoint folder. Start here when the developer wants to add tutoring, a tutor, homework help or learning help to an app with the Learn API. |
| learn_kitA | Read one Build with Learn kit: where to run it, its verified prompt word for word, its check (what the finished app shows, with a real reply), and its finished checkpoint folder in learn-tutor-starter. Kits: 01-first-tutor, 02-four-kinds-of-help, 03-photos-of-work, 04-remember-the-learner, 05-safety-status, embed. |
| learn_starter_fileA | Read one file of a kit's finished checkpoint folder in learn-tutor-starter (MIT), to compare with or start from. learn_kit lists each folder's files. |
| learn_test_turnA | Send ONE real test turn to the Learn API with the developer's own key (from this server's environment), as one stable test learner for this project, and return Learn's reply exactly as written (both parts), its safety status and its receipt. Cost: in test mode each turn uses 1 of the workspace's free test attempts (for the life of the workspace, never reset); with a live key, 5¢ per turn that succeeds, and a live key is refused unless allow_live is true. Preparing the session is free; the session is never ended by this tool. First call it without confirm to see the exact cost, tell the developer, and call again with confirm: true only after they agree in the conversation. At most 2 turns per server run. It never retries: if a turn is not confirmed, use learn_lookup_request with the request id it returns. Show Learn's reply to the developer exactly as written; never paraphrase, summarize or correct it. |
| learn_lookup_requestA | Look up a Learn request by its request id (GET /v1/requests/), as this project's test learner. Free: it never generates a reply. Use it after a test turn that was not confirmed, before sending anything again. It returns the committed reply word for word, or says the request is still running or unavailable. Show a committed reply exactly as written. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| first-tutor | The verified Build with Learn prompt for "Your first tutor in ten minutes", word for word. Where to run it: Open a new, empty folder in your coding assistant, with your key in `FOREVERLEARNING_API_KEY` and the API host in `FOREVERLEARNING_BASE_URL` in the environment it runs commands in, and paste the prompt. The assistant needs to read web pages and run commands. |
| embed-learn | The verified Build with Learn prompt for "Embed Learn in your app", word for word. Where to run it: Open your own product's repository (to try it on our sample, the `embed/start` folder of `learn-tutor-starter`) in your coding assistant, with your key in `FOREVERLEARNING_API_KEY` and the API host in `FOREVERLEARNING_BASE_URL` in the environment it runs commands in, and paste the prompt. The assistant needs to read web pages and run commands. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| learn-guide | The whole Learn integration guide, snapshot of 2026-11-26. |
| learn-snapshot | When the bundled docs were taken, from where, and which kits they include. |
| guide-access | |
| guide-setup | |
| guide-display-name | |
| guide-learner | |
| guide-learner-id | |
| guide-controls | |
| guide-diagnostic | |
| guide-files | |
| guide-turn | |
| guide-safety | |
| guide-team | |
| guide-receipts | |
| guide-timing | |
| guide-saved | |
| guide-open-session | |
| guide-recovery | |
| guide-errors | |
| guide-privacy | |
| guide-price | |
| guide-examples | |
| learn.openapi.json | |
| learn-v1.schema.json | |
| developer-runtime.openapi.json | |
| developer-runtime.schema.json | |
| example-README.md | |
| example-prepare.mjs | |
| example-quest.ts | |
| example-quest.py | |
| example-quest.sh | |
| example-server.ts | |
| 01-first-tutor-prompt | |
| 02-four-kinds-of-help-prompt | |
| 03-photos-of-work-prompt | |
| 04-remember-the-learner-prompt | |
| 05-safety-status-prompt | |
| embed-prompt | |
| 01-first-tutor-check | |
| 02-four-kinds-of-help-check | |
| 03-photos-of-work-check | |
| 04-remember-the-learner-check | |
| 05-safety-status-check | |
| embed-check |
TDQS
Scored across 7 tools
Each tool has a recognizably distinct job: narrative guide, OpenAPI contract, kit list, single kit, checkpoint file, live test turn, and request lookup. The main soft spots are the learn_kits/learn_kit pair (list vs. one) and the guide vs. contract readers, which could be confused at a glance, though both descriptions explicitly scope themselves. No two tools actually do the same thing.
All names share a learn_ prefix in snake_case, which is predictable. However the set mixes noun-resource names (learn_guide, learn_contract, learn_kits) with verb-led action names (learn_test_turn, learn_lookup_request), and learn_kit vs. learn_kits differ by a single character, which is a real typo/misselection hazard despite the consistent style.
Seven tools is well within the sweet spot and each one covers a separate facet of the workflow: read docs, read contract, browse kits, read a kit, read a checkpoint file, run a real turn, recover a turn. Nothing looks padded or missing at the count level.
The surface covers the full 'learn by reading + verify with a real turn' loop, including the important recovery path (learn_lookup_request) after an unconfirmed turn. Minor gaps remain: there is no way to explicitly prepare or end a session, no search across the guide beyond fixed topic keys, and the 2-turn cap per run means iterative testing is not fully supported.