MCP (AI assistant access)
Connect Claude.ai, Claude Desktop, Claude Code, Cursor or another MCP client to your LearnBuilder account so the assistant can read and build courses and look up learner progress for you.
LearnBuilder exposes its API over the Model Context Protocol (MCP) — an open standard for letting AI assistants call tools on external systems. Once you connect an MCP client (Claude.ai, Claude Desktop, Claude Code, Cursor or any client that supports remote MCP servers), the assistant can answer questions like "How many learners completed the Phishing 101 course this month?", draft courses and lessons, and add interactive embeds, by calling LearnBuilder tools directly.
What the assistant can do today
The MCP server ships with tools across reads, writes, and AI generation. Every tool is scoped to the account that owns the API key — an assistant can never see or touch data from other accounts.
Read
| Tool | What it does |
|---|---|
list_courses | List courses in your account, filterable by status (draft / published / archived) |
get_course | Fetch a single course: its settings, start and end dates, access, and its lesson list (each lesson says whether learners can see it) |
list_lessons | List the lessons inside one course |
get_lesson | Fetch a lesson with its full block content (text, video, quiz, interactive, etc.). Returns the copy you see in the lesson editor — the unpublished draft on a published course — and says which; pass version: "live" for what learners see |
list_enrollments | List learner enrollments, filterable by course, user, or status |
get_learner_progress | Fetch a learner's progress, optionally scoped to one course |
get_block_formats | The JSON format and authoring rules of every block type: the ones LearnBuilder's lesson generator writes, with the rules it follows, and the ones you add by hand — documents, assignments, discussions, live sessions, the tutor, audio and 360° images. The assistant reads it before writing blocks |
Write
| Tool | What it does |
|---|---|
create_course | Create a new draft course, optionally with its settings, dates and access |
update_course | Change a course's title, description, status, access (visibility, enrolment password, guest preview), start and end dates, or settings — language, audience, tone, image style, lesson length, learner AI, tutor, personal practice, sequential order, certificate, video protection and the start/end notices. The same checks apply as in Course settings (for example, the end must be after the start, and the tutor needs learner AI) |
delete_course | Permanently delete a course with its lessons, enrollments and learner progress |
add_lesson | Append an empty lesson to a course, optionally with the date and time it opens for learners. Learners see it once it has published content |
update_lesson | Change a lesson's title, performance outcome or order, hide it from learners, set the date and time it opens for learners, or set its personal practice and sequential order |
delete_lesson | Permanently delete a lesson with its learner progress, comments and version history |
publish_lesson | Make a lesson's unpublished draft live for learners (the previous live version is kept in its history) |
discard_lesson_draft | Throw away a lesson's unpublished draft |
add_block | Add a block to a lesson: text, quiz, workbook, drag and drop, accordion, process flow, AI dialogue, a complete interactive slideshow (screens, clickable elements, decisions, scoring) and every other block type. Unknown block types are refused, missing ids are added, and image placeholders are turned into images in the background (billed to your account as in the editor) |
update_block | Change one block; it is checked the same way. Workbook answers stay attached: a field keeps its key when it is edited |
remove_block | Remove one block from a lesson |
add_embed | Add a custom embed — an interactive web page (simulation, calculator, game) as HTML, CSS and JavaScript. The tool description tells the assistant how embeds run and how to report a score, so the result works in the lesson |
update_embed | Change an embed's code or settings; fields you leave out are kept |
upload_file | Store a file in your account so a block can use it: from a public link that downloads the file without signing in (PDF, Word, Excel, PowerPoint, images, audio, ZIP; up to 25 MB), or text the assistant wrote itself, saved as .md, .txt or .csv (a template, a checklist, a table). The result goes into a documents block, an image or an audio block |
create_upload_link | For files on your computer: returns a link that works for 30 minutes. You open it and drop the files in, and they land in the documents block it was made for (no sign-in needed, so don't pass the link on). An assistant with a shell, such as Claude Code, can send a local file to the link itself. Same file types and 25 MB limit as upload_file. Made for a SCORM block, the link takes one SCORM package (.zip, up to 200 MB) instead |
enroll_learner | Enroll a user in a course (idempotent — returns existing enrollment if already enrolled) |
unenroll_learner | Delete an enrollment |
Links. Course and lesson results carry editorUrl (opens it in the editor) and learnerUrl (what learners open), built from the address your assistant connected to — so on a private installation the links point there. A draft course's learner link works for learners once the course is published; until then it opens only for people who edit the course. Ask the assistant "give me the link to …" and it can answer directly.
Lesson edits follow the editor's draft rule. On a course that is not published yet, add_block, update_block, remove_block, add_embed, update_embed and update_lesson change the lesson directly, just like the editor. On a published course they change the lesson's draft, which you see in the editor right away while learners keep the published version until you publish it — in the editor or with publish_lesson. Each write tool says where it saved (savedTo: "draft" or "live"). A lesson's position (order) always applies at once.
Generation
| Tool | What it does |
|---|---|
generate_course_from_prompt | Lets the AI propose a course (title, description, tags, learning objectives, optional story and main character) and creates it as a draft. Billed to your account like the course wizard. Synchronous, 60 s cap. Returns the new courseId so you can continue with add_lesson and add_block. |
generate_block | Runs one of LearnBuilder's own generators for a block, in the background, billed to your account as in the editor: an interactive slideshow or embed from its brief (the same generator as Generate in the editor, with its quality checks and images; a few minutes, up to about 15 for a long deck), narration for an audio block from its script (seconds), or a video: a talking head from a script and a presenter portrait, a wordless scene clip, or a two-person conversation (several minutes). get_lesson lists the block under generating until it is done. A block that already has its result is only regenerated with replace: true. |
set_course_cover | Sets the picture on the course card and at the top of the course page: generated from a description in the course's image style (billed like an image in the editor), or taken from an image already in your account or a public link. |
What the assistant can build
The assistant writes complete lessons itself: it reads the format of each block type with get_block_formats and adds the blocks with add_block. That covers every block type, including interactive slideshows with several screens, clickable elements, branching decisions and scoring, and custom embeds with add_embed. Everything it writes opens in the editor like a block you built there, and you can change it there afterwards.
Files, hand-ins and discussions. The assistant can add a documents block (slides, templates, readings), an assignment (learners hand in text, a file or a recording, and you review it), a discussion and a live session. A file reaches a documents block in one of three ways: the assistant stores it with upload_file from a public link, writes it itself as text, or — for a file on your computer — adds the block and gives you an upload link (create_upload_link): open it, drop your slides in, and they appear in the block. A file cannot travel through the chat itself, because an assistant can only send text to LearnBuilder. A documents block without files is not shown to learners.
SCORM packages. A package exported from Articulate, iSpring, SmartBuilder or another authoring tool comes in the same way: the assistant adds a SCORM block and gives you an upload link for it. Drop the .zip in (up to 200 MB) and it is checked like an upload in the editor (imsmanifest.xml, launch file, SCORM 1.2 or 2004) and put into the block; a package already there is replaced. Learners don't see the block until it has a package. Only owners, admins, creators and editors of the workspace can add packages. Placing markers on a 360° image stays in the editor.
For an interactive slideshow or an embed, the assistant can also write a brief instead, a screen-by-screen plan of what the learner sees and does, and hand it to LearnBuilder's own generator with generate_block. The same tool speaks an audio block's script and makes the video for a video block: a talking head needs a script and a presenter (a cast member with a portrait, the course's main character, or an image of one person). Until a block is generated it stays empty, and learners don't see it.
One generator still runs only in the editor:
- One-click lesson generation from the course page, with its quality checks and images.
Requirements
- Business plan. MCP is part of the Business plan, whichever way you connect. A connection stops working if the account leaves the plan.
- An AI client that supports remote MCP servers (Streamable HTTP). Claude.ai, Claude Desktop, Claude Code, Cursor and most current MCP clients do.
Your MCP address
Open Account settings → REST API & SCIM. The MCP endpoint is shown above the API keys, for example https://learnbuilder.org/api/mcp. Copy it; every client below needs it.
Connect a client
There are two ways to authenticate:
- Sign in (OAuth). The client sends you to LearnBuilder, you sign in, pick the account and click Allow. Nothing to copy. Use this whenever your client offers it.
- API key. Create an
lb_ak_…key and give it to the client as a Bearer token. For scripts and clients without sign-in.
Both give the assistant the same tools, scoped to one account.
Claude.ai and Claude Desktop
- Open Settings → Connectors → Add custom connector.
- Name it
LearnBuilderand paste your MCP address as the server URL. There is no client ID or secret to fill in: Claude registers itself with LearnBuilder. - Click Connect. Claude opens LearnBuilder in your browser. Sign in if needed, pick the account and click Allow.
- Back in Claude, the LearnBuilder tools are available in new conversations. Turn them on in a chat from the tools menu if needed.
A connector you add in Claude.ai also appears in Claude Desktop on the same Claude account.
Claude Code
Add the server from your terminal:
claude mcp add --transport http learnbuilder https://learnbuilder.org/api/mcp
Then start Claude Code, run /mcp, choose learnbuilder and authenticate. Your browser opens LearnBuilder's sign-in and consent page.
To use an API key instead (for example on a server without a browser):
claude mcp add --transport http learnbuilder https://learnbuilder.org/api/mcp --header "Authorization: Bearer lb_ak_your_key"
Use your own LearnBuilder address if you run a private installation.
Cursor and other clients
Add a remote MCP server with your MCP address. If the client supports OAuth for remote servers, it opens LearnBuilder's sign-in page; otherwise add the header Authorization: Bearer lb_ak_your_key. In Cursor, for example, in mcp.json:
{
"mcpServers": {
"learnbuilder": {
"url": "https://learnbuilder.org/api/mcp",
"headers": { "Authorization": "Bearer lb_ak_your_key" }
}
}
}
Create an API key
- Open Account settings → REST API & SCIM.
- Click Create Key and give it a name you will recognise later.
- Copy the key now. It starts with
lb_ak_and is shown only once.
Disconnecting
- API key: revoke it in Account settings → REST API & SCIM. It stops working at once.
- Sign-in (OAuth): remove the connector in your AI client. A sign-in connection also ends on its own after 30 days without use. To cut one off from LearnBuilder's side, contact support; there is no button for it yet.
Security notes
- API keys are stored hashed at rest — LearnBuilder never persists the raw key.
- Revoke a key at any time from Account settings → REST API & SCIM. Revocation is immediate.
- Every tool call is scoped to the account you connected. There is no way for a tool to read or modify another account's data.
- An API key's Last used time shows when an assistant last called LearnBuilder with it — handy for spotting unfamiliar activity.
What to ask the assistant
A few prompt starters to try once you're connected:
- "List the published courses in my LearnBuilder account, sorted by most recently updated."
- "Show me the lesson structure of the course called 'Phishing 101'."
- "How many learners are enrolled in 'Compliance Training' and what's the average progress?"
- "For learner X, summarise their completion across all the courses they're enrolled in."
- "Generate a draft course titled 'GDPR Essentials for support teams', then add four lessons covering scope, lawful bases, data subject rights, and breach handling."
- "Archive every course that's been in draft for more than 90 days and hasn't had any enrollments."
Because the assistant gets the live data back, the answers reflect your account exactly as it is now — no stale export, no copy-paste step.