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
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.
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 through MoodlIA, groups and grouping membership, Pages/Labels/URLs on creation, file resources and folders on creation, Books with chapter files, selected assignment definitions and new rubrics, and new Workshop grading forms. Existing unsupported authoring changes and unsafe transformations are reported before writing. It does not use Moodle backup files.
Related MCP server: Moodle 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_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
Connect your Moodle to AI assistants: courses, content, grading and reports from the chat.
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.57 npmMIT
- AlicenseNot gradedqualityCmaintenanceConnects Moodle LMS with AI assistants through the Model Context Protocol, enabling users to interact with Moodle data via a conversational chatbot interface.3 npmMIT
- AlicenseAqualityBmaintenanceMCP server for Moodle that lets AI agents publish and manage pedagogical content — courses, lessons, quizzes, forums — via Moodle Web Services with idempotency.45MIT
- AlicenseBqualityBmaintenanceEnables AI agents to download courses from any Moodle site for offline study, supporting authentication, course listing, and syncing via CLI or MCP.13MIT