Data analysis using Rill's metrics layer via Model Context Protocol for Google Gemini CLI.
This extension enables Google's Gemini AI assistant to query and analyze your Rill data directly through natural language conversations. Using the Google Gemini CLI and the Model Context Protocol (MCP), you can explore metrics, identify trends, and generate insights without writing queries manually.
- A Rill project or cloud account — get started here
- Rill CLI
- Google Gemini CLI
Install the extension with the Google Gemini CLI:
gemini extensions install https://github.com/rilldata/rill-gemini-extensionYou will be prompted to provide your Rill organization and project.
# You should see 'rill' listed among installed extensions
gemini extensions listRill Supports MCP Oauth authentication.
/mcp auth rillOnce installed and configured, you can start using the Rill extension in your Google Gemini CLI conversations. Simply ask questions about your Rill metrics views, and the extension will generate insights based on your data.
gemini "Using Rill, tell me about any trends you see in the Ads Bids dataview"Example output: Analysis
gemini "Tell me about the top publishers by ad spend in the Ads Bids dataview"Based on my initial analysis, I'll focus on the top named publishers: KrushMedia, Sinclair Broadcasting, and Taboola.
Here's a breakdown of the top 10 publishers by ad spend:
┌──────────────────────────────────────┬───────────────────┬─────────────┐
│ Publisher │ Advertising Spend │ Impressions │
├──────────────────────────────────────┼───────────────────┼─────────────┤
│ KrushMedia │ $755,058.21 │ 50,219 │
│ Sinclair Broadcasting - Bally Sports │ $419,923.62 │ 30,002 │
│ Taboola │ $408,628.51 │ 81,782 │
│ PubWise │ $202,980.07 │ 26,089 │
│ Disney │ $48,075.66 │ 4,055 │
│ Connatix │ $40,485.67 │ 7,090 │
│ Spot.IM │ $38,171.29 │ 6,576 │
│ Pluto TV │ $36,175.64 │ 4,396 │
│ fubo.TV New │ $23,563.37 │ 1,641 │
└──────────────────────────────────────┴───────────────────┴─────────────┘Examples used: Examples
This extension includes custom slash commands for common Rill analysis workflows. Use these commands in your Google Gemini CLI conversations to streamline your data exploration:
/rill:metrics- List all available metrics views in your Rill project with descriptions/rill:explore- Start a comprehensive OODA loop analysis for a specific metrics view/rill:trends- Analyze time-based trends with automatic granularity selection/rill:compare- Compare metrics across dimensions or time periods/rill:timerange- Check the available time range and data freshness for a metrics view
gemini extensions uninstall rillWhen running the installer you may be asked for Organization, Project, and a user/service token — these are prompts to help populate the extension's configuration. The values will be saved to a .env file in the extension’s directory (e.g., ~/.gemini/extensions/rill/.env).
Keychain not available— this is informational, not fatal. It indicates the installer couldn't store credentials in the OS keychain and will fall back to file-based storage.
If you can't connect to your Rill project:
- Verify your
.envfile or inputs contain valid credentials- Confirm your user/service token has the necessary permissions
- Check that your organization and project names match your Rill Cloud URL
To test changes locally:
-
Make your changes to the extension files
-
Install the extension from your local development directory:
npm run link- Test the extension with the Google Gemini CLI, then unlink when done:
npm run unlinkThis extension is distributed through GitHub Releases