Setup5 · Connect your AI client

5 · Connect your AI client

Register the server with your MCP client. Example: Claude Desktop.

Claude Desktop

With the server installed from PyPI (pip install moodle-mcp-bridge), add this to claude_desktop_config.json:

{
  "mcpServers": {
    "moodle": {
      "command": "moodle-mcp-bridge",
      "env": {
        "MOODLE_URL": "https://moodle.example.edu",
        "MOODLE_TOKEN": "your_token_here",
        "MOODLE_ALLOW_WRITE": "true"
      }
    }
  }
}

Running from a checkout instead? Use "command": "/absolute/path/to/moodle-mcp/.venv/bin/python" with "args": ["/absolute/path/to/moodle-mcp/server.py"].

Claude Code

claude mcp add moodle -e MOODLE_URL=https://moodle.example.edu -e MOODLE_TOKEN=your_token -- moodle-mcp-bridge

Other MCP clients (Gemini, ChatGPT, Cursor…)

MCP is an open protocol — the server is not tied to Claude. The same command + env vars work in Gemini CLI, ChatGPT desktop (developer mode), Cursor, Windsurf, VS Code Copilot agent mode, Cline and LM Studio. Example for Gemini CLI (~/.gemini/settings.json):

{
  "mcpServers": {
    "moodle": {
      "command": "moodle-mcp-bridge",
      "env": {
        "MOODLE_URL": "https://moodle.example.edu",
        "MOODLE_TOKEN": "your_token_here",
        "MOODLE_ALLOW_WRITE": "true"
      }
    }
  }
}
Model quality matters: with 88 tools, stronger models (Claude, Gemini Pro, GPT-4-class) chain calls like create course → add section → add quiz more reliably than small local models.

First request

Restart the client and try:

Say: "Create a course called Biology 101, then add a welcome page and a 5-question quiz."