Looker using MCP
Model Context Protocol (MCP) is an open protocol for connecting Large Language Models (LLMs) to data sources like Postgres. This guide covers how to use MCP Toolbox for Databases to expose your developer assistant tools to a Looker instance:
- Gemini-CLI
- Cursor
- Windsurf (Codium)
- Visual Studio Code (Copilot)
- Cline (VS Code extension)
- Claude desktop
- Claude code
Set up Looker
Get a Looker Client ID and Client Secret. Follow the directions here.
Have the base URL of your Looker instance available. It is likely something like
https://looker.example.com
. In some cases the API is listening at a different port, and you will need to usehttps://looker.example.com:19999
instead.
Install MCP Toolbox
Download the latest version of Toolbox as a binary. Select the correct binary corresponding to your OS and CPU architecture. You are required to use Toolbox version v0.10.0+:
curl -O https://storage.googleapis.com/genai-toolbox/v0.14.0/linux/amd64/toolbox
curl -O https://storage.googleapis.com/genai-toolbox/v0.14.0/darwin/arm64/toolbox
curl -O https://storage.googleapis.com/genai-toolbox/v0.14.0/darwin/amd64/toolbox
curl -O https://storage.googleapis.com/genai-toolbox/v0.14.0/windows/amd64/toolbox.exe
Make the binary executable:
chmod +x toolbox
Verify the installation:
./toolbox --version
Configure your MCP Client
Install Gemini-CLI.
Create a directory
.gemini
in your home directory if it doesn’t exist.Create the file
.gemini/settings.json
if it doesn’t exist.Add the following configuration, or add the mcpServers stanza if you already have a
settings.json
with content. Replace the path to the toolbox executable and the environment variables with your values, and save:{ "mcpServers": { "looker-toolbox": { "command": "./PATH/TO/toolbox", "args": ["--stdio", "--prebuilt", "looker"], "env": { "LOOKER_BASE_URL": "https://looker.example.com", "LOOKER_CLIENT_ID": "", "LOOKER_CLIENT_SECRET": "", "LOOKER_VERIFY_SSL": "true" } } } }
Start Gemini-CLI with the
gemini
command and use the command/mcp
to see the configured MCP tools.
Install Claude Code.
Create a
.mcp.json
file in your project root if it doesn’t exist.Add the following configuration, replace the environment variables with your values, and save:
{ "mcpServers": { "looker-toolbox": { "command": "./PATH/TO/toolbox", "args": ["--stdio", "--prebuilt", "looker"], "env": { "LOOKER_BASE_URL": "https://looker.example.com", "LOOKER_CLIENT_ID": "", "LOOKER_CLIENT_SECRET": "", "LOOKER_VERIFY_SSL": "true" } } } }
Restart Claude Code to apply the new configuration.
Open Claude desktop and navigate to Settings.
Under the Developer tab, tap Edit Config to open the configuration file.
Add the following configuration, replace the environment variables with your values, and save:
{ "mcpServers": { "looker-toolbox": { "command": "./PATH/TO/toolbox", "args": ["--stdio", "--prebuilt", "looker"], "env": { "LOOKER_BASE_URL": "https://looker.example.com", "LOOKER_CLIENT_ID": "", "LOOKER_CLIENT_SECRET": "", "LOOKER_VERIFY_SSL": "true" } } } }
Restart Claude desktop.
From the new chat screen, you should see a hammer (MCP) icon appear with the new MCP server available.
Open the Cline extension in VS Code and tap the MCP Servers icon.
Tap Configure MCP Servers to open the configuration file.
Add the following configuration, replace the environment variables with your values, and save:
{ "mcpServers": { "looker-toolbox": { "command": "./PATH/TO/toolbox", "args": ["--stdio", "--prebuilt", "looker"], "env": { "LOOKER_BASE_URL": "https://looker.example.com", "LOOKER_CLIENT_ID": "", "LOOKER_CLIENT_SECRET": "", "LOOKER_VERIFY_SSL": "true" } } } }
You should see a green active status after the server is successfully connected.
Create a
.cursor
directory in your project root if it doesn’t exist.Create a
.cursor/mcp.json
file if it doesn’t exist and open it.Add the following configuration, replace the environment variables with your values, and save:
{ "mcpServers": { "looker-toolbox": { "command": "./PATH/TO/toolbox", "args": ["--stdio", "--prebuilt", "looker"], "env": { "LOOKER_BASE_URL": "https://looker.example.com", "LOOKER_CLIENT_ID": "", "LOOKER_CLIENT_SECRET": "", "LOOKER_VERIFY_SSL": "true" } } } }
Open Cursor and navigate to Settings > Cursor Settings > MCP. You should see a green active status after the server is successfully connected.
Open VS Code and create a
.vscode
directory in your project root if it doesn’t exist.Create a
.vscode/mcp.json
file if it doesn’t exist and open it.Add the following configuration, replace the environment variables with your values, and save:
{ "servers": { "looker-toolbox": { "command": "./PATH/TO/toolbox", "args": ["--stdio", "--prebuilt", "looker"], "env": { "LOOKER_BASE_URL": "https://looker.example.com", "LOOKER_CLIENT_ID": "", "LOOKER_CLIENT_SECRET": "", "LOOKER_VERIFY_SSL": "true" } } } }
Open Windsurf and navigate to the Cascade assistant.
Tap on the hammer (MCP) icon, then Configure to open the configuration file.
Add the following configuration, replace the environment variables with your values, and save:
{ "mcpServers": { "looker-toolbox": { "command": "./PATH/TO/toolbox", "args": ["--stdio", "--prebuilt", "looker"], "env": { "LOOKER_BASE_URL": "https://looker.example.com", "LOOKER_CLIENT_ID": "", "LOOKER_CLIENT_SECRET": "", "LOOKER_VERIFY_SSL": "true" } } } }
Use Tools
Your AI tool is now connected to Looker using MCP. Try asking your AI assistant to list models, explores, dimensions, and measures. Run a query, retrieve the SQL for a query, and run a saved Look.
The following tools are available to the LLM:
- get_models: list the LookML models in Looker
- get_explores: list the explores in a given model
- get_dimensions: list the dimensions in a given explore
- get_measures: list the measures in a given explore
- get_filters: list the filters in a given explore
- get_parameters: list the parameters in a given explore
- query: Run a query and return the data
- query_sql: Return the SQL generated by Looker for a query
- query_url: Return a link to the query in Looker for further exploration
- get_looks: Return the saved Looks that match a title or description
- run_look: Run a saved Look and return the data
- make_look: Create a saved Look in Looker and return the URL
- get_dashboards: Return the saved dashboards that match a title or description
- make_dashboard: Create a saved dashboard in Looker and return the URL
- add_dashboard_element: Add a tile to a dashboard
Note
Prebuilt tools are pre-1.0, so expect some tool changes between versions. LLMs will adapt to the tools available, so this shouldn’t affect most users.