Connect your IDE to Looker using MCP Toolbox

This page shows you how to use MCP Toolbox for databases to connect your Looker instance to integrated development environments (IDEs) and developer tools that support Model Context Protocol (MCP). Use these tools to run queries and interact with Looker. This guide is for developers who use their existing IDEs and developer tools to work with Looker.

MCP is an open protocol for connecting large language models (LLMs) to data sources like Looker. This page describes how to use MCP Toolbox for Databases to expose your developer assistance tools to a Looker instance using the following IDEs:

Set up Looker

  1. Get a Looker Client ID and Client Secret. Follow the directions on the Looker API authentication documentation page.
  2. 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 use https://looker.example.com:19999 instead.

Install MCP Toolbox

  1. Download the latest version of MCP Toolbox as a binary. Select the binary that corresponds to your OS and CPU architecture. You must use MCP Toolbox version V0.10.0 or later.

    linux/amd64

    curl -O https://storage.googleapis.com/genai-toolbox/v0.12.0/linux/amd64/toolbox

    darwin/arm64

    curl -O https://storage.googleapis.com/genai-toolbox/v0.12.0/darwin/arm64/toolbox

    darwin/amd64

    curl -O https://storage.googleapis.com/genai-toolbox/v0.12.0/darwin/amd64/toolbox

    windows/amd64

    curl -O https://storage.googleapis.com/genai-toolbox/v0.12.0/windows/amd64/toolbox.exe

  2. Make the binary an executable.

    chmod +x toolbox
    
  3. Verify the installation.

    ./toolbox --version
    

Configure the MCP client

Gemini CLI

  1. Install the Gemini CLI.
  2. In your working directory, create a folder named .gemini. Inside that folder, create a settings.json file.
  3. Add the following configuration, replacing the following environment variables with your values, and then save.
    • LOOKER_URL: The URL of your Looker instance.
    • CLIENT_ID and CLIENT_SECRET: The API key that is used to access the Looker API.
    • VERIFY_SSL: Either true or false, depending on whether you use SSL encryption to connect your database to your Looker instance.
{
  "mcpServers": {
    "looker-toolbox": {
      "command": "./PATH/TO/toolbox",
      "args": ["--stdio", "--prebuilt", "looker"],
      "env": {
          "LOOKER_BASE_URL": "LOOKER_URL",
          "LOOKER_CLIENT_ID": "CLIENT_ID",
          "LOOKER_CLIENT_SECRET": "CLIENT_SECRET",
          "LOOKER_VERIFY_SSL": "VERIFY_SSL",
     }
    }
  }
}

Claude code

  1. Install Claude Code.
  2. Create the .mcp.json file in your project root, if it doesn't exist.
  3. Add the following configuration, replacing the following environment variables with your values, and then save.
    • LOOKER_URL: The URL of your Looker instance.
    • CLIENT_ID and CLIENT_SECRET: The API key that is used to access the Looker API.
    • VERIFY_SSL: Either true or false, depending on whether you use SSL encryption to connect your database to your Looker instance.

{
  "mcpServers": {
    "looker-toolbox": {
      "command": "./PATH/TO/toolbox",
      "args": ["--stdio", "--prebuilt", "looker"],
      "env": {
          "LOOKER_BASE_URL": "LOOKER_URL",
          "LOOKER_CLIENT_ID": "CLIENT_ID",
          "LOOKER_CLIENT_SECRET": "CLIENT_SECRET",
          "LOOKER_VERIFY_SSL": "VERIFY_SSL",
     }
    }
  }
}

Claude desktop

  1. Open Claude Desktop and navigate to Settings.
  2. In the Developer tab, click Edit Config to open the configuration file.
  3. Add the following configuration, replacing the following environment variables with your values, and then save.
    • LOOKER_URL: The URL of your Looker instance.
    • CLIENT_ID and CLIENT_SECRET: The API key that is used to access the Looker API.
    • VERIFY_SSL: Either true or false, depending on whether you use SSL encryption to connect your database to your Looker instance.

{
  "mcpServers": {
    "looker-toolbox": {
      "command": "./PATH/TO/toolbox",
      "args": ["--stdio", "--prebuilt", "looker"],
      "env": {
          "LOOKER_BASE_URL": "LOOKER_URL",
          "LOOKER_CLIENT_ID": "CLIENT_ID",
          "LOOKER_CLIENT_SECRET": "CLIENT_SECRET",
          "LOOKER_VERIFY_SSL": "VERIFY_SSL",
     }
    }
  }
}
  1. Restart Claude Desktop.
  2. The new chat screen displays a hammer (MCP) icon with the new MCP server.

Cline

  1. Open the Cline extension in VS Code and click the MCP Servers icon.
  2. Click Configure MCP Servers to open the configuration file.
  3. Add the following configuration, replacing the following environment variables with your values, and then save.
    • LOOKER_URL: The URL of your Looker instance.
    • CLIENT_ID and CLIENT_SECRET: The API key that is used to access the Looker API.
    • VERIFY_SSL: Either true or false, depending on whether you use SSL encryption to connect your database to your Looker instance.

{
  "mcpServers": {
    "looker-toolbox": {
      "command": "./PATH/TO/toolbox",
      "args": ["--stdio", "--prebuilt", "looker"],
      "env": {
          "LOOKER_BASE_URL": "LOOKER_URL",
          "LOOKER_CLIENT_ID": "CLIENT_ID",
          "LOOKER_CLIENT_SECRET": "CLIENT_SECRET",
          "LOOKER_VERIFY_SSL": "VERIFY_SSL",
     }
    }
  }
}

A green active status appears after the server connects successfully.

Cursor

  1. Create the .cursor directory in your project root if it doesn't exist.
  2. Create the .cursor/mcp.json file if it doesn't exist, and open it.
  3. Add the following configuration, replacing the following environment variables with your values, and then save.
    • LOOKER_URL: The URL of your Looker instance.
    • CLIENT_ID and CLIENT_SECRET: The API key that is used to access the Looker API.
    • VERIFY_SSL: Either true or false, depending on whether you use SSL encryption to connect your database to your Looker instance.
{
  "mcpServers": {
    "looker-toolbox": {
      "command": "./PATH/TO/toolbox",
      "args": ["--stdio", "--prebuilt", "looker"],
      "env": {
          "LOOKER_BASE_URL": "LOOKER_URL",
          "LOOKER_CLIENT_ID": "CLIENT_ID",
          "LOOKER_CLIENT_SECRET": "CLIENT_SECRET",
          "LOOKER_VERIFY_SSL": "VERIFY_SSL",
     }
    }
  }
}
  1. Open Cursor and navigate to Settings > Cursor Settings > MCP. A green active status appears when the server connects.

Visual Studio Code (Copilot)

  1. Open VS Code and create the .vscode directory in your project root if it doesn't exist.
  2. Create the .vscode/mcp.json file if it doesn't exist, and open it.
  3. Add the following configuration, replacing the following environment variables with your values, and then save.
    • LOOKER_URL: The URL of your Looker instance.
    • CLIENT_ID and CLIENT_SECRET: The API key that is used to access the Looker API.
    • VERIFY_SSL: Either true or false, depending on whether you use SSL encryption to connect your database to your Looker instance.
{
  "mcpServers": {
    "looker-toolbox": {
      "command": "./PATH/TO/toolbox",
      "args": ["--stdio", "--prebuilt", "looker"],
      "env": {
          "LOOKER_BASE_URL": "LOOKER_URL",
          "LOOKER_CLIENT_ID": "CLIENT_ID",
          "LOOKER_CLIENT_SECRET": "CLIENT_SECRET",
          "LOOKER_VERIFY_SSL": "VERIFY_SSL",
     }
    }
  }
}

Windsurf

  1. Open Windsurf and navigate to Cascade assistant.
  2. Click the MCP icon, then click Configure to open the configuration file.
  3. Add the following configuration, replacing the following environment variables with your values, and then save.
    • LOOKER_URL: The URL of your Looker instance.
    • CLIENT_ID and CLIENT_SECRET: The API key that is used to access the Looker API.
    • VERIFY_SSL: Either true or false, depending on whether you use SSL encryption to connect your database to your Looker instance.
{
  "mcpServers": {
    "looker-toolbox": {
      "command": "./PATH/TO/toolbox",
      "args": ["--stdio", "--prebuilt", "looker"],
      "env": {
          "LOOKER_BASE_URL": "LOOKER_URL",
          "LOOKER_CLIENT_ID": "CLIENT_ID",
          "LOOKER_CLIENT_SECRET": "CLIENT_SECRET",
          "LOOKER_VERIFY_SSL": "VERIFY_SSL",
     }
    }
  }
}

Use AI tools

Your AI tool is now connected to Looker using MCP. Try asking your AI assistant to list models, Explores, dimensions, and measures. You can also run a query by retrieving the SQL for a query or running a saved Look.

The following tools are available to the LLM:

  • get_models: List all LookML models on your Looker instance.
  • 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 that is 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.