Skip to main content
Glama

databricks-mcp

This is a very thin wrapper around the databricks CLI.

Security

This server passes any command directly to databricks without filtering. It can do anything your authenticated Databricks profile allows.

To control what the server can do, scope your authentication:

The server prevents shell injection by design — commands are passed as argument arrays to Bun.spawn, never interpolated into a shell string.

Related MCP server: MCP Shell Server

Installation

1. Install the Databricks CLI

Install the Databricks CLI using Homebrew on macOS:

brew tap databricks/tap
brew trust databricks/tap
brew install databricks

Or download the binary directly. Verify your installation:

databricks -v

2. Authenticate

Configure a Databricks profile:

databricks auth login

Follow the prompts to set your workspace URL and authentication method. Verify your configuration:

databricks auth describe

3. Install bun

This project uses bun for package management. Verify your installation.

bun --version

4. Clone the repo and install dependencies

git clone https://github.com/jarrettmeyer/databricks-mcp.git
cd databricks-mcp
bun install

5. Add the server to your MCP client

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

Note: bun installs to ~/.bun/bin/, which is not on the default PATH. Use the full path to the bun executable.

{
  "mcpServers": {
    "databricks": {
      "command": "/Users/your-username/.bun/bin/bun",
      "args": ["run", "/path/to/databricks-mcp/src/index.ts"]
    }
  }
}

Restart Claude Desktop.

Claude Code

Install from your terminal:

claude mcp add databricks -- bun run /path/to/databricks-mcp/src/index.ts

If databricks is in a non-standard location, pass DATABRICKS_PATH via --env:

claude mcp add databricks --env DATABRICKS_PATH=/opt/homebrew/bin/databricks -- bun run /path/to/databricks-mcp/src/index.ts

Usage

send_command

Execute a databricks CLI command. Pass everything that would follow databricks on the command line as the command string.

Parameter

Type

Description

command

string

The databricks subcommand and arguments to run

Examples:

List clusters in a workspace:
  command: "clusters list"

Get details for a specific cluster:
  command: "clusters get 1234-567890-a12bcde3"

List jobs:
  command: "jobs list"

Run a SQL query:
  command: "sql query --query 'SELECT 1' --warehouse-id abc123"

Check authentication status:
  command: "auth describe"

This tool works with any MCP-compatible client, including Claude Desktop, Claude Code, and Cursor.

Pipes and redirects

If the command contains a pipe (|) or redirect (>, <), the server strips the operator and everything after it, then executes only the databricks portion. The raw output is returned so the client can filter or format it.

Pipe is stripped — only "clusters list" runs:
  command: "clusters list | grep running"

Redirect is stripped — only "clusters list" runs:
  command: "clusters list > output.txt"

First pipe wins — only "clusters list" runs:
  command: "clusters list | grep running | head -5"

Operators inside quoted arguments are preserved, so SQL containing > or | is unaffected:

The > inside the quoted query is kept:
  command: 'sql query --query "SELECT * FROM t WHERE a > 1"'

Other shell syntax — ;, &&, comments (#), glob patterns (*.json), and variable references ($VAR) — is not supported and will produce an error.

Additional Configuration

DATABRICKS_PATH

By default, the server resolves databricks from your PATH. If databricks is installed in a non-standard location, set DATABRICKS_PATH to its absolute path:

{
  "mcpServers": {
    "databricks": {
      "command": "/Users/your-username/.bun/bin/bun",
      "args": ["run", "/path/to/databricks-mcp/src/index.ts"],
      "env": {
        "DATABRICKS_PATH": "/opt/homebrew/bin/databricks"
      }
    }
  }
}

Resources

License

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables secure execution of whitelisted shell commands through MCP, with support for stdin input, timeout control, and comprehensive output including stdout, stderr, and execution time.
    1
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides a secure, token-authenticated command execution tool over MCP Streamable HTTP, with a default-deny allowlist and shell metacharacter rejection.
    12 npm
    1
    Apache 2.0