learn-mcp
Click on "Deploy 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., "@learn-mcp add a tutor to this app using the first-tutor kit"
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.
Learn API for coding assistants
Give your coding assistant the Learn API's own guide, contract and verified Build with Learn kits, plus a test turn with your own key.
@foreverlearning/learn-mcp is an MCP server. Ask your assistant to "add a tutor to this app", and it can read how the Learn API works, follow a kit whose prompt we verify before we publish it, and send one test turn with your key to show you Learn's reply.
What your assistant gets
Tool | Needs your key | What it does |
| no | The Build with Learn kits: each kit's prompt word for word, what the finished app should show, and its finished checkpoint folder. |
| no | The Learn integration guide, whole or by topic, and its runnable examples. |
| no | The OpenAPI contract: every operation, or one operation with its schemas filled in. |
| no | One file of a kit's checkpoint folder in |
| yes | One real test turn, with the cost stated first and your agreement required. |
| yes | Looks up a turn by its request id. Free. |
It also offers two prompts, first-tutor and embed-learn (the verified prompts for "Your first tutor in ten minutes" and "Embed Learn in your app"), and the guide, contract, examples and kit files as resources.
Related MCP server: niblet
Before you start
Node 24 or later.
For test turns: a developer workspace with Learn and a server key from My APIs in the developer console. The docs tools need no key.
Put your key in your environment, not in a config file you commit:
export FOREVERLEARNING_API_KEY=... # your server key
export FOREVERLEARNING_BASE_URL=https://developers-api.foreverlearning.ai/v1
# export FOREVERLEARNING_ASSIGNMENT_ID=... # only if your key has more than one Learn assignmentTo test on staging, set FOREVERLEARNING_BASE_URL=https://developers-api-staging.foreverlearning.ai/v1.
Install
The server reads the key from the environment it starts in. Each tool below passes your environment's variables through to it.
Claude Code
claude mcp add learn -- npx -y @foreverlearning/learn-mcpOn Windows (not WSL), wrap npx: claude mcp add learn -- cmd /c npx -y @foreverlearning/learn-mcp.
To share it with your team in the project's .mcp.json, without the key:
{
"mcpServers": {
"learn": {
"command": "npx",
"args": ["-y", "@foreverlearning/learn-mcp"],
"env": {
"FOREVERLEARNING_API_KEY": "${FOREVERLEARNING_API_KEY}",
"FOREVERLEARNING_BASE_URL": "${FOREVERLEARNING_BASE_URL:-https://developers-api.foreverlearning.ai/v1}"
}
}
}
}Codex
codex mcp add learn -- npx -y @foreverlearning/learn-mcpThen let the variables through, in ~/.codex/config.toml:
[mcp_servers.learn]
command = "npx"
args = ["-y", "@foreverlearning/learn-mcp"]
env_vars = ["FOREVERLEARNING_API_KEY", "FOREVERLEARNING_BASE_URL", "FOREVERLEARNING_ASSIGNMENT_ID"]Cursor
In .cursor/mcp.json (this project) or ~/.cursor/mcp.json (every project):
{
"mcpServers": {
"learn": {
"command": "npx",
"args": ["-y", "@foreverlearning/learn-mcp"],
"env": {
"FOREVERLEARNING_API_KEY": "${env:FOREVERLEARNING_API_KEY}",
"FOREVERLEARNING_BASE_URL": "${env:FOREVERLEARNING_BASE_URL}"
}
}
}
}VS Code
In .vscode/mcp.json, VS Code asks for the key once and keeps it out of the file:
{
"inputs": [
{ "type": "promptString", "id": "learn-key", "description": "Learn API server key", "password": true }
],
"servers": {
"learn": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@foreverlearning/learn-mcp"],
"env": {
"FOREVERLEARNING_API_KEY": "${input:learn-key}",
"FOREVERLEARNING_BASE_URL": "https://developers-api.foreverlearning.ai/v1"
}
}
}
}Any other MCP client
Run npx -y @foreverlearning/learn-mcp as a stdio server, with FOREVERLEARNING_API_KEY and FOREVERLEARNING_BASE_URL in its environment.
Docs only, no key
npx -y @foreverlearning/learn-mcp --docs-only serves the docs tools and sends no turns. learn-mcp --http --port 8787 serves the same over Streamable HTTP at http://127.0.0.1:8787/mcp.
Test turns: what they cost
Test mode: each test turn uses one of your workspace's 50 free test attempts. They last for the life of the workspace, are shared by all its keys, and never reset. A turn that fails after it is sent also uses one.
Live mode: 5¢ per turn that succeeds, from your balance. A turn that fails costs nothing. The server refuses a live key unless you tell your assistant to use it.
Before every turn, your assistant shows you the cost and asks. Where your coding tool supports it, you also confirm in a dialog.
At most 2 test turns each time the server starts. Set
LEARN_MCP_MAX_TURNS(up to 10) for more.One test learner per project. The server keeps one pseudonymous learner and one session for each project folder, so repeated testing adds no new learners and opens no new sessions. It never ends the session and never sends a turn twice. If a turn is not confirmed, it gives you the request id to look up, free.
Preparing a session, looking up a request and every docs tool are free.
Your assistant shows Learn's reply exactly as written: what the tutor says, and the hint to work on.
Your key
Your key stays in your environment. The server sends it only to the Learn API, never shows it in a reply or an error, and never writes it to a file. Never paste it into a conversation.
The server keeps its test learner and session ids (never the key) in ~/.foreverlearning/learn-mcp/state.json.
Settings
Variable | Default | What it does |
| none | Your server key. Without it, only the docs tools work. |
|
| The API host. |
| none | Your Learn assignment, if your key has more than one. |
|
| Test turns per server start, at most 10. |
| on |
|
|
| Where the test learner and session ids are kept. |
| the folder the server starts in | Which project the test learner belongs to. |
| none | For a tool that starts this server its own way: the words that tell a developer with no key how to add one. |
The docs inside
The guide, contract, examples and kits are a dated snapshot of the developer site, bundled with each release of this package. The learn://snapshot resource says when it was taken. The live guide is always at https://developers.foreverlearning.ai/docs/learn/.
Develop
npm ci
npm test # unit tests against a mocked Learn API
npm run build
node scripts/snapshot.mjs --kits <kits folder> # refresh the docs snapshotLicense
MIT. See LICENSE.
Available Tools
7 toolslearn_contractLearn API contractARead-onlyIdempotent
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.
Inputs: file, operation.
learn_guideLearn integration guideARead-onlyIdempotent
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.
Inputs: topic, example.
learn_kitOne Build with Learn kitARead-onlyIdempotent
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.
Inputs: kit (required).
learn_kitsBuild with Learn kitsARead-onlyIdempotent
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.
Inputs: no named parameters.
learn_lookup_requestLook up a Learn requestARead-onlyIdempotent
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.
Inputs: request_id (required).
learn_starter_fileA file from a kit checkpointARead-onlyIdempotent
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.
Inputs: kit (required), path (required).
learn_test_turnSend one 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.
Inputs: kind, confirm, message, opening, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
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.
Maintenance
Related MCP Connectors
Gemmein docs, API reference, error explainers and a live integration check for coding agents.
Serves your design system and coding standards to coding agents, so they stop guessing.
Paid technical intelligence for developers and AI agents. USD 0.001 per successful atomic query.
Read-only search over the Vocenya AI receptionist API docs and endpoints, with code samples.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI assistants to search API documentation, retrieve endpoint details, get SDK snippets, and check changelogs from an OpenAPI spec.7112 npm4MIT
- AlicenseNot gradedqualityAmaintenanceGives coding agents real product screen references, fonts, icons, and recorded design-system details so UI can be built from an actual catalogue instead of a generic template. It also serves bundled design-workflow resources, prompts, and connection diagnostics, optionally without any token.MIT
- AlicenseAqualityBmaintenanceEnables AI coding agents to set up the kit and build pages with it by serving each release's own docs data: searching and describing components, producing install code for a given setup, returning class and content conventions, and checking pages for unknown classes, hooks and missing files. It reads only public docs, with no sign-in or stored data.5527 npmBSD 3-Clause

HopBase MCP serverofficial
AlicenseNot gradedqualityCmaintenanceEnables coding agents to inspect, with a scoped API key, which models and limits are available, search documentation, and check balance, key details, and usage in a read-only way.MIT