
Model Context Protocol (MCP) is a technology designed to allow LLMs to access other applications. In the most common use case, the MCP server exposes one or more “Tools” to the LLM along with structured metadata about the Tool’s request parameters and response. In addition the MCP server can expose unstructured natural language information about how the Tool is called and what type of information the tool returns. Agents such as Gemini CLI or Claude Desktop can use MCP to query databases and call APIs.
Now, starting with version 0.10.0, Google’s MCP Toolbox has been enhanced to provide access to Looker via MCP through a set of prebuilt tools. These tools allow an agent to explore the structure of the Looker semantic model by retrieving models, explores, measures, dimensions. Then the agent can issue queries to Looker and retrieve the data.
For example, a Looker user can ask their Agent to retrieve the revenue for the year 2024, broken down by sales channel and pivoted by product category. Here is a sample of one such request in Gemini-CLI:
███ █████████ ██████████ ██████ ██████ █████ ██████ █████ █████
░░░███ ███░░░░░███`░░███░░░░░█░░██████ ██████ ░░███ ░░██████ ░░███ ░░███
░░░███ ███ ░░░ ░███ █ ░ ░███░█████░███ ░███ ░███░███ ░███ ░███
░░░███ ░███ ░██████ ░███░░███ ░███ ░███ ░███░░███░███ ░███
███░ ░███ █████ ░███░░█ ░███ ░░░ ░███ ░███ ░███ ░░██████ ░███
███░ ░░███ ░░███ ░███ ░ █ ░███ ░███ ░███ ░███ ░░█████ ░███
███░ ░░█████████ ██████████ █████ █████ █████ █████ ░░█████ █████
░░░ ░░░░░░░░░ ░░░░░░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░ ░░░░░Tips for getting started:
1. Ask questions, edit files, or run commands.
2. Be specific for the best results.
3. Create GEMINI.md files to customize your interactions with Gemini.
4. /help for more information.
╭────────────────────────────────────────────────────────────────────╮
│ > using cymbal pets, what is my revenue for 2024 broken down by channel and │
│ pivoted by product category? │
╰────────────────────────────────────────────────────────────────────╯
╭───────────────────────────────────────────────────────────────────╮
│ ✔ get_models (looker-opm MCP Server) {} │
╰───────────────────────────────────────────────────────────────────╯
╭───────────────────────────────────────────────────────────────────╮
│ ✔ get_explores (looker-opm MCP Server) {"model":"cymbal_pets"} │
╰───────────────────────────────────────────────────────────────────╯
╭───────────────────────────────────────────────────────────────────────────╮
│ ✔ get_measures (looker-opm MCP Server) {"explore":"order_items","model":"cymbal_pets… │
│ ✔ get_dimensions (looker-opm MCP Server) {"model":"cymbal_pets","explore":"order_ite… │
╰───────────────────────────────────────────────────────────────────────────╯
╭───────────────────────────────────────────────────────────────────────────╮
│ ✔ query (looker-opm MCP Server) {"pivots":["products.category"],"explore":"order_ite… │
╰───────────────────────────────────────────────────────────────────────────╯
✦ Here is your revenue for 2024, broken down by channel and pivoted by product category:
Offline Channel:
* Accessories: 13,603,350.20
* Food: 17,010,305.86
* Health & Wellness: 9,608,899.20
* Toys: 3,716,282.07
Online Channel:
* Accessories: 21,296,070.30
* Food: 26,765,431.48
* Health & Wellness: 15,064,801.49
* Toys: 5,848,423.79
Here we can see that the LLM first inspects the available models using the get_models tool. Then it searches for promising explores. Once it identifies an explore, it checks to see what dimensions and measures are available. Finally the LLM builds the filters and queries Looker.
Here is a similar question handled by Claude Desktop:
This integration is now available with no coding on the customer side, just download the MCP server, configure it with Looker API credentials, and connect it with your MCP enabled data agent of choice.
For Gemini-CLI, edit the file `$HOME/.gemini/settings.json` (on Linux or Mac OS or the equivalent file on Windows) and add a stanza like below, setting the path to the toolbox executable and setting the parameters for your Looker server. The client id and client secret are API credentials, not your regular credentials:
"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 Gemini-CLI and type CTRL-t to see your MCP tools loaded.
Go to setting up Gemini-CLI with Looker for full instructions. Other agents usually use the same json stanza, but have this stanza in different files.
Source Credit: https://medium.com/google-cloud/mcp-support-for-looker-with-mcp-toolbox-4ce667fe42da?source=rss—-e52cf94d98af—4