Client setup
Your endpoint is https://<your-org>.moodlemcp.com/mcp in every example below.
Which authentication each client supports is explained in
Connect an assistant.
Claude Desktop and ChatGPT
Both authenticate with Sign in with your Moodle, so there's no key to handle.
- Open the connectors settings and add a remote MCP connector.
- Paste your endpoint URL.
- When the browser window opens, choose Sign in with your Moodle, log in on your Moodle and approve.
The connector is now bound to your Moodle identity. To connect as somebody else, remove the connector and re-authorize.
Claude Code
claude mcp add --transport http moodle https://<your-org>.moodlemcp.com/mcp \
--header "Authorization: Bearer mcpk_..."Cursor and VS Code
In .mcp.json (or the equivalent settings entry):
{
"mcpServers": {
"moodle": {
"url": "https://<your-org>.moodlemcp.com/mcp",
"headers": { "Authorization": "Bearer mcpk_..." }
}
}
}Clients that only speak stdio
Bridge with the standard
mcp-remote package:
npx mcp-remote https://<your-org>.moodlemcp.com/mcp \
--header "Authorization: Bearer mcpk_..."Scripts and CI
Any HTTP client works — send the key as a Bearer header over the Streamable
HTTP transport. For automation, mint a dedicated key: read-only, restricted
to the tools it needs, and with an expiry. See
Keys & permissions.
Keep the key in your secret store, never in the repository. If a key leaks, revoke it in the panel; the next call it makes is refused.
Checking it works
Ask the assistant something that needs your Moodle, such as "which courses am I enrolled in?". If the assistant claims it has no tools, it usually hasn't reloaded its MCP configuration — restart the client. Other symptoms are covered in Troubleshooting.