
LearnWorlds
io.github.ohnebenPublished by GitHub account ohnebenv1.1.2Updated Oct 24, 2026
All 94 LearnWorlds LMS API endpoints as safety-categorized MCP tools (read/write/destructive).
Overview
Exposes all 94 LearnWorlds LMS API endpoints as safety-categorized MCP tools so an assistant can read and manage courses, users, enrollments and payments.
- What you can do
- Read school data: users, courses, bundles, enrollments, payments, subscriptions, coupons, certificates, seats, affiliates, community, reporting and event logs
- Create and update records such as users, enrollments, coupons, groups and user progress
- Delete records such as users, community items, seats, groups and certificates
- Each tool carries a read-only, write or destructive banner plus MCP annotations, and descriptions state side effects, returns and error codes
- When to use it
- Useful when you administer a LearnWorlds school and want an assistant to answer questions about users, revenue and course completion, or to make routine changes like creating a user, enrolling them or issuing a coupon, without leaving the chat.
- Requirements
- A LearnWorlds school with API access: LEARNWORLDS_BASE_URL, LEARNWORLDS_API_TOKEN and LEARNWORLDS_CLIENT_ID, all required. Runs locally via Docker (prebuilt image) or Node.js 18 or later from source; stdio or Streamable HTTP transport. For HTTP beyond loopback, MCP_AUTH_TOKEN is required.
Installation
In SourceWeft
- Open LearnWorlds in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
ohneben's LearnWorlds MCP
License & checks
MCP registries
[MCP Registry] [Listed on mcpservers.org] [Learnworlds-MCP MCP server]
Run your LearnWorlds school in plain language from AI assistants like Claude, Cursor, and any other MCP client.
This Model Context Protocol server exposes the LearnWorlds public API — all 94 endpoints, generated straight from the OpenAPI spec into MCP tools. Every tool is safety-categorized (🟢 read-only / 🟡 write / 🔴 destructive) so your assistant knows what an action does before it calls it. It runs over stdio (Claude Desktop and other local launchers) or Streamable HTTP (hosted in Docker), and ships with retries, client-side rate limiting, and request timeouts so it holds up against a live school.
Why you'll want this
Some MCP servers just forward an API. This one is built to be safe to hand to an LLM and easy to run for real:
How it compares
At the time of writing this appears to be the only dedicated LearnWorlds MCP server. You could instead point a generic OpenAPI→MCP wrapper at the spec — here's what that leaves on the table:
*Generic OpenAPI→MCP wrappers turn any Swagger/OpenAPI spec into MCP tools. They can reach the same endpoints, but treat every operation identically — no safety categories, no resilience, no deployment story, and no guardrails tuned for live school data. "➖" = varies by tool / not guaranteed. Snapshot from July 2026.
What you can do
Once it's connected, ask your assistant things like:
- "List the 10 most recent users who signed up this month."
- "Create a user for [email protected] and enroll her in the 'Pro' bundle."
- "Show me this month's payments and total revenue."
- "Which users haven't completed the 'Onboarding' course yet?"
- "Create a 20%-off coupon for the annual subscription plan."
- "Pull completion analytics for our top 5 courses."
Tools are generated automatically from the API and grouped into 🟢 read-only, 🟡 write, and 🔴 destructive — so a well-behaved host can treat each group differently.
How it works
The server parses the bundled OpenAPI spec into MCP tools (resolving $refs and
guarding against recursive schemas), tags each with its safety category, and injects
your bearer token and Lw-Client header on every outgoing request. Your credentials
stay in the server's environment — the model never sees or handles them.
Requirements
- A LearnWorlds school with API access — an access token and a Client ID (admin → Settings → Integrations → Developers), plus your school's API base URL. See Get your API credentials.
- Docker (Docker Desktop on macOS/Windows) for the quick start below — or Node.js ≥ 18 to run from source.
Quick start (Docker)
1. Add your credentials. Copy the example config and fill it in:
2. Start the server:
The bundled docker-compose.yml binds to 127.0.0.1:8765 only, so the server is
reachable from your machine but not the network.
3. Confirm it's running:
4. Connect your MCP client. The MCP endpoint is http://localhost:8765/mcp.
-
Claude Desktop — add a custom connector (Settings → Connectors) pointing at the URL, or bridge it locally with
mcp-remote. Add this undermcpServersin your config, then fully quit and reopen the app:(Drop the
--headerline if you leftMCP_AUTH_TOKENempty.) -
Claude Code — one command:
-
Claude Cowork — shares Claude Code's MCP config, so the command above makes the tools available there too.
Prefer a prebuilt image?
Every push to main publishes a ready-to-run image to the GitHub Container Registry,
so you can skip the local build entirely:
Get your API credentials
- Log in to your LearnWorlds school admin.
- Go to Settings → Integrations → Developers (the API screen).
- Copy your Access Token →
LEARNWORLDS_API_TOKEN, and your Client ID →LEARNWORLDS_CLIENT_ID. - Set
LEARNWORLDS_BASE_URLto your school's API base:https://<your-school>.learnworlds.com/admin/api. If your school uses a custom domain, use that host instead (e.g.https://academy.example.com/admin/api).
Put all three in .env. The server injects them on every request, so your assistant
never sees them.
Configuration
Everything is set in .env (copied from .env.example):
After changing .env, reload with docker compose up -d --force-recreate.
Tool safety categories
Each tool's description starts with one of these banners and carries the matching MCP annotations:
The 🟡 write tools total 27 (17 create + 10 update). Hosts that respect annotations
(Claude included) can require confirmation for destructiveHint tools and trust
readOnlyHint tools automatically.
Under the banner, every description follows the same layout so an agent can act on the first read instead of probing:
Run
npm run list-tools(no credentials needed) to print the full catalog and the per-category counts at any time.
Coverage by area (read / write / delete)
Run from source (stdio, no Docker)
Prefer the classic stdio mode for Claude Desktop? Build it locally:
Then point Claude Desktop at the compiled entrypoint in claude_desktop_config.json:
Keeping the spec current
The bundled spec/learnworlds-openapi.yaml is the source of truth for the tools. To
refresh against a newer API version, drop the new YAML in its place (or point
LEARNWORLDS_OPENAPI_PATH at it) and rebuild:
New paths become new tools automatically — no code changes needed.
Development
CI builds and tests every push across Node 20 and 22; pushes to main also publish a
Docker image to the GitHub Container Registry. When the version in server.json is one
the official MCP Registry does not yet list, that same run also publishes it there.
Notes & conventions
- Transports:
MCP_TRANSPORT=stdio(default) for local launchers;MCP_TRANSPORT=httpfor the always-on Streamable-HTTP server the Docker image runs. - Paging: most
gettools acceptpage(and endpoint-specific filters); LearnWorlds paginates list responses (commonly 20–50 items per page). - Rate limit: LearnWorlds allows 30 requests / 10 s; the server self-throttles at
LEARNWORLDS_MAX_REQUESTSperLEARNWORLDS_RATE_WINDOW_MS(default 25 / 10 s) and retries any429it still receives. - Request bodies: write tools take a
bodyargument; its schema is resolved from the spec and shown to the model.
Security
- Your API credentials live only in
.env, which is git-ignored. Never commit real secrets. If the token leaks, rotate it in LearnWorlds admin → Settings → Integrations → Developers (API). - The HTTP endpoint requires a token as soon as it is bound beyond loopback.
Without
MCP_AUTH_TOKENthe server refuses to start and the error explains what to do. Send it as anAuthorization: Bearer <token>header, ideally behind TLS. - On localhost too: without a token the
Hostheader is restricted to localhost names, so no web page can reach the endpoint via DNS rebinding. A loopback bind alone is not protection. Behind a reverse proxy, setMCP_ALLOWED_HOSTS. - Behind a reverse proxy, pin the
Hostheader in the proxy to the internal upstream name and put exactly that intoMCP_ALLOWED_HOSTS. The check then does not depend on the public domain and survives a domain change. (Tip from @WinFuture23.) /healthsits behind the Host check but in front of the token check, so a platform health check needs no token. It additionally acceptslocalhost,127.0.0.1and[::1]at all times, so theHEALTHCHECKin the bundled Dockerfile keeps working when you pinMCP_ALLOWED_HOSTSto a public hostname. If your platform probes over HTTP from elsewhere, its hostname has to be in the list: Railway sendsHost: healthcheck.railway.app.
See SECURITY.md for the full policy and how to report a vulnerability.
Credits & license
An unofficial community integration for LearnWorlds; not affiliated with or endorsed by LearnWorlds. Built on the Model Context Protocol. Licensed under the MIT License.
Source: README.md at commit 980bdd1
Tools
0Version history
1- v1.1.2LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts