DEV Community

Renato Marinho
Renato Marinho

Posted on

Stop manually exporting Looker data for your LLMs

I've seen too many engineers spend their Tuesday afternoons doing exactly what they shouldn't: downloading CSVs from Looker, cleaning them in Python scripts, and feeding those messy files into a Chat interface just to ask a single question about quarterly trends.

It’s a waste of cognitive load. We have agents now that can reason perfectly; we just haven't given them the right hands to touch our data repositories effectively.

There is a growing trend of people trying to build custom MCP servers locally—using stuff like rmcp or homegrown Node implementations—just to bridge the gap between Claude Code and their internal BI tools. It works if you have three hours to spare and zero production requirements. But once you need to handle OAuth, ensure that your agent isn't performing accidental SSRF attacks against your corporate network, or manage complex permission hierarchies, the DIY approach starts looking very fragile.

That is why I focused on bridging the professional BI layer with the Model Context Protocol (MCP).

The challenge with Looker isn't just 'getting the data.' It’s understanding the semantic layer. If an agent doesn't understand your LookML models, it’s just guessing column names based on raw table schemas. That leads to hallucinations that look incredibly convincing until you check the actual numbers.

A production-grade Looker MCP changes this by exposing the specific tools needed to interact with the Looker ecosystem as discrete functions an agent can call.

Moving beyond simple CRUD

When you hook an agent up via this integration, you aren't just giving it 'read access.' You are giving it a toolkit designed for investigative workflows:

  • Dynamic Data Queries (run_inline_query): Instead of asking for a whole dataset, an agent can request specific dimensions and measures from a particular model and view. It pulls only what is necessary (up to 100 rows), keeping context windows clean.
  • Dashboard Orchestration (get_dashboard & list_dashboards): An agent can traverse your entire dashboard library. It doesn't just see titles; it sees the query structures and filter configurations that define those dashboards.
  • Content Discovery (search_content & list_folders): This solves the 'where is that report?' problem. You can ask, "Find all dashboards related to Marketing ROI," and the agent uses metadata searching to pinpoint exact UUIDs instead of blind guessing.
  • Audit Capabilities (get_look & list_looks): Understanding historical reporting through 'Looks' becomes conversational. You can trace back how specific datasets were previously mapped and filtered.

The nuance most people miss

A common mistake when building AI + Data integrations is assuming the Agent needs raw SQL access. In an enterprise environment like Looker, giving an LLM direct SQL access is usually a massive security risk and bypasses all the hard work your data engineers put into defining metrics within LookML.

You want the agent to respect the semantic layer. By utilizing run_inline_query, the agent operates within the boundaries defined by your existing models. It asks for 'orders.total_amount', not SELECT sum(price).... This ensures that whatever business logic is baked into Looker remains the single source of truth.

The implementation I pushed through Vinkius handles this complexity under heavy isolation layers (V8 sandboxes) so you aren't accidentally creating new attack vectors while trying to automate analysis.

Practical Workflows

You might think this is just for analysts, but anyone sitting in front of a terminal can leverage this differently:

For Platform Engineers:
You can audit folder hierarchies or resource inventory across tenants without clicking through nested UI menus. Need to know which users have access to certain logical groups? Ask it.

For Data Analysts:
You move from "exporting reports" to "validating hypotheses." You tell your IDE (like Cursor) or Claude Code: "Check if there was a spike in orders yesterday compared to last week using the sales model," and it executes precisely because it understands dimensions versus measures.

The goal isn't to replace the analyst; it's to remove the latency between having a question and seeing the data change color in a visualization.


MCPs are the music of AI Agents. We built the catalog. Discover Vinkius MCP Catalog.

Top comments (0)