Masteriyo WP Abilities API Integration

Masteriyo registers its core operations as abilities through the WordPress Abilities API, making them available to AI agents, automation tools, and external integrations — including Claude Code via the WordPress MCP Adapter.

Each ability maps directly to a Masteriyo REST API operation and respects the same permission model — only users with the correct WordPress capability can execute it.

Prerequisites

  • WordPress 6.9 or higher — the WP Abilities API is only available from WordPress 6.9+
  • Masteriyo LMS installed and activated (free or Pro)
  • WordPress MCP Adapter plugin — the official bridge that exposes WP Abilities to MCP clients like Claude Code (download from GitHub)
  • A WordPress user with Administrator role — abilities enforce the same capability checks as the Masteriyo REST API
  • Application Password for the user — generated from WordPress Admin → Users → Profile → Application Passwords

Setup: Connect Claude Code to Your Site

Step 1 — Install the MCP Adapter plugin

  1. Download the latest release ZIP from the WordPress/mcp-adapter GitHub releases page.
  2. Go to WordPress Admin → Plugins → Add New → Upload Plugin and install the ZIP.
  3. Activate the plugin.

Step 2 — Generate an Application Password

  1. Go to WordPress Admin → Users → Profile.
  2. Scroll down to Application Passwords.
  3. Enter a name (e.g. Claude Code) and click Add New Application Password.
  4. Copy the generated password — you will not see it again.

Step 3 — Add the MCP server to Claude Code

Add the following to your .claude/mcp.json (project-level) or ~/.claude/mcp.json (global):

{
  "mcpServers": {
    "masteriyo-site": {
      "command": "npx",
      "args": ["-y", "@automattic/mcp-wordpress-remote"],
      "env": {
        "WP_API_URL": "https://yoursite.com/wp-json/mcp/mcp-adapter-default-server",
        "WP_API_USERNAME": "your-admin-username",
        "WP_API_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
      }
    }
  }
}

Replace yoursite.com, the username, and the Application Password with your own values.

Step 4 — Restart Claude Code

After saving the config, restart Claude Code. The Masteriyo abilities will be discovered automatically and available as tools.


Using Masteriyo Abilities in Claude Code

Once connected, you can ask Claude Code to manage your Masteriyo LMS directly in natural language. Claude will call the appropriate ability behind the scenes.

Example prompts:

List all published courses on my site.
Create a new course called "Introduction to Python" with a beginner difficulty level.
Enroll student ID 42 in course ID 15.
Show me all pending orders.
Update the general settings to disable guest checkout.

Claude Code resolves the intent to the matching ability (e.g. masteriyo/course-create, masteriyo/enrollment-create) and executes it with the correct parameters — no manual API calls needed.


Available Abilities

All abilities are registered under the masteriyo-lms category with the masteriyo/ namespace.

Course

AbilityDescription
masteriyo/course-listList all courses
masteriyo/course-getGet a single course by ID
masteriyo/course-createCreate a new course
masteriyo/course-updateUpdate an existing course
masteriyo/course-deleteDelete a course
masteriyo/course-restoreRestore a trashed course
masteriyo/course-children-getGet sections and lessons inside a course
masteriyo/course-builder-getGet the full course builder data
masteriyo/course-builder-saveSave course builder changes

Section

AbilityDescription
masteriyo/section-listList all sections
masteriyo/section-getGet a single section by ID
masteriyo/section-createCreate a new section
masteriyo/section-updateUpdate a section
masteriyo/section-deleteDelete a section
masteriyo/section-children-getGet lessons and quizzes inside a section

Lesson

AbilityDescription
masteriyo/lesson-listList all lessons
masteriyo/lesson-getGet a single lesson by ID
masteriyo/lesson-createCreate a new lesson
masteriyo/lesson-updateUpdate a lesson
masteriyo/lesson-deleteDelete a lesson
masteriyo/lesson-restoreRestore a trashed lesson
masteriyo/lesson-cloneClone an existing lesson

Quiz

AbilityDescription
masteriyo/quiz-listList all quizzes
masteriyo/quiz-getGet a single quiz by ID
masteriyo/quiz-createCreate a new quiz
masteriyo/quiz-updateUpdate a quiz
masteriyo/quiz-deleteDelete a quiz
masteriyo/quiz-cloneClone an existing quiz
masteriyo/quiz-builder-getGet the full quiz builder data
masteriyo/quiz-builder-saveSave quiz builder changes

Question

AbilityDescription
masteriyo/question-listList all questions
masteriyo/question-getGet a single question by ID
masteriyo/question-createCreate a new question
masteriyo/question-updateUpdate a question
masteriyo/question-deleteDelete a question

Enrollment

AbilityDescription
masteriyo/enrollment-listList all enrollments
masteriyo/enrollment-getGet a single enrollment by ID
masteriyo/enrollment-createEnroll a student in a course
masteriyo/enrollment-updateUpdate an enrollment
masteriyo/enrollment-deleteDelete an enrollment

Order

AbilityDescription
masteriyo/order-listList all orders
masteriyo/order-getGet a single order by ID
masteriyo/order-createCreate a new order
masteriyo/order-updateUpdate an order
masteriyo/order-deleteDelete an order

User

AbilityDescription
masteriyo/user-listList all users
masteriyo/user-getGet a single user by ID
masteriyo/user-createCreate a new user
masteriyo/user-updateUpdate a user
masteriyo/user-deleteDelete a user

Settings

AbilityDescription
masteriyo/settings-getGet all settings
masteriyo/settings-updateUpdate settings
masteriyo/settings-update-generalUpdate general settings
masteriyo/settings-update-advanceUpdate advanced settings
masteriyo/settings-update-emailsUpdate email settings
masteriyo/settings-update-paymentsUpdate payment settings
masteriyo/settings-update-quizUpdate quiz settings

Permissions

Each ability enforces the same capability checks as the underlying Masteriyo REST API:

  • Creating or updating courses requires edit_masteriyo_courses
  • Managing users and settings requires manage_masteriyo_settings
  • Deleting orders requires admin-level access

Unauthenticated requests or users without the required capability will receive a permission denied response.


Extending with Custom Abilities

Addons and third-party plugins can register additional abilities using the provided hooks.

Add a new ability

add_action( 'masteriyo_register_abilities', function( $registry ) {
    $registry->add( new MyCustomAbility() );
} );

Filter the full registry

add_filter( 'masteriyo_abilities', function( $registry ) {
    return $registry;
} );

Hide a specific ability

add_filter( 'masteriyo_ability_mcp_public', function( $is_public, $ability_name ) {
    if ( 'masteriyo/order-delete' === $ability_name ) {
        return false;
    }
    return $is_public;
}, 10, 2 );

Abilities must be registered before the registry is frozen. Always use the masteriyo_register_abilities action — do not call wp_register_ability() directly for Masteriyo abilities.


Was this article helpful to you?
Give us Rating

Last edited on May 13, 2026.
Edit this page