Looker Enterprise MCP Server
README.md
<div align="center">
<img src="assets/banner.svg" alt="Looker Enterprise MCP Server" width="100%">
<h3>Give Claude, Cursor and any MCP-capable agent governed access to your company's Looker.</h3>
<p>
<a href="https://github.com/AlameerAshraf/looker-enterprise-mcp-server/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/AlameerAshraf/looker-enterprise-mcp-server/actions/workflows/ci.yml/badge.svg"></a>
<img alt="Model Context Protocol" src="https://img.shields.io/badge/Model_Context_Protocol-server-7C3AED?style=flat-square">
<img alt="Looker API 4.0" src="https://img.shields.io/badge/Looker_API-4.0-4285F4?style=flat-square&logo=looker&logoColor=white">
<img alt="Node.js 20+" src="https://img.shields.io/badge/Node.js-20%2B-339933?style=flat-square&logo=nodedotjs&logoColor=white">
<img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-strict-3178C6?style=flat-square&logo=typescript&logoColor=white">
<img alt="Docker ready" src="https://img.shields.io/badge/Docker-ready-2496ED?style=flat-square&logo=docker&logoColor=white">
<img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-22C55E?style=flat-square">
</p>
<p>
<img alt="34 tools" src="https://img.shields.io/badge/tools-34-DB2777?style=for-the-badge">
<img alt="Read-only by default" src="https://img.shields.io/badge/read--only-by_default-4F46E5?style=for-the-badge">
<img alt="stdio and HTTP" src="https://img.shields.io/badge/transport-stdio_%7C_HTTP-111827?style=for-the-badge">
</p>
<p>
<img alt="Claude Desktop and Claude Code" src="https://img.shields.io/badge/Claude-Desktop_%26_Code-D97757?style=flat-square&logo=claude&logoColor=white">
<img alt="Cursor" src="https://img.shields.io/badge/Cursor-supported-000000?style=flat-square&logo=cursor&logoColor=white">
<img alt="VS Code" src="https://img.shields.io/badge/VS_Code-supported-007ACC?style=flat-square">
<img alt="Windsurf" src="https://img.shields.io/badge/Windsurf-supported-0E7C66?style=flat-square">
</p>
<a href="#-quick-start"><b>Quick start</b></a> ·
<a href="#-tools"><b>Tools</b></a> ·
<a href="#-configuration"><b>Configuration</b></a> ·
<a href="#-team-deployment-http"><b>Team deployment</b></a> ·
<a href="#-security-model"><b>Security</b></a>
</div>
---
Point it at **your own Looker URL**, give it API keys, and your agent can explore LookML models, run governed queries, summarize dashboards, download CSV, Excel, PDF and PNG files, build Looks and dashboards, schedule deliveries, and report on how Looker is used. Every call runs as the Looker user behind the keys, so the permissions, model sets and row-level access filters you already have in Looker still apply.
## ✨ Highlights
<table>
<tr>
<td width="33%" valign="top">
### 🔎 Explore
Browse models and explores, search for a business term like *revenue* across every explore, and get real dimension values so filters are exact.
</td>
<td width="33%" valign="top">
### 📊 Analyze
Run ad-hoc queries, saved Looks or whole dashboards with filter overrides. Results come back compact, with optional per-column stats and a link to open them in Looker.
</td>
<td width="33%" valign="top">
### 📥 Export
Save results as CSV, XLSX, JSON or Markdown, render charts as PNG, and capture full dashboards as PDF. Images are shown inline in the chat.
</td>
</tr>
<tr>
<td valign="top">
### 🛠️ Build
Save queries as Looks and create dashboards with filters, chart tiles and markdown notes in a single call. *Opt-in.*
</td>
<td valign="top">
### ⏰ Schedule
Set up recurring email or webhook deliveries, or send a Look or dashboard once, right now. *Opt-in.*
</td>
<td valign="top">
### 📈 Govern
See Looker usage from System Activity, run the LookML and Content Validators, and limit the agent to an allowlist of models.
</td>
</tr>
</table>
## 🧭 How it works
```mermaid
flowchart LR
A["🤖 AI agent<br/>Claude · Cursor · VS Code"] -- "MCP<br/>stdio or HTTP" --> B["⚙️ looker-enterprise-mcp-server"]
B -- "Looker API 4.0<br/>(your API keys)" --> C["🏢 Your Looker instance"]
C -- "governed SQL" --> D[("🗄️ Warehouse<br/>BigQuery · Snowflake · Redshift · …")]
B -. "exports" .-> E["📁 CSV · XLSX · PDF · PNG"]
```
The server never connects to your warehouse directly. Looker generates and runs the SQL, so the LookML definitions, caching and access rules stay in charge.
## 🚀 Quick start
### 1. Get Looker API keys
In Looker, go to **Admin → Users → (user) → Edit Keys → New API Key** and copy the client ID and secret.
- **Personal use:** use your own keys. The agent sees exactly what you see in Looker.
- **Shared service user:** give it a role with only the models and permissions the agent should have. The minimum is `access_data` and `see_looks`/`see_user_dashboards`. Add `explore` for ad-hoc queries, `download_without_limit` for large exports, `see_system_activity` for usage reports, `use_sql_runner` for SQL, and `save_content`/`schedule_look_emails` for the write tools.
### 2. Check the connection
No clone needed. `npx` downloads and builds the server straight from GitHub (needs Node 20+ and git):
```bash
LOOKER_BASE_URL=https://yourcompany.cloud.looker.com LOOKER_CLIENT_ID=xxx LOOKER_CLIENT_SECRET=yyy npx -y github:AlameerAshraf/looker-enterprise-mcp-server --check
```
You should see `OK: connected to … as <your user>`. Run this once before step 3: the first run builds the package, which can take longer than some clients wait for a server to start. If something is wrong, the error names the problem, for example an unknown hostname, a refused port or an untrusted certificate.
### 3. Connect your agent
<details open>
<summary><b>Claude Code</b></summary>
```bash
claude mcp add looker -e LOOKER_BASE_URL=https://yourcompany.cloud.looker.com -e LOOKER_CLIENT_ID=xxx -e LOOKER_CLIENT_SECRET=yyy -- npx -y github:AlameerAshraf/looker-enterprise-mcp-server
```
</details>
<details>
<summary><b>Claude Desktop · Cursor · Windsurf</b></summary>
Claude Desktop: `~/Library/Application Support/Claude/claude_desktop_config.json`. Cursor: `~/.cursor/mcp.json`. Windsurf uses the same shape.
```json
{
"mcpServers": {
"looker": {
"command": "npx",
"args": ["-y", "github:AlameerAshraf/looker-enterprise-mcp-server"],
"env": {
"LOOKER_BASE_URL": "https://yourcompany.cloud.looker.com",
"LOOKER_CLIENT_ID": "xxx",
"LOOKER_CLIENT_SECRET": "yyy",
"LOOKER_ALLOW_WRITE": "false"
}
}
}
}
```
</details>
<details>
<summary><b>VS Code</b> (prompts for the secret instead of storing it)</summary>
`.vscode/mcp.json`:
```json
{
"inputs": [{ "id": "looker-secret", "type": "promptString", "description": "Looker client secret", "password": true }],
"servers": {
"looker": {
"command": "npx",
"args": ["-y", "github:AlameerAshraf/looker-enterprise-mcp-server"],
"env": {
"LOOKER_BASE_URL": "https://yourcompany.cloud.looker.com",
"LOOKER_CLIENT_ID": "xxx",
"LOOKER_CLIENT_SECRET": "${input:looker-secret}"
}
}
}
}
```
</details>
<details>
<summary><b>From a local clone</b></summary>
```bash
git clone https://github.com/AlameerAshraf/looker-enterprise-mcp-server.git
```
```bash
cd looker-enterprise-mcp-server && npm install
```
`npm install` builds the server. In the configs above, replace the `npx` command with `node /absolute/path/to/looker-enterprise-mcp-server/dist/index.js`. You can also keep settings in a file and pass `--env-file /path/to/.env` (see [`.env.example`](.env.example)).
</details>
## 💬 Try asking
> "What were our top 10 product categories by revenue last quarter, and how did each change from the quarter before?"
> "Summarize the **Exec Overview** dashboard for EMEA for the last 7 days."
> "Here's a Looker link: … Break the same numbers down by region."
> "Export the *Weekly Pipeline* Look to Excel, and download the Sales dashboard as a PDF with Region set to APAC."
> "Build a dashboard with daily orders, revenue by channel and a notes tile with your findings." *(write tools)*
> "Which dashboards get used the most, and which explores are slow?"
Built-in prompts: `analyze_question`, `summarize_dashboard`, `usage_review`.
## 🧰 Tools
<details open>
<summary><b>Discover and query</b> · always on</summary>
| Tool | What it does |
|---|---|
| `whoami` | Test the connection; show the API user, Looker version and enabled capabilities |
| `list_models` | LookML models and explores, with text search |
| `get_explore` | Dimensions, measures, parameters and required filters, grouped by view |
| `search_fields` | Find which explores contain a business term (for example "revenue") |
| `get_field_values` | Real values of a dimension, so filters are exact |
| `run_query` | Ad-hoc query: columnar rows, optional stats and SQL, and an Explore link |
| `get_query` | Turn a pasted Looker URL (Explore, `/x/` link, Look, dashboard) or query id into a query definition |
</details>
<details open>
<summary><b>Content and downloads</b> · always on</summary>
| Tool | What it does |
|---|---|
| `search_content` | Search Looks and dashboards by title or description |
| `get_look` · `run_look` | Read a saved Look; run it, optionally with different filters |
| `get_dashboard` | A dashboard's filters and tiles, and which filters each tile listens to |
| `run_dashboard` | Run every tile with default or overridden dashboard filters |
| `list_folders` · `get_folder_contents` | Browse folders |
| `export_query` · `export_look` | Save as csv, xlsx, json, md, html or txt, or render a chart as png/jpg |
| `render_dashboard` | Save a whole dashboard as PDF, PNG or JPG, with filters |
| `list_schedules` | Existing email and webhook deliveries |
</details>
<details open>
<summary><b>Admin and governance</b> · always on</summary>
| Tool | What it does |
|---|---|
| `usage_analytics` | Top dashboards, Looks and explores, active users, daily activity, slow queries, errors, query sources |
| `validate_lookml` · `list_projects` | Run the LookML validator |
| `validate_content` | Content Validator: find broken Looks, tiles, filters and schedules |
| `search_users` | Find users, for example to pick schedule recipients |
</details>
<details>
<summary><b>SQL Runner</b> · <code>LOOKER_ALLOW_SQL=true</code></summary>
| Tool | What it does |
|---|---|
| `list_connections` | Database connections configured in Looker |
| `describe_connection` | Browse schemas, tables and columns |
| `run_sql` | Run a single read-only statement through SQL Runner |
</details>
<details>
<summary><b>Write</b> · <code>LOOKER_ALLOW_WRITE=true</code></summary>
| Tool | What it does |
|---|---|
| `create_look` | Save a query as a Look |
| `create_dashboard` | Create a dashboard with filters and tiles (query, Look or markdown) in one call |
| `add_dashboard_tile` · `add_dashboard_filter` | Add to an existing dashboard |
| `update_content` | Rename, move, trash or restore a Look or dashboard |
| `create_schedule` · `send_now` · `delete_schedule` | Recurring or one-off email/webhook deliveries |
</details>
## 🔧 Configuration
| Variable | Default | Description |
|---|---|---|
| `LOOKER_BASE_URL` | **required** | Your instance, for example `https://acme.cloud.looker.com`, or `https://looker.acme.com:19999` for a separate API port. Any pasted Looker link works; only the origin is used |
| `LOOKER_CLIENT_ID` · `LOOKER_CLIENT_SECRET` | **required** (stdio) | API3 keys. `LOOKERSDK_*` names also work |
| `LOOKER_ALLOW_WRITE` | `false` | Turn on the create, update, schedule, send and delete tools |
| `LOOKER_ALLOW_SQL` | `false` | Turn on the SQL Runner tools (read-only statements only) |
| `LOOKER_ALLOWED_MODELS` | all | Comma-separated allowlist of LookML models. Add `system__activity` to allow `usage_analytics` |
| `LOOKER_DEFAULT_ROW_LIMIT` · `LOOKER_MAX_ROW_LIMIT` | `500` · `5000` | Rows returned to the agent |
| `LOOKER_MAX_EXPORT_ROWS` | `100000` | Rows allowed in a file export |
| `LOOKER_MAX_RESPONSE_CHARS` | `80000` | Response size budget. Whole rows are dropped, never cut mid-row |
| `LOOKER_TIMEOUT_SECONDS` | `120` | Timeout for each API call |
| `LOOKER_DOWNLOAD_DIR` | `~/Downloads/looker-mcp` | Where exports and renders are saved |
| `LOOKER_WEB_URL` | derived | Web UI address for links, if it differs from the API host |
| `LOOKER_VERIFY_SSL` | `true` | Last resort only. Prefer `NODE_EXTRA_CA_CERTS=/path/corp-ca.pem` |
| `MCP_HTTP_HOST` · `MCP_HTTP_PORT` | `127.0.0.1` · `3000` | HTTP mode bind address |
| `MCP_HTTP_AUTH_TOKEN` | none | Bearer token required on `/mcp` |
| `LOOKER_ALLOW_HEADER_CREDENTIALS` | `false` | Accept per-user `X-Looker-Client-Id` / `X-Looker-Client-Secret` headers |
Behind a corporate proxy on Node 24 or later, set `NODE_USE_ENV_PROXY=1` together with `HTTPS_PROXY`.
## 🏢 Team deployment (HTTP)
Run one server for the whole team. With `LOOKER_ALLOW_HEADER_CREDENTIALS=true`, each person sends their own Looker keys, so Looker permissions still apply per user. The Looker URL is fixed on the server; clients can't change it.
```bash
git clone https://github.com/AlameerAshraf/looker-enterprise-mcp-server.git && cd looker-enterprise-mcp-server && docker build -t looker-mcp .
```
```bash
docker run -p 3000:3000 -e LOOKER_BASE_URL=https://yourcompany.cloud.looker.com -e MCP_HTTP_AUTH_TOKEN=change-me -e LOOKER_ALLOW_HEADER_CREDENTIALS=true looker-mcp
```
Client config for Streamable HTTP (Claude Code `.mcp.json`, Cursor, and other clients that accept a URL and headers):
```json
{
"mcpServers": {
"looker": {
"type": "http",
"url": "https://mcp.yourcorp.com/mcp",
"headers": {
"Authorization": "Bearer change-me",
"X-Looker-Client-Id": "xxx",
"X-Looker-Client-Secret": "yyy"
}
}
}
}
```
The health check is at `GET /healthz`. Put the server behind TLS (a load balancer or reverse proxy). If you put service-user keys in the server's environment instead, everyone shares that one user's access.
## 🔒 Security model
| | |
|---|---|
| **Looker decides access** | The server never bypasses Looker. Every request uses the API user's token, so permissions, model sets and access filters apply. |
| **Least capability** | Write and SQL tools aren't registered unless you turn them on, so the agent never sees them. `LOOKER_ALLOWED_MODELS` narrows access further, including dashboard tiles and Looks. |
| **SQL guard** | `run_sql` accepts one `SELECT`, `WITH`, `SHOW`, `DESCRIBE` or `EXPLAIN` statement. Database grants on the Looker connection are still the real control. |
| **Risky actions are marked** | `send_now` and `create_schedule` carry `openWorldHint`; `delete_schedule` and `update_content` carry `destructiveHint`, so clients can ask before running them. |
| **Files stay in one folder** | Export file names are reduced to a safe base name inside `LOOKER_DOWNLOAD_DIR`. |
| **Secrets** | Keep keys in your MCP client config or a `.env` file. `.env` is already in `.gitignore`. |
## 🧪 Development
```bash
npm install
```
```bash
npm test
```
```bash
npm run inspect
```
`npm test` builds the project and runs end-to-end tests: a real MCP client, over both stdio and HTTP, talks to this server, which talks to a mock Looker API in [`test/mock-looker.mjs`](test/mock-looker.mjs). CI runs them on Node 20, 22 and 24 and also builds and smoke-tests the Docker image. `npm run inspect` opens the MCP Inspector.
```
src/
├── index.ts CLI entry (stdio, --http, --check)
├── http.ts Stateless Streamable HTTP transport, bearer auth, per-user keys
├── server.ts Tool registration, capability gating, instructions, prompts
├── config.ts Environment configuration
├── looker/client.ts Looker API 4.0 client: login, token refresh, clear network errors
└── tools/ metadata · query (+SQL) · content · export · write (+schedules) · admin
```
## 🚧 Limitations and roadmap
- Sign-in uses API3 keys. Looker OAuth sign-in is not supported yet.
- `run_dashboard` skips merged-results and SQL Runner tiles. Use `render_dashboard` to capture them.
- The Looker API doesn't expose LookML file contents, so `validate_lookml` reports errors without source.
- `usage_analytics` uses the standard `system__activity` field names. If your instance differs, the error names the field, and the agent can fall back to `get_explore("system__activity", "history")` with `run_query`.
## 📄 License
[MIT](LICENSE)
<div align="center">
<br>
<img src="assets/logo.svg" alt="" width="56">
<br>
<sub>Built for teams who already trust Looker as their source of truth.</sub>
</div>
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues