Skip to Content
PluginsDevKitMCP Server

MCP Server

Model Context Protocol server for AI coding agents (like Cursor, Claude, etc.).

Uses mcp/sdk (v0.4.0).

Setup

Add to your mcp.json:

{ "mcpServers": { "moodle-devkit": { "command": "php", "args": [ "/full/path/to/moodle/public/local/devkit/cli/run.php", "mcp:serve" ] } } }

Start via CLI:

./devkit mcp:serve

Runs on stdio (bidirectional JSON-RPC).

Tools

ToolDescriptionParams
list_pluginsList installed pluginsincludestandardplugins (bool)
db_show_tablesShow database tables, all or for a specific plugincomponent (string, optional, e.g. mod_assign)
db_get_tableGet fields, indexes and keys of a specific tabletablename (string, e.g. forum)
lint_filesRun linters on pathspaths (string[])

In This Plugin

These same MCP tools back the CLI commands and are also used by the internal API.