Skip to main content
Documentation

Connect an assistant

Your endpoint

Every organization gets its own MCP endpoint, backed by its own Moodle, at a per-organization subdomain:

https://<your-org>.moodlemcp.com/mcp

It speaks the standard MCP Streamable HTTP transport, so any compliant client can connect. Per-client instructions are in Client setup.

Two ways to authenticate

Pick whichever your client supports.

Sign in with your Moodle (OAuth)

For Claude Desktop and ChatGPT, which can't send a custom header. Add the endpoint as a remote MCP connector; the first time you connect, a browser window opens — choose Sign in with your Moodle, log in on your own Moodle and approve.

The assistant is then bound to your Moodle identity and roles. There is no key to copy, store or email, so there is nothing to leak. Re-authorizing, or revoking the underlying key, cuts the connection off.

An MCP key

For clients that accept a token (Cursor, Claude Code, scripts, CI): send the key as a Bearer header. Owners and admins mint keys in Organization → Moodle → MCP keys, and the plugin can email one to each provisioned user. The value is shown once.

What happens on every call

Whichever route you took, the MCP server executes Moodle web-service functions with your stored token and roles. Authentication is checked per request, so a revoked, suspended or expired credential is cut off on its very next call — there's no session to expire.

Every call, direct or routed through the gateway tools, goes through the same hardened Moodle client (SSRF-pinned connections, request timeout, streaming response-size cap) and the same role gate. What a key may do is covered in Keys & permissions.

No client? Use the panel

The panel's AI chat uses the same tool catalog with no client setup at all — useful to confirm the connection works before wiring anything up.