Connect Gemini CLI to Looker with MCP Toolbox

1. Before You Begin

You should have access to a running Looker instance. You will need an API client_id and client_secret.

Prerequisites

  • Have a running Looker instance
  • Have access to a Linux or macOS command line

What you'll learn

  • How to install Gemini CLI
  • How to install MCP Toolbox
  • How to connect Gemini CLI to Looker using MCP Toolbox

What you'll need

  • The URL of the Looker API server. This is usually the same as the Looker URL, but you may have to append a port number such as :19999, for example: https://looker.example.com:19999. If things don't work properly try asking your Looker administrator.

2. Preparations

You need to retrieve a client_id and client_secret.

Log into your Looker instance and click the user profile in the top right corner of the screen. Select Account. On the Account screen, next to the API Keys label, press the Manage button.

On the API Keys management page, press the Create New API Key button.

In the newly created entry, add the purpose MCP Toolbox or something similar and click the checkmark to save it. Then copy and paste the client_id and client_secret someplace safe. You will need to press the eye icon next to the secret in order to see and copy it.

You can close the Looker browser windows now.

3. Install Gemini CLI

Open the terminal app to get to a macOS or Linux command line.

Run the following command:

npm install -g @google/gemini-cli

If that fails for any reason, consult https://github.com/google-gemini/gemini-cli?tab=readme-ov-file#-installation for installation options or help.

Now run Gemini CLI with this command:

gemini

You will be asked to login. Follow those directions and you should be ready to go.

4. Install MCP Toolbox

Create MCP Toolbox directory

In your terminal app, create a directory mcp-toolbox. Then enter that directory:

mkdir $HOME/mcp-toolbox
cd $HOME/mcp-toolbox

Identify the system architecture

Run the uname command to find out what kind of system you are on:

uname -a

This command will return with a string that looks something like this:

Linux hostname.example.com 6.16.12-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.16.12 (2025-11-10) x86_64 GNU/Linux

Pay close attention to the end of that line. If you are on Linux it will end with x86_64 GNU/Linux. For macOS it will indicate Darwin and either arm64 for the Apple processor or x86_64 i386 for the Intel processor near the end of that string.

Download MCP Toolbox

If you have Linux, run the following command to download MCP Toolbox:

curl https://storage.googleapis.com/genai-toolbox/v0.26.0/linux/amd64/toolbox

If you have macOS with an Apple processor, run the following command to Download MCP Toolbox:

curl https://storage.googleapis.com/genai-toolbox/v0.26.0/darwin/arm64/toolbox

If you have macOS with an Intel processor, run the following command to Download MCP Toolbox:

curl https://storage.googleapis.com/genai-toolbox/v0.26.0/darwin/amd64/toolbox

Make MCP Toolbox executable

Make the MCP Toolbox program executable by running the following command:

chmod +x toolbox

Get the full path to toolbox

Get the full path to the toolbox file by running the following command:

echo $HOME/mcp-toolbox/toolbox

It will probably result in something like this:

/home-or-User/YOUR-USER-NAME/mcp-toolbox/toolbox

Save the result somewhere convenient.

5. Configure Gemini CLI

Edit the file $HOME/.gemini/settings.json. Use your preferred text editor. If you don't edit files in Linux or macOS very often, nano is a good choice.

Add the following stanza to the json file:

  "mcpServers": {
    "looker": {
      "command": "FULL_PATH_TO_TOOLBOX",
      "args": [
        "--stdio",
        "--prebuilt",
        "looker"
      ],
      "env": {
        "LOOKER_BASE_URL": "URL_OF_LOOKER_INSTANCE",
        "LOOKER_CLIENT_ID": "CLIENT_ID",
        "LOOKER_CLIENT_SECRET": "CLIENT_SECRET",
        "LOOKER_VERIFY_SSL": "true"
      }
    }
  }

Substitute in the information you saved in earlier steps for FULL_PATH_TO_TOOLBOX, URL_OF_LOOKER_INSTANCE, CLIENT_ID, and CLIENT_SECRET. Save the edited file.

6. Use MCP Toolbox with Gemini CLI

Start Gemini CLI by entering gemini at the command line.

List the available tools by typing the following at the Gemini prompt:

/mcp list looker

Your result should look something like this:

Configured MCP servers:

🟢 looker - Ready (33 tools)
  Tools:
  - add_dashboard_element
  - add_dashboard_filter
  - create_project_file
  - delete_project_file
  - dev_mode
  - generate_embed_url
  - get_connection_databases
  - get_connection_schemas
  - get_connection_table_columns
  - get_connection_tables
  - get_connections
  - get_dashboards
  - get_dimensions
  - get_explores
  - get_filters
  - get_looks
  - get_measures
  - get_models
  - get_parameters
  - get_project_file
  - get_project_files
  - get_projects
  - health_analyze
  - health_pulse
  - health_vacuum
  - make_dashboard
  - make_look
  - query
  - query_sql
  - query_url
  - run_dashboard
  - run_look
  - update_project_file

Now start asking Gemini CLI about the available data. Try some of the following:

  1. What models are available in looker?
  2. What explores are available in MODEL_NAME?
  3. What measures and dimensions are available in EXPLORE_NAME?

Substitute in your own values for MODEL_NAME and EXPLORE_NAME.

Next, try to make some natural language queries that can be answered by the data in your Looker instance: "What is my total revenue for 2025?", "How many widgets did I sell in Q4?", etc.

7. More prompts to try

You can also try running saved Looks and dashboards, creating Looks and dashboards, even editing LookML models.

  • Run a saved Look by entering a prompt like "Run the look ‘Monthly Inventory'." Gemini should search for a look named ‘Monthly Inventory' then run the associated query and share the results.
  • Run a dashboard by giving a prompt like "Summarize the ‘customer tracking' dashboard." Gemini should search for a dashboard named ‘customer tracking', run the queries associated with each tile, and give a summary.
  • To create a saved Look, try a prompt like "Create a Look to track my monthly revenue broken down by product category. Display the data as a stacked column chart."
  • To create a dashboard, try a prompt like "Build me a sales pulse dashboard for the year 2026."

If you are a LookML developer, you can modify LookML with Gemini. Experiment with prompts like these:

  1. Prompt Gemini to get the list of LookML projects with "What LookML projects are available?"
  2. Prompt Gemini to retrieve the list project files. "What files are available in project PROJECT_NAME?" Substitute your own project name.
  3. Prompt Gemini to add a measure. "Create a measure to average the sales_price field in view VIEW_NAME." Substitute your own view name.
  4. Retrieve the list of connections with "What connections are available in Looker?"
  5. Get the associated schemas. "What schemas are in CONNECTION_NAME?" Substitute your own connection name.
  6. Get the associated tables. "What tables are in CONNECTION_NAME in schema SCHEMA_NAME?" Substitute your own connection and schema names.
  7. Get the columns for a table. "What columns are in TABLE_NAME?" Substitute your own table name.
  8. Now ask Gemini to add a column to a LookML view. "Create a dimension for the column COLUMN_NAME." Substitute your own column name.

Use the Looker UI to test the changes and potentially commit them. The Gemini and MCP Toolbox cannot commit LookML changes and push them to production.

8. Additional information