- Explore MCP Servers
- dremio-python-mcp
Dremio Python Mcp
What is Dremio Python Mcp
dremio-python-mcp is a Model-Context Protocol (MCP) server designed for Dremio, providing a standardized method to interact with Dremio databases.
Use cases
Use cases include querying data from Dremio for reporting, integrating Dremio with data processing pipelines, and building applications that require database interactions.
How to use
To use dremio-python-mcp, install it via pip or uv, configure the connection settings in a ‘config.yaml’ file, and utilize the provided tools to list catalogs, schemas, tables, and execute SQL queries.
Key features
Key features include exposing Dremio data through resources, listing catalogs, schemas, and tables, and executing SQL queries with structured results and metadata.
Where to use
dremio-python-mcp can be used in data analytics, business intelligence, and any application requiring interaction with Dremio databases.
Overview
What is Dremio Python Mcp
dremio-python-mcp is a Model-Context Protocol (MCP) server designed for Dremio, providing a standardized method to interact with Dremio databases.
Use cases
Use cases include querying data from Dremio for reporting, integrating Dremio with data processing pipelines, and building applications that require database interactions.
How to use
To use dremio-python-mcp, install it via pip or uv, configure the connection settings in a ‘config.yaml’ file, and utilize the provided tools to list catalogs, schemas, tables, and execute SQL queries.
Key features
Key features include exposing Dremio data through resources, listing catalogs, schemas, and tables, and executing SQL queries with structured results and metadata.
Where to use
dremio-python-mcp can be used in data analytics, business intelligence, and any application requiring interaction with Dremio databases.
Content
Dremio Model-Context Protocol (MCP)
This project implements a Model-Context Protocol (MCP) server for Dremio. It provides a standardized way to interact with Dremio databases through the MCP.
Features
Resources
Exposes Dremio data through Resources:
dremio://catalogs
- Lists all catalogsdremio://schemas/{catalog}
- Lists all schemas in a catalogdremio://tables/{catalog}/{schema}
- Lists all tables in a schemadremio://schema/{table_name}
- Gets schema information for a table
Tools
-
list_catalogs
- Lists all available catalogs in Dremio
- Usage:
list_catalogs()
-
list_schemas
- Lists all schemas in a specific catalog
- Usage:
list_schemas("catalog_name")
-
list_tables
- Lists all tables in a specific schema
- Usage:
list_tables("catalog_name", "schema_name")
-
execute_sql
- Executes a SQL query against Dremio
- Returns results in a structured format with metadata
- Usage:
execute_sql("SELECT * FROM catalog.schema.table LIMIT 10")
Requirements
- Python 3.10+
- Dremio instance (Cloud or Software)
- PyArrow with Flight support
Installation
Using pip
pip install -e .
Using uv (recommended)
# Install uv if you don't have it
curl -sSf https://astral.sh/uv/install.sh | bash
# Install the package
uv pip install -e .
Configuration
Create a config.yaml
file in the root directory with the following configuration:
# Dremio connection settings
dremio:
# Connection type: 'software' for Dremio Software or 'cloud' for Dremio Cloud
type: software
# Dremio Software connection details
software:
hostname: localhost
port: 32010
username: your_username
password: your_password
use_ssl: false
# Query settings
query:
# Maximum number of rows to return in a query result
max_rows: 10000
# Maximum number of columns to return in schema request
max_columns: 1000
# Timeout in seconds for query execution
timeout: 300
Environment Variables
You can also configure the server using environment variables:
DREMIO_HOSTNAME=localhost DREMIO_PORT=32010 DREMIO_USERNAME=your_username DREMIO_PASSWORD=your_password DREMIO_USE_SSL=false
For Dremio Cloud:
DREMIO_TYPE=cloud DREMIO_ENDPOINT=data.dremio.cloud DREMIO_PAT_TOKEN=your_personal_access_token
Usage
Running the Server
# If installed from package
mcp-dremio-server
# Or run directly
python run_mcp_server.py
Integration with Claude or Other MCP Clients
Add the following configuration to your MCP client settings:
MacOS
Windows
Example Usage
Listing Catalogs and Schemas
// List all catalogs list_catalogs() // List schemas in a catalog list_schemas("my_catalog") // List tables in a schema list_tables("my_catalog", "my_schema")
Executing SQL Queries
// Execute a query results = execute_sql("SELECT * FROM my_catalog.my_schema.my_table LIMIT 10")
Security Features
- SQL Validation: Prevents execution of non-read-only queries
- Input Validation: Prevents SQL injection via table/schema names
- TLS Support: Secure communication with Dremio
- Authentication: Support for username/password and token authentication
Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, use the MCP Inspector:
npx @modelcontextprotocol/inspector mcp-dremio-server
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
License
This project is licensed under the MIT License - see the LICENSE file for details.