MCP (AI assistant access)
Connect Claude.ai, Claude Code, or any MCP-aware AI client to your LearnBuilder account so it can browse courses, lessons, and learner data on your behalf.
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 Code, or anything that speaks Streamable HTTP MCP), the assistant can answer questions like "How many learners completed the Phishing 101 course this month?" by calling LearnBuilder tools directly, without you having to copy/paste data.
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 with its lesson list |
list_lessons | List the lessons inside one course |
get_lesson | Fetch a lesson with its full block content (text, video, quiz, interactive, etc.) |
list_enrollments | List learner enrollments, filterable by course, user, or status |
get_learner_progress | Fetch a learner's progress, optionally scoped to one course |
Write
| Tool | What it does |
|---|---|
create_course | Create a new draft course |
update_course | Patch a course's title, description, status, visibility, or tags |
delete_course | Permanently delete a course |
add_lesson | Append an empty lesson to a course |
update_lesson | Patch a lesson's title, performance outcome, or order |
delete_lesson | Permanently delete a lesson |
add_block | Append a content block to a lesson (text / video / quiz / interactive / etc.) |
update_block | Patch one block in a lesson |
remove_block | Remove one block from a lesson |
enroll_learner | Enroll a user in a course (idempotent — returns existing enrollment if already enrolled) |
unenroll_learner | Delete an enrollment |
Generation
| Tool | What it does |
|---|---|
generate_course_from_prompt | Calls the AI prefill pipeline (course title, description, tags, objectives, optional story + character) and creates a draft course record with the result. Synchronous, 60 s cap. Returns the new courseId so you can iterate with add_lesson. |
generate_lesson_from_prompt(full lesson generation including blocks + images) is the most-requested follow-up. It runs as an SSE stream today and needs a careful wrapper to fit a synchronous MCP call — coming soon.
Requirements
- Business plan — MCP reuses the existing REST API key infrastructure, which requires Business or higher.
- An MCP-aware AI client that speaks Streamable HTTP — Claude.ai, Claude Code (remote), and most modern MCP clients support this. Claude Desktop currently requires a stdio proxy (see Claude Desktop below).
Connect a client
1. Generate an API key
- Open Account settings → REST API & SCIM.
- Click Create Key, give it a memorable name (e.g. "My Claude.ai assistant").
- Copy the key shown once on the next screen — it starts with
lb_ak_and will not be displayed again.
2. Grab the MCP URL
Just above the keys list you'll see your MCP endpoint URL — something like https://app.learnbuilder.com/api/mcp. Copy it.
3. Add the connection to your AI client
Claude.ai (web)
- Open Settings → Connectors → Add custom connector.
- Name:
LearnBuilder. - Server URL: paste the MCP endpoint URL.
- Authentication: Bearer token — paste your
lb_ak_…key. - Save. Start a new conversation; the LearnBuilder tools should appear in the tools panel.
Claude Code (remote)
In a Claude Code session, run:
/mcp add learnbuilder <your-mcp-url> --header "Authorization: Bearer <your-api-key>"
Verify with /mcp list — learnbuilder should show up with the read tools listed.
Claude Desktop
Claude Desktop currently speaks stdio MCP, not Streamable HTTP. Use a generic HTTP→stdio bridge such as mcp-remote:
{
"mcpServers": {
"learnbuilder": {
"command": "npx",
"args": ["-y", "mcp-remote", "<your-mcp-url>", "--header", "Authorization: Bearer <your-api-key>"]
}
}
}
Restart Claude Desktop and the tools will appear in the conversation's tools picker.
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 that owns the key. There is no way for a tool to read or modify another account's data.
- The assistant's tool calls are logged via
last_used_aton the key — 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.