moodlia-sync-mcp
Enables one-way course-content synchronization between Moodle sites, including course metadata, sections, groups, resources, assignments, rubrics, and workshop grading forms.
Click on "Deploy 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., "@moodlia-sync-mcpPlan a sync for course 42 from source to target"
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.
MoodlIA Sync MCP (deprecated)
Deprecated. This coordinator is replaced by the
moodlia-syncCLI and receives no further updates. Its approval boundary did not protect against agents with shell access, which can run the same CLI;moodlia-synckeeps the approval model by consuming an approval of the exact plan digest atomically on everyapplyandresume.
MCP tool
moodlia-synccommand
sync_list_profiles,sync_discover_capabilities
capabilities --profile <name>
sync_plan_course
plan --source-profile ... --plan-file plan.jsonexternal approval +
sync_apply_plan
approve plan.json --yes, thenapply plan.json --plan-digest <d> --allow-write
sync_get_plan,sync_get_conflicts,sync_resolve_conflict`conflicts plan.json [--resolve source-wins
sync_get_job,sync_get_history,sync_cancel_job
status,history,cancel
sync_resume_job,sync_verify_course
resume ... --approve --yes,verify --plan-id <id>Existing state databases open unchanged in
moodlia-sync.
moodlia-sync-mcp is an MCP coordinator for one-way course-content synchronization between Moodle sites. Each endpoint may use Moodle Core web services, the MoodlIA plugin, or both. Provider selection is capability-based and is frozen into every approved action.
It requires Node.js 22.13 or later because its durable state store uses the built-in SQLite API without experimental process flags.
The coordinator does not send Moodle tokens or binary files through MCP tool arguments or results. Profiles reference environment variables, and an allowlist restricts profile pairs, course IDs, and effects.
Status
The current preview synchronizes verified course metadata, hidden target-course creation, sections, groups and grouping membership, portable Pages/Labels/URLs, file resources and folders, Books with chapter files, selected assignment definitions and grading forms, Workshop forms, supported question banks and Quiz slots, portable Lesson pages, Database fields, Feedback items, course-completion criteria, and selected gradebook configuration. The coordinator uses the same engine and adaptive adapters as the CLI, so provider selection and advanced action semantics are identical. Existing unsupported authoring changes and unsafe transformations are reported before writing. It does not use Moodle backup files.
Related MCP server: MoodlIA MCP Server
Configuration
Create .moodle-profiles.json:
{
"schema_version": 1,
"profiles": {
"source": {
"url": "https://source.example.edu",
"backend": "auto",
"credentials": {
"core": { "token_env": "SOURCE_CORE_TOKEN" },
"moodlia": { "token_env": "SOURCE_MOODLIA_TOKEN" }
}
},
"target": {
"url": "https://target.example.edu",
"backend": "auto",
"credentials": {
"core": { "token_env": "TARGET_CORE_TOKEN" },
"moodlia": { "token_env": "TARGET_MOODLIA_TOKEN" }
}
}
}
}Create .moodle-sync-policy.json:
{
"schema_version": 1,
"allowed_profiles": ["source", "target"],
"allowed_pairs": [
{
"source": "source",
"target": "target",
"source_courses": [42],
"target_courses": [81],
"target_categories": [7],
"effects": ["content.read", "content.write"]
}
]
}Set MOODLIA_SYNC_CONFIG, MOODLIA_SYNC_POLICY, and optionally MOODLIA_SYNC_STATE. Start the stdio server with npx moodlia-sync-mcp.
For Streamable HTTP, set a random MOODLIA_SYNC_BEARER_TOKEN of at least 32 bytes and run npx moodlia-sync-mcp-http. It binds to 127.0.0.1:3333 by default. Put a TLS-authenticated reverse proxy in front of it for remote clients, set MOODLIA_SYNC_ALLOWED_HOSTS, and never expose the plain HTTP listener directly. The bearer token authenticates the client to the coordinator; Moodle tokens remain separate downstream credentials.
Approval boundary
sync_plan_course is read-only. sync_apply_plan accepts only a plan that was approved outside MCP and stored in the same SQLite state database:
moodlia course sync `
--approve-plan ".moodle-sync\plans\PLAN_ID.json" `
--state ".moodle-sync\coordinator.sqlite" `
--yesApproval is bound to the complete plan digest, expires with the plan, and is consumed before execution. A model-provided boolean is never treated as human authorization.
MCP tools
sync_list_profilessync_discover_capabilitiessync_plan_coursesync_get_plan(bounded pagination across actions, conflicts, gaps, unchanged, and unknown entries)sync_apply_plansync_get_jobsync_cancel_jobsync_resume_jobsync_verify_coursesync_get_conflictssync_resolve_conflictsync_get_history
Jobs, action attempts, approvals, mappings, baselines, and leases are durable in SQLite. On restart, in-flight jobs become interrupted and must be reconciled and explicitly re-approved before resume. Timeout outcomes are marked unknown_outcome, not retried blindly.
All documentation, schemas, source identifiers, and source comments are in English.
This server cannot be deployed
Maintenance
Related MCP Connectors
LMS (learning management system): manage courses, SCORM/xAPI, learners, certificates and reports.
The Academy curriculum as an offline MCP library. Hosted course connector adds progress.
Create courses, search approved knowledge, preview learning content, and manage learning sites.
MCP server for the Inistate platform: module discovery, entry management, and activity submission.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to publish and manage pedagogical content in Moodle via Web Services with guaranteed idempotency. It provides tools for course management, lesson publishing, preview workflows, and direct Moodle API access.531 npm1MIT
- AlicenseNot gradedqualityAmaintenanceEnables LLM agents and automation tools to interact with Moodle through a permission-checked MCP endpoint, covering courses, activities, question banks, enrolments, and administrative operations via 240 external functions.4GPL 3.0
- AlicenseNot gradedqualityAmaintenanceEnables users to link their Ed Discussion, Moodle and OnTrack accounts through a cloud-hosted SSO broker and then browse course materials, threads, deadlines, grades, tasks and attendance-code evidence from an OAuth-capable MCP client. Course discovery and binding tools let users associate courses across platforms, with per-user scoped access and revocation controls.5PolyForm Noncommercial 1.0.0
- AlicenseAqualityBmaintenanceEnables users to log into their university Moodle in a dedicated Chrome profile, choose courses from their real module list, and incrementally download lecture files to local versioned folders while preserving older versions of updated materials. Also exposes tools to check login and connection status, discover courses, list resources, and inspect per-item sync results.84MIT