Gemini CLI can run the Moodle and Ed Discussion Model Context Protocol (MCP) servers as local processes or connect to either over a remote URL. moodle mcp connect doesn’t support Gemini CLI yet, so add both servers by hand. Official reference: MCP servers with the Gemini CLI, fetched 2026-09-21.

Prerequisites

  • moodle-cli and edstem-cli installed and signed in. See Install and Install.
  • Gemini CLI installed.
Gemini CLI reads MCP servers from ~/.gemini/settings.json (every project) or .gemini/settings.json (one project), under a mcpServers key.

Bridge, local

This keeps your MCP access token in the OS keychain instead of in this file.

Remote, header auth

Get <your-token> with moodle mcp connect codex --mode remote --show-token (any supported client’s --show-token prints the same Worker token). That command also writes a Codex entry to ~/.codex/config.toml; delete it afterwards if you don’t use Codex.

Verify the connection

Run this inside the Gemini CLI to see the server list, connection status, and each server’s available tools.