Learning integration
LearnDash AI agent tool reference
LearnDash keeps a course as sfwd-courses, its lessons, topics, quizzes and questions as their own post types linked by course and lesson meta, and the whole tree on the course in its ld_course_steps meta; enrollment, progress, completion and quiz attempts are the learner's user meta. WP MCP Pro reads and writes all of it as that storage, never through LearnDash's write functions, so every write is covered by a snapshot and a rollback is exact: a course tree write changes posts and post meta, including the course's own steps snapshot; a learner write changes only that learner's user meta. It builds and reorders the course tree, and adds learner ops: list a user's enrollments with progress, and enroll, unenroll or reset a user's progress in one course. Because learner writes grant or take away access, they are off until a site opts in, while the course tree writes are on. Shared course steps are not supported, so a tree write is refused while they are on rather than risk dropping a shared lesson.
LearnDash in plain language: LearnDash MCP.
In practice
How LearnDash work goes with an agent.
LearnDash stores a course as an sfwd-courses post, with lessons, topics, quizzes and questions as separate post types joined by course_id and lesson_id meta, plus a copy of the whole tree in the course's ld_course_steps meta. Enrollment and progress live in each learner's user meta. WP MCP Pro reads and writes that storage directly and does not call LearnDash's own write functions. The trade-off is deliberate: every change lands in data that WP MCP snapshots, so rollback is exact, but LearnDash's own hooks and activity log do not see these edits.
Show me the Onboarding course as a tree, including quiz questions.
Runs learndash-list-courses to find the id, then learndash-get-course. LearnDash lessons appear as the sections of the tree and their topics as the items, with lesson-level quizzes beside them and each topic's quizzes beneath it. Read only.
Add a topic called "Set up your profile" under the Account lesson and put it first.
Runs learndash-add-lesson with the LearnDash lesson as parent_id and position 0. The new post is created as a LearnDash topic, siblings are renumbered, and the course's ld_course_steps is rewritten, each post and the course snapshotted. rollback-session trashes the new topic.
Which courses is user 204 enrolled in, and how far along are they?
Runs learndash-list-user-courses, which returns each direct enrollment with completed steps, total steps and a percentage. It needs list_users because it is personal data. Read only.
Enroll user 204 in Onboarding, then clear their progress in the older Safety course.
Runs learndash-enroll-user and learndash-reset-progress. Both are off until the wpmcp_enable_learndash_learner_write filter is set. Each takes a snapshot of that user's meta, and a reset keeps the enrollment but clears progress, completion and quiz attempts.
What your AI can do
Real LearnDash operations, every write reversible.
- Read a course's tree of lessons, topics and quizzes
- Build and reorder the course tree, snapshotted post by post
- List a user's enrollments with progress
- Enroll, unenroll or reset a user's progress in a course (off until opt-in)
- Roll back a course or learner write exactly
Example prompts
Example LearnDash prompts.
Show me the structure of the Onboarding course.
Add a lesson called "Account setup" after the intro lesson in the Onboarding course.
Enroll user 204 in the Onboarding course.
Under the hood
The LearnDash calls, under the hood.
plugin-data-read({ integration: "learndash", operation: "learndash-get-course", args: { course_id: 51 } }), the course tree
plugin-data-write({ integration: "learndash", operation: "learndash-enroll-user", args: { user_id: 204, course_id: 51 } }), opt-in; user snapshot, reversible
Safety and access
What can be undone on LearnDash, and what costs what.
Recoverable on LearnDash
- A course tree write is snapshotted post by post, and the course itself when its ld_course_steps meta is rewritten.
- A learner write snapshots only that learner's user meta, so rollback-operation puts back the enrollment, progress and quiz attempts exactly.
- A created course, section, lesson or quiz is undone by trashing it with rollback-session.
- learndash-update-item (title, content, excerpt, status) and learndash-move-item are reversible with rollback-operation.
LearnDash limits and opt-ins
- Enroll, unenroll and reset progress are off until the wpmcp_enable_learndash_learner_write filter is set, because they grant or remove access.
- Tree writes are refused while LearnDash's shared course steps setting is on, so no course loses a lesson it shares.
- Nothing is hard-deleted by the tree tools. update-item can move a node to draft.
- Quiz questions are read but not authored here. Questions are written in LearnDash.
- Because LearnDash's own functions and hooks are bypassed, its activity log table is not written for these changes.
Free or Pro: All LearnDash operations are Pro. They sit on the plugin-data read and write pair and are named learndash-*, so no extra top-level tools appear. Building and reordering the course tree is on by default once Pro is active. Reading a user's enrollments needs no opt-in, but the learner writes (enroll, unenroll and reset progress) stay off until the opt-in filter is set. The free plugin does not expose LearnDash.
Part of WP MCP Pro
The LearnDash integration is part of WP MCP Pro.
One Pro licence unlocks the LearnDash tools and every other Pro integration on this site: Elementor deep editing, the other page builders, the forms adapter pack and more, 133 Pro tools in all. The free plugin still covers the rest of WordPress and the full snapshot and undo engine, so you can try the safety model before you buy.
Frequently asked
LearnDash MCP: questions, answered.
Does it use LearnDash's own functions?
No, by design. Everything is read and written as LearnDash's stored posts, post meta and user meta, so every write is covered by a WP MCP snapshot and a rollback is exact. LearnDash's activity log keeps the history it had.
Are learner enrollments on by default?
No. Enroll, unenroll and reset-progress grant or take away access, so they stay off until a site opts in with the wpmcp_enable_learndash_learner_write filter. Building the course tree is on, like the other course tools.
Why are LearnDash lessons called sections in the tool names?
The same course operations serve several LMS plugins, so a lesson that holds topics is the section and topics are its items. In LearnDash, learndash-add-section creates a LearnDash lesson and learndash-add-lesson creates a topic under it. The descriptions in list-operations spell this out.
Does the LearnDash integration handle courses that share lessons?
Not yet. If the Course Builder shared steps setting is on, tree writes are refused with a clear error, because rewriting ld_course_steps from per-course links would drop shared steps. Reads still work, and per-course trees are unaffected.
Does unenrolling delete a learner's progress?
No. learndash-unenroll-user removes the direct enrollment only. learndash-reset-progress is the separate call that clears progress, completion and quiz attempts for one course and leaves the enrollment in place. Both are opt-in and each snapshots that user's meta so rollback restores it.
With LearnDash, can the agent list every learner in a course?
learndash-list-courses gives active enrollment counts, learndash-list-enrollments returns a course's learners with status and date, and learndash-list-user-courses reports one user at a time with progress. Both user-level reads need list_users, and the per-user list shows direct enrollments only.
Is there an AI agent for LearnDash?
Yes, through WP MCP rather than LearnDash itself. An agent you choose, such as Claude or Cursor, can read a course's tree of lessons, topics and quizzes. WP MCP is a separate plugin, not a built-in AI feature of LearnDash. On the undo side: A course tree write is snapshotted post by post, and the course itself when its ld_course_steps meta is rewritten.
Related integrations
More integrations for the same agent.
MCP for Tutor LMS
ProLearning, 2 tools.
MCP for LifterLMS
ProLearning, 2 tools.
MCP for Elementor
ProPage builders, 14 tools.
MCP for Gutenberg
FreePage builders, 4 tools.
MCP for Bricks
ProPage builders, 3 tools.
MCP for Divi (4 and 5)
ProPage builders, 3 tools.
Browse the full Integrations hub, or read more on LearnDash MCP and the WordPress MCP plugin.