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. Gemini Spark is not available to all Gemini users. If you don't see it, you may not have access to it. 


Also after each call to a MiniLesson API that looks like a "write," Gemini Spark will stop and ask for permission. [just saying..]


Anyway follow these steps to get it going.

  1. Open Gemini on Web:
    1. Navigate to gemini.google.com on your desktop browser and sign in.  
    2. Open Spark from the menu
  2. Access Connected Apps:
    1. In the bottom-left corner, click Settings =>Connected Apps.  
    2. (Note: Depending on your region/UI layout, this may appear under Personal Intelligence => Connected Apps).  
  3. Add Custom App for Spark:
    1. Scroll down to the section titled Custom apps for Spark.  
    2. Click the Add a custom app button.  
  4. Configure Endpoint & OAuth Credentials:
    This step requires you to do some configuration on Spark and also on your Moodle site.
    1. Enter your endpoint URL

      https://[some-moodle-server]/mod/minilesson/mcp.php

    2. Click "Next" .. you will be returned to this page to enter a client id  and secret.
    3. Click "Copy Redirect URL"
    4. Go to your Moodle's Site admin -> Plugins -> Manage MCP page and register the redirect URL and get the Client ID and Secret. 
    5. Enter your Moodle OAuth Client ID and Client Secret.
  5. Authorize Connection:
    1. Click Next.  You will see Google and Moodle permissions pages/
    2. Agree on the Google pages, and click "Allow" on the Moodle page.
    3. Once approved, the dialog will close and the Moodle server will display as an active connected app.
      If you get an error  "Account linking is required to use this custom app. Try again" - press next and try again. It usually works the next time.