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:
- 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:19999instead.
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.10.0/linux/amd64/toolboxcurl -O https://storage.googleapis.com/genai-toolbox/v0.10.0/darwin/arm64/toolboxcurl -O https://storage.googleapis.com/genai-toolbox/v0.10.0/darwin/amd64/toolboxcurl -O https://storage.googleapis.com/genai-toolbox/v0.10.0/windows/amd64/toolbox.exeMake the binary executable:
chmod +x toolboxVerify the installation:
./toolbox --version
Configure your MCP Client
Install Claude Code.
Create a
.mcp.jsonfile 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
.cursordirectory in your project root if it doesn’t exist.Create a
.cursor/mcp.jsonfile 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
.vscodedirectory in your project root if it doesn’t exist.Create a
.vscode/mcp.jsonfile 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 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
- query_sql: Return the SQL generated by Looker for a query
- get_looks: Return the saved Looks that match a title or description
- run_look: Run a saved Look and return the data
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.