Frappe LMS MCP Server
Integrates with Frappe LMS to allow AI agents to manage courses, chapters, lessons, quizzes, enrollments, batches, and certificates. Supports course creation, caching, and re-upload across multiple instances.
Click on "Install 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., "@Frappe LMS MCP Servercreate a new course called 'Web Development Basics'"
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.
Frappe LMS MCP Server
An MCP (Model Context Protocol) server that lets AI agents manage a Frappe LMS instance — create courses, chapters, lessons, quizzes, enrollments, batches, and certificates.
Designed for instructors and admins who want to build comprehensive course content using AI.
Features
39 MCP tools for managing Frappe LMS (courses, chapters, lessons, quizzes, enrollments, batches, certificates)
Web dashboard (FastAPI + Jinja2) on port 8080 for browser-based login and course browsing
SQLite database for connection storage, course caching, and audit logging
Dual authentication — API key/secret (token auth) or password (session auth fallback)
Course memory — auto-cache course specs on creation for cross-instance re-upload
Multi-instance — store multiple Frappe connections, switch between them
Audit trail — all operations logged to SQLite
Related MCP server: Moodle MCP Server
Architecture
┌─────────────────────────────────────┐
│ MCP Server Process (Python) │
│ │
AI Agent ────────►│ FastMCP (stdio) FastAPI (:8080) │
(ZCode, Claude, │ │ │ │
Codex, etc.) │ ▼ ▼ │
│ tools.py ◄──── Web Dashboard │
│ │ (login UI, │
│ │ course browser) │
│ ▼ │
│ client.py ◄── API Key/Secret │
│ │ (from SQLite) │
│ ▼ │
│ SQLite (frappe_lms.db) │
│ - connections: api_key, password │
│ - courses: id, title, spec_json │
│ - operations: audit log │
└───────┬─────────────────────────────┘
│
▼
Frappe LMS (localhost:8000)Project Structure
lms-mcp-tools/
├── pyproject.toml # Package config, deps, entry points
├── README.md
├── .env.example # Template credentials (safe to commit)
├── .gitignore
├── src/frappe_lms_mcp/
│ ├── __init__.py
│ ├── client.py # FrappeClient — REST API wrapper (dual auth)
│ ├── content_blocks.py # EditorJS block builders
│ ├── db.py # SQLite schema + CRUD (connections, cache, logs)
│ ├── dashboard.py # FastAPI web dashboard (login, courses, logs)
│ ├── dashboard_cli.py # Standalone dashboard entry point
│ ├── tools.py # Tool implementations (business logic)
│ ├── server.py # FastMCP server — registers 39 tools + dual-start
│ └── templates/ # Jinja2 HTML templates (8 pages)
├── skill/
│ └── SKILL.md # Skill definition for AI agents
└── examples/
└── web-development-course.json # Example course specStep-by-Step Setup
Prerequisites
Python 3.10+ (tested on 3.11)
Frappe LMS running and reachable (e.g. via Docker on
http://localhost:8000)A Frappe user with Course Creator or Moderator role
Step 1 — Clone & Install
git clone https://github.com/anggun-indra/frape-lms-mcp-tools.git
cd frape-lms-mcp-tools
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install the package (editable mode)
pip install -e .Step 2 — Start Frappe LMS
Make sure your Frappe LMS instance is running. If using Docker:
cd path/to/your/frappe-docker
docker compose up -d
# Wait for Frappe to be ready
curl http://localhost:8000 # should return HTTP 200Step 3 — Configure Credentials
Choose one method:
Method A — .env file (simplest)
cp .env.example .env
# Edit .env with your real credentials.env contents:
FRAPPE_URL=http://localhost:8000
FRAPPE_SITE=lms.localhost
FRAPPE_USERNAME=your_email@example.com
FRAPPE_PASSWORD=your_password⚠️
.envis gitignored — it will never be committed.
Method B — Web Dashboard (recommended — no password in config)
Start the dashboard:
source .venv/bin/activate frappe-lms-dashboardOpen
http://localhost:8080/loginin your browserFill in: Name (e.g. "Local LMS"), Frappe URL, Site, Username, Password
Click "Connect" — the dashboard logs in to Frappe, generates API keys if possible, and stores them in SQLite
The MCP server now uses these credentials automatically — no env vars needed
Method C — Shell environment variables
# ~/.zshrc or ~/.bashrc
export FRAPPE_URL="http://localhost:8000"
export FRAPPE_SITE="lms.localhost"
export FRAPPE_USERNAME="your_email@example.com"
export FRAPPE_PASSWORD="your_password"Step 4 — Verify the Installation
source .venv/bin/activate
# Verify the MCP server starts and lists all tools
python -c "
from frappe_lms_mcp.server import mcp
import asyncio
tools = asyncio.run(mcp.list_tools())
print(f'{len(tools)} tools registered')
"You should see: 39 tools registered
Step 5 — Register with Your AI Agent
The MCP server communicates over stdio (standard MCP transport). Every MCP-compatible agent can use it — the only difference is the config file location and key name.
ZCode
Config file: .zcode/config.json (workspace scope) or ~/.zcode/config.json (user scope)
{
"mcp": {
"servers": {
"frappe-lms": {
"command": "/absolute/path/to/frape-lms-mcp-tools/.venv/bin/frappe-lms-mcp",
"env": {
"FRAPPE_URL": "http://localhost:8000",
"FRAPPE_SITE": "lms.localhost",
"FRAPPE_USERNAME": "your_email@example.com",
"FRAPPE_PASSWORD": "your_password"
}
}
}
}
}If you configured credentials via the dashboard (Method B), you can omit the
envblock entirely — the server reads from SQLite.
Claude Desktop
Config file: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"frappe-lms": {
"command": "/absolute/path/to/frape-lms-mcp-tools/.venv/bin/frappe-lms-mcp",
"env": {
"FRAPPE_URL": "http://localhost:8000",
"FRAPPE_SITE": "lms.localhost",
"FRAPPE_USERNAME": "your_email@example.com",
"FRAPPE_PASSWORD": "your_password"
}
}
}
}After saving, restart Claude Desktop. The tools will appear as mcp__frappe-lms__<tool_name>.
OpenAI Codex (GPT Codex)
Config file: ~/.codex/config.toml or project-level codex.toml
[mcp_servers.frappe_lms]
command = "/absolute/path/to/frape-lms-mcp-tools/.venv/bin/frappe-lms-mcp"
env = { FRAPPE_URL = "http://localhost:8000", FRAPPE_SITE = "lms.localhost", FRAPPE_USERNAME = "your_email@example.com", FRAPPE_PASSWORD = "your_password" }Or if using Codex CLI with JSON config (~/.codex/config.json):
{
"mcpServers": {
"frappe_lms": {
"command": "/absolute/path/to/frape-lms-mcp-tools/.venv/bin/frappe-lms-mcp",
"env": {
"FRAPPE_URL": "http://localhost:8000",
"FRAPPE_SITE": "lms.localhost",
"FRAPPE_USERNAME": "your_email@example.com",
"FRAPPE_PASSWORD": "your_password"
}
}
}
}Claude Code (CLI)
Config file: ~/.claude/claude_config.json or .claude/config.json (project scope)
{
"mcpServers": {
"frappe-lms": {
"command": "/absolute/path/to/frape-lms-mcp-tools/.venv/bin/frappe-lms-mcp",
"env": {
"FRAPPE_URL": "http://localhost:8000",
"FRAPPE_SITE": "lms.localhost",
"FRAPPE_USERNAME": "your_email@example.com",
"FRAPPE_PASSWORD": "your_password"
}
}
}
}Generic MCP Client (any MCP-compatible tool)
The server uses the standard MCP stdio transport. Any tool that supports MCP can connect. The minimal config is:
Command: /absolute/path/to/frape-lms-mcp-tools/.venv/bin/frappe-lms-mcp
Transport: stdio
Environment variables (optional if using dashboard auth):
FRAPPE_URL=http://localhost:8000
FRAPPE_SITE=lms.localhost
FRAPPE_USERNAME=your_email@example.com
FRAPPE_PASSWORD=your_password💡 Tip: Replace
/absolute/path/to/with the actual path on your machine. Usewhich frappe-lms-mcp(inside the venv) to find it.
Step 6 — Use It!
Once registered, ask your AI agent to manage courses. Examples:
"Create a Python programming course with 3 chapters: Basics, Data Structures, and OOP. Each chapter should have 2 lessons with content and a quiz."
The agent will use create_full_course with a generated JSON spec. The course is automatically cached to SQLite for future re-upload.
"List all cached courses and re-upload course ID 1 to the active connection"
The agent uses list_cached_courses and reupload_course — no need to re-specify course details.
See examples/web-development-course.json for a complete course spec example.
Running the Dashboard
The dashboard runs automatically alongside the MCP server (in a background thread on port 8080). To run it standalone:
source .venv/bin/activate
frappe-lms-dashboardOpen http://localhost:8080 in your browser.
Page | URL | Purpose |
Dashboard |
| Overview: active connection, recent courses |
Login |
| Add a new Frappe connection |
Connections |
| Manage multiple Frappe instances |
Courses |
| Browse cached courses |
Import |
| Import course from Frappe to cache |
Logs |
| Audit trail of all operations |
To disable the dashboard (MCP-only mode):
export FRAPPE_LMS_NO_DASHBOARD=1To change the dashboard port:
export FRAPPE_LMS_DASHBOARD_PORT=9090Authentication
The server supports two authentication methods, tried in this order:
1. Token Auth (API Key/Secret) — preferred
No login needed — each request sends
Authorization: token <key>:<secret>headerGenerated via the dashboard login flow (requires System Manager role)
Stored in SQLite
2. Session Auth (Password) — fallback
Used when the user doesn't have System Manager role (can't generate API keys)
The server logs in with username/password and maintains a session cookie
Password stored in SQLite (encrypted at rest by Frappe, but stored plaintext locally)
Auth Priority in get_client():
Active SQLite connection with API key/secret → token auth
Active SQLite connection with password → session auth (auto-login)
Environment variables (
FRAPPE_USERNAME/FRAPPE_PASSWORD) → session authError if no credentials found
Available Tools (39)
Courses
Tool | Description |
| List courses (optionally published only) |
| Get course details + chapter/lesson outline |
| Create a new course |
| Update course fields |
| Delete a course and all dependencies |
| Toggle published status |
Chapters
Tool | Description |
| Create a chapter in a course |
| Get chapter with its lessons |
| Rename a chapter |
| Delete chapter + lessons |
| Move chapter to new position |
Lessons
Tool | Description |
| Create a lesson with content |
| Get lesson content and metadata |
| Update lesson fields |
| Delete a lesson |
| Move/reorder lesson between chapters |
| Build EditorJS JSON from a spec |
| Append paragraph to content |
Quizzes & Questions
Tool | Description |
| Create a reusable question |
| Create a quiz with questions |
| Add question to existing quiz |
| Get quiz with question details |
| List all quizzes |
| Delete a quiz |
| Embed quiz in lesson content |
Enrollments
Tool | Description |
| Enroll a student in a course |
| List enrollments (filter by course/student) |
| Remove an enrollment |
Batches & Certificates
Tool | Description |
| Create a batch (cohort) |
| List batches |
| Issue a certificate to a member |
High-level
Tool | Description |
| Create an entire course from a JSON spec (auto-caches to SQLite) |
Connections & Cache (SQLite)
Tool | Description |
| List all saved Frappe connections (secrets masked) |
| Activate a different Frappe instance |
| List courses from SQLite cache (fast, no Frappe query) |
| Get full cached course including spec JSON |
| Re-upload a cached course spec to a Frappe instance |
| Fetch a course from Frappe and cache it to SQLite |
| View audit trail of all operations |
Lesson Content Format
Lessons use EditorJS JSON for rich content. The build_lesson_content tool accepts a spec with these optional keys:
{
"paragraphs": ["Plain text paragraphs"],
"headers": [{"text": "Section Title", "level": 2}],
"lists": [{"items": ["item 1", "item 2"], "ordered": true}],
"images": [{"url": "/files/image.png", "caption": "A diagram"}],
"code": [{"code": "print('hello')", "language": "python"}],
"embeds": [{"service": "youtube", "source": "https://youtube.com/watch?v=..."}],
"quiz_refs": ["quiz-slug-name"],
"markdown": ["## Raw markdown section"]
}Environment Variables
Variable | Default | Description |
|
| Frappe base URL |
|
| Frappe site name |
| (none) | Login username/email |
| (none) | Login password |
| (none) | API key for token auth (alternative to password) |
| (none) | API secret for token auth |
| (unset) | Set to |
|
| Port for the web dashboard |
|
| SQLite database file path |
| (random) | Secret key for dashboard session cookies |
Development
# Install in dev mode
pip install -e ".[dev]"
# Run the server directly (with dashboard)
python -m frappe_lms_mcp.server
# Run dashboard only (no MCP)
frappe-lms-dashboard
# Run tests
pytestSecurity Notes
Credentials live in
.env(gitignored) or SQLite (indata/, also gitignored) — never committed..env.example(committed) contains only placeholder values — safe to share.The MCP server inherits the permissions of the configured Frappe user. For production, create a dedicated Frappe user with only the LMS roles needed (Course Creator, Moderator) rather than using Administrator.
The SQLite database at
data/frappe_lms.dbcontains API keys and passwords — it is gitignored. If you need to share the project, delete this file first.API key generation requires the System Manager role. Users without this role fall back to session auth (password stored in SQLite).
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/anggun-indra/frape-lms-mcp-tools'
If you have feedback or need assistance with the MCP directory API, please join our Discord server