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

ToolWhat it does
list_coursesList courses in your account, filterable by status (draft / published / archived)
get_courseFetch a single course with its lesson list
list_lessonsList the lessons inside one course
get_lessonFetch a lesson with its full block content (text, video, quiz, interactive, etc.)
list_enrollmentsList learner enrollments, filterable by course, user, or status
get_learner_progressFetch a learner's progress, optionally scoped to one course

Write

ToolWhat it does
create_courseCreate a new draft course
update_coursePatch a course's title, description, status, visibility, or tags
delete_coursePermanently delete a course
add_lessonAppend an empty lesson to a course
update_lessonPatch a lesson's title, performance outcome, or order
delete_lessonPermanently delete a lesson
add_blockAppend a content block to a lesson (text / video / quiz / interactive / etc.)
update_blockPatch one block in a lesson
remove_blockRemove one block from a lesson
enroll_learnerEnroll a user in a course (idempotent — returns existing enrollment if already enrolled)
unenroll_learnerDelete an enrollment

Generation

ToolWhat it does
generate_course_from_promptCalls 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

  1. Open Account settingsREST API & SCIM.
  2. Click Create Key, give it a memorable name (e.g. "My Claude.ai assistant").
  3. 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)

  1. Open SettingsConnectorsAdd custom connector.
  2. Name: LearnBuilder.
  3. Server URL: paste the MCP endpoint URL.
  4. Authentication: Bearer token — paste your lb_ak_… key.
  5. 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 listlearnbuilder 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 settingsREST 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_at on 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.