Skip to content

dremio/dremio-mcp

Repository files navigation

Dremio MCP server

Table of Contents

Introduction

An Model Context Protocol (MCP) server for easing LLM integration with Dremio.

%%{init:
{
    "themeVariables": {
        "fontFamily": "Inter"
    }
}
}%%

architecture-beta
    group ws(cloud)[Workstation]

    service cf(database)[Config] in ws
    service mcp(server)[Dremio MCP Server] in ws
    service claude(cloud)[Claude Desktop] in ws

    mcp:B <-- T:cf
    claude:R <--> L:mcp


    group dremio(cloud)[Dremio]
    service de(server)[Dremio Engine] in dremio

    mcp:R <--> L:de
Loading

Installation

The MCP server runs locally on the machine that runs the LLM frontend (eg Claude). The installation steps are simple

  1. Clone or download this repository.
  2. Install the uv package manager. The MCP server requires python (3.11 or later)
  3. Do a sanity check by doing
# cd <toplevel git dir> or add `--directory <toplevel git dir>`
# to the command below

$ uv run dremio-mcp-server --help

 Usage: dremio-mcp-server [OPTIONS] COMMAND [ARGS]...

╭─ Options ────────────────────────────────────────────────────────────────────────╮
│ --install-completion            Install completion for the current shell.        │
│ --show-completion               Show completion for the current shell, to copy   │
│                                 it or customize the installation.                │
│ --help                -h        Show this message and exit.                      │
╰──────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────╮
│ run      Run the DremioAI MCP server                                             │
│ tools    Support for testing tools directly                                      │
│ config   Configuration management                                                │
╰──────────────────────────────────────────────────────────────────────────────────╯

Initial setup

There are two configurations necessary before the MCP server can be invoked.

  1. The server config file: This will cover the details of connecting and communicating with Dremio
  2. The LLM config file: This covers configuring the LLM desktop app (Claude for now) to make it aware of the MCP server

Quick start

The quickest way to do this setup is -

  1. Create the dremio config file using
$ uv run dremio-mcp-server config create dremio \
    --uri <dremio uri> \
    --pat <dremio pat> \
    # optional: add your project ID if setting up for dremio cloud
    # --project-id <dremio project id>
  1. Download and install Claude desktop. And then create the Claude config file using
$ uv run dremio-mcp-server config create claude
  1. Validate the config files using
$ uv run dremio-mcp-server config list --type claude`

Default config file: '/Users/..../Library/Application Support/Claude/claude_desktop_config.json' (exists = True)
{
    'globalShortcut': '',
    'mcpServers': {
        'Dremio': {
            'command': '/opt/homebrew/Cellar/uv/0.6.14/bin/uv',
            'args': [
                'run',
                '--directory',
                '...../dremio-mcp',
                'dremio-mcp-server',
                'run'
            ]
        }
    }
}

$ uv run dremio-mcp-server config list --type claude`
Default config file: /Users/..../.config/dremioai/config.yaml (exists = True)
dremio:
  enable_experimental: false
  pat: ....
  uri: ....
tools:
  server_mode: FOR_DATA_PATTERNS

You are done!. You can start Claude and start using the MCP server

Demo

Demo

The rest of the documentation below provides details of the config files

Configuartion details

MCP server config file

This file is located by default at $HOME/.config/dremioai/config.yaml but can be overriden using the --config-file option at runtime for dremio-mcp-server

Format

# The dremio section contains 3 main things - the URI to connect, PAT to use
# and optionally the project_id if using with Dremio Cloud
dremio:
    uri: https://.... # the Dremio URI
    pat: "@~/ws/tokens/idl.token" # PAT can be put in a file and used here with @ prefix
    # optional
    # project_id: ....

tools:
    server_mode: FOR_DATA_PATTERNS # the serverm

# Optionally the MCP server can also connect and use a prometheus configuration if it
# has been enabled for your Dremio cluster (typically useful for SW installations)
#prometheus:
#uri: ...
#token: ...

Modes

There are 3 modes

  1. FOR_DATA_PATTERNS - the normal mode where MCP server will allow LLM to look at tables and data to allow pattern discovery and other use cases
  2. FOR_SELF - a mode which allows the MCP server to introspect Dremio system, including workload analysis and so on.
  3. FOR_PROMETHEUS - a mode that allow MCP server to connect to your prometheus setup, if one exists, to enhance insights with Dremio related metrics

Multiple modes can be specified with separated by ,

The LLM (Claude) config file

To setup the Claude config file (refer to this as an example) edit the Claude desktop config file

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

And then add this section

{
  "globalShortcut": "",
  "mcpServers": {
    "Dremio": {
      "command": "uv",
      "args": [
        "run",
        "--directory", "<toplevel git directory>"
        "dremio-mcp-server",
        "run"
      ]
    }
  }
}

This will pickup the default location of MCP server config file. It can also be passed in the args section above as "--config-file", "<custom config file>" after run

Further Documentation

  1. Architecture: Detailed overview of the Dremio MCP server architecture, including component interactions and data flows.

  2. Tools: Comprehensive guide to available tools, including:

    • Tool categories and types
    • Usage examples
    • Development guidelines
    • Integration support
  3. Settings: Complete configuration reference covering:

    • Dremio connection settings
    • Tool configurations
    • Framework integrations
    • Environment variables
  4. Other frameworks: (Experimental) Integrate the same MCP tools with other agentic frameworks like LangChain or BeeAI without modifying the code base.

Additional Information

This repository is intended to be open source software that encourages contributions of any kind, like adding features, reporting issues and contributing fixes. This is not a part of Dremio product support.

Contributing

Please see our Contributing Guide for details on:

  • Setting up your development environment
  • Making contributions
  • Code style guidelines
  • Documentation requirements