Settings¶
Site administration → Plugins → Local plugins → MCP server. The page shows the endpoint URL at the top.
| Setting | Name | Default | What it does |
|---|---|---|---|
| Enable MCP server | local_mcpserver/enabled |
On | When off, the endpoint rejects every request. |
| Allow write tools | local_mcpserver/allowwrite |
Off | Turns on the tools that create and change courses. See Enabling write mode. |
| Requests per user per minute | local_mcpserver/ratelimit |
60 | 0 disables the limit. See Rate limiting. |
| Access token lifetime (seconds) | local_mcpserver/accesstokenlifetime |
3600 | Clamped between 60 and 86400. |
| Refresh token lifetime (seconds) | local_mcpserver/refreshtokenlifetime |
2592000 (30 days) | Clamped between 1 hour and 365 days. |
| Authorization code lifetime (seconds) | local_mcpserver/codelifetime |
300 | Clamped between 30 and 600. |
| Accept Moodle web service tokens | local_mcpserver/allowwstoken |
Off | Accepts a Moodle wstoken as Authorization: Bearer. |
| Allow dynamic client registration | local_mcpserver/enabledcr |
On | Lets MCP clients register themselves (RFC 7591). |
| Allow personal access tokens | local_mcpserver/allowpersonal |
On | Lets each user create a long-lived token from Preferences. The token is shown once and only its hash is stored. |
| Maximum personal token lifetime (days) | local_mcpserver/patmaxdays |
365 | Users can choose 30, 90 or 365 days; choices above this number are hidden. Kept between 30 and 365. |
| Allow client ID metadata documents | local_mcpserver/allowcimd |
On | Lets a client identify itself with an HTTPS metadata URL. Private and link-local addresses are refused. |
| Extra allowed Origin values | local_mcpserver/extraorigins |
Empty | One browser Origin per line, for example https://cursor.com. |
Tools¶
Under the Tools heading there is one checkbox per tool, 63 in total (local_mcpserver/tool_<name>, for example
local_mcpserver/tool_delete_section). All are on by default. A disabled tool is not listed in tools/list
and cannot be called. Every tool other than the 26 with scope read and search_users, that is the 26 write tools and the other 10 admin tools, also needs Allow write tools: with it off they stay hidden even if their own checkbox is ticked.
Switches added in 0.8.3 to 0.8.6, all on by default: tool_get_activity_settings, tool_list_conversations, tool_get_conversation_messages (read), tool_update_course, tool_set_course_image, tool_set_course_completion, tool_set_availability, tool_create_forum_discussion, tool_reply_forum_post, tool_send_private_message, tool_reply_conversation (write), and tool_set_site_policy_handler, tool_create_policy, tool_update_policy, tool_list_policies, tool_get_policy_acceptances (admin).
Origin check¶
The site URL is always allowed. Requests with no Origin header (desktop and server clients) are allowed.
A present but unknown Origin gets HTTP 403.