Gemini Spark only supports MCP via OAuth currently. See Using AI Agents to Generate MiniLessons to learn more about enabling OAuth for MCP on your Moodle server. You must have the plugin local_oauthmcp installed on Moodle.
- Open Gemini on Web:
- Navigate to gemini.google.com on your desktop browser and sign in.
- Open Spark from the menu
- Access Connected Apps:
- In the bottom-left corner, click Settings =>Connected Apps.
- (Note: Depending on your region/UI layout, this may appear under Personal Intelligence => Connected Apps).
- Add Custom App for Spark:
- Scroll down to the section titled Custom apps for Spark.
- Click the Add a custom app button.
- Configure Endpoint & OAuth Credentials:
This step requires you to do some configuration on Spark and also on your Moodle site.- Enter your endpoint URL
https://[some-moodle-server]/mod/minilesson/mcp.php
- Click "Show more" under Advanced features.
- Click "Copy Redirect URL"
- Go to your Moodle's Site admin -> Plugins -> Manage MCP page and register the redirect URL and get the Client ID and Secret.
- Enter your Moodle OAuth Client ID and Client Secret.

- Enter your endpoint URL
- Authorize Connection:
- Click Next.
- A pop-up window will open directing you to your Moodle OAuth consent screen. Log in and grant the requested tool and resource permissions.
- Once approved, the dialog will close and the Moodle server will display as an active connected app.