Skip to main content
Glama

Databricks MCP Server

A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with Databricks workspaces programmatically. This server provides tools for cluster management, notebook operations, job orchestration, Unity Catalog data governance, user management, permissions control, and FinOps cost analytics.

Features

πŸ–₯️ Cluster Management

  • List, create, start, stop, and terminate clusters

  • Edit cluster configurations and resize clusters

  • Get cluster events and logs

  • Pin/unpin clusters for organization

πŸ“” Notebook Management

  • List, create, read, and update notebooks

  • Execute notebooks with parameters

  • Import/export notebooks in multiple formats

  • Move and organize notebooks in workspace

βš™οΈ Job Management

  • Create and manage jobs with complex workflows

  • Schedule jobs with cron expressions

  • Trigger manual job runs

  • Monitor job execution and retrieve outputs

  • Configure notifications and alerts

πŸ‘₯ User & Group Management

  • List and manage workspace users

  • Create and manage groups

  • Add/remove users from groups

  • Manage service principals

πŸ—„οΈ Unity Catalog

  • Manage catalogs, schemas, and tables

  • Query table metadata and statistics

  • List volumes and external locations

  • Execute SQL queries on catalog tables

πŸ”’ Permissions & Access Control

  • Get and set permissions on workspace objects

  • Manage Unity Catalog grants and privileges

  • View effective permissions

  • Audit access control

πŸ’° FinOps & Cost Analytics

  • Analyze cluster costs and DBU consumption

  • Track spending trends over time

  • Forecast future costs

  • Get cost optimization recommendations

  • Analyze costs by custom tags

Related MCP server: Databricks MCP Server

Installation

Prerequisites

  • Node.js 18 or higher

  • npm or yarn

  • A Databricks workspace

  • Databricks personal access token or service principal credentials

Install from npm

npm install -g databricks-mcp-server

Install from source

git clone https://github.com/yourusername/databricks-mcp-server.git
cd databricks-mcp-server
npm install
npm run build

Configuration

Environment Variables

Create a .env file in your project directory:

DATABRICKS_HOST=https://your-workspace.cloud.databricks.com
DATABRICKS_TOKEN=your-personal-access-token

For more configuration options, see CONFIGURATION.md.

Claude Desktop Configuration

Add this to your Claude Desktop configuration file:

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

{
  "mcpServers": {
    "databricks": {
      "command": "databricks-mcp-server",
      "env": {
        "DATABRICKS_HOST": "https://your-workspace.cloud.databricks.com",
        "DATABRICKS_TOKEN": "your-personal-access-token"
      }
    }
  }
}

Quick Start

Once configured, you can interact with your Databricks workspace through your AI assistant:

Example Queries

Cluster Management:

  • "List all running clusters in my workspace"

  • "Create a new cluster with 4 workers using the latest Spark version"

  • "Terminate the idle clusters to save costs"

Notebook Operations:

  • "Show me all notebooks in the /Users/me/projects directory"

  • "Create a new Python notebook for data analysis"

  • "Run the ETL notebook with these parameters"

Job Management:

  • "List all scheduled jobs"

  • "Create a daily job to run my data pipeline notebook"

  • "What's the status of job run 12345?"

Unity Catalog:

  • "List all catalogs in my metastore"

  • "Show me the schema for the sales.customers table"

  • "Query the last 10 records from production.analytics.metrics"

Cost Analytics:

  • "What are my cluster costs for the last 30 days?"

  • "Show me spending trends by week"

  • "Give me cost optimization recommendations"

  • "Forecast costs for the next month"

Available Tools

The server provides 60+ tools organized into 7 categories:

Cluster Tools (11 tools)

  • list_clusters - List all clusters

  • get_cluster_details - Get detailed cluster info

  • create_cluster - Create a new cluster

  • start_cluster - Start a terminated cluster

  • restart_cluster - Restart a cluster

  • terminate_cluster - Terminate a cluster

  • edit_cluster - Edit cluster configuration

  • resize_cluster - Resize cluster workers

  • get_cluster_events - Get cluster event history

  • pin_cluster - Pin a cluster

  • unpin_cluster - Unpin a cluster

Notebook Tools (8 tools)

  • list_notebooks - List notebooks in a path

  • read_notebook - Read notebook content

  • create_notebook - Create a new notebook

  • update_notebook - Update notebook content

  • delete_notebook - Delete a notebook

  • move_notebook - Move/rename a notebook

  • create_directory - Create workspace directory

  • run_notebook - Execute a notebook

Job Tools (10 tools)

  • list_jobs - List all jobs

  • get_job_details - Get job configuration

  • create_job - Create a new job

  • update_job - Update job settings

  • delete_job - Delete a job

  • run_job - Trigger a job run

  • get_job_run_status - Check run status

  • list_job_runs - List job run history

  • cancel_job_run - Cancel a running job

  • get_job_run_output - Get job output

User Tools (11 tools)

  • list_users - List all users

  • get_user_details - Get user information

  • create_user - Add a new user

  • delete_user - Remove a user

  • list_groups - List all groups

  • get_group_details - Get group info

  • create_group - Create a new group

  • delete_group - Delete a group

  • add_user_to_group - Add user to group

  • remove_user_from_group - Remove user from group

  • list_service_principals - List service principals

Unity Catalog Tools (12 tools)

  • list_catalogs - List all catalogs

  • get_catalog_details - Get catalog info

  • create_catalog - Create a catalog

  • delete_catalog - Delete a catalog

  • list_schemas - List schemas in catalog

  • get_schema_details - Get schema info

  • create_schema - Create a schema

  • delete_schema - Delete a schema

  • list_tables - List tables in schema

  • get_table_details - Get table metadata

  • delete_table - Delete a table

  • list_volumes - List volumes

  • list_external_locations - List external locations

  • query_table - Execute SQL query

Permission Tools (7 tools)

  • get_permissions - Get object permissions

  • set_permissions - Set object permissions

  • update_permissions - Update object permissions

  • get_permission_levels - Get available permission levels

  • grant_unity_catalog_permissions - Grant UC privileges

  • revoke_unity_catalog_permissions - Revoke UC privileges

  • get_effective_permissions - Get effective UC permissions

FinOps Tools (5 tools)

  • get_cluster_costs - Analyze cluster costs

  • analyze_spending_trends - View spending trends

  • forecast_costs - Forecast future costs

  • get_optimization_recommendations - Get cost-saving recommendations

  • analyze_cost_by_tag - Analyze costs by tags

For detailed documentation of all tools, see API.md.

Development

Building

npm run build

Running in Development

npm run dev

Project Structure

databricks-mcp-server/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ index.ts                 # MCP server entry point
β”‚   β”œβ”€β”€ databricks-client.ts     # Databricks API client
β”‚   β”œβ”€β”€ tools/
β”‚   β”‚   β”œβ”€β”€ clusters.ts          # Cluster management tools
β”‚   β”‚   β”œβ”€β”€ notebooks.ts         # Notebook management tools
β”‚   β”‚   β”œβ”€β”€ jobs.ts              # Job management tools
β”‚   β”‚   β”œβ”€β”€ users.ts             # User/group management tools
β”‚   β”‚   β”œβ”€β”€ unity-catalog.ts     # Unity Catalog tools
β”‚   β”‚   β”œβ”€β”€ permissions.ts       # Permission tools
β”‚   β”‚   └── finops.ts            # FinOps tools
β”‚   └── types/
β”‚       └── databricks.ts        # TypeScript type definitions
β”œβ”€β”€ dist/                        # Compiled output
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
└── README.md

Examples

See EXAMPLES.md for detailed usage examples and common workflows.

Authentication

The server supports multiple authentication methods:

  1. Personal Access Token (recommended for individual use)

  2. Service Principal OAuth (recommended for production)

  3. Azure AD Token (for Azure Databricks)

See CONFIGURATION.md for detailed authentication setup.

Security Best Practices

  • Store credentials in environment variables, never in code

  • Use service principals for production deployments

  • Implement least-privilege access for service accounts

  • Rotate tokens regularly

  • Use Unity Catalog for fine-grained data access control

Limitations

  • Cost estimates in FinOps tools are approximations. For accurate billing, use the Databricks billing API or account console

  • Some operations require specific Databricks editions (Unity Catalog requires Premium/Enterprise)

  • Rate limiting is handled automatically with exponential backoff

  • SQL execution requires a running SQL warehouse

Troubleshooting

Common Issues

Authentication Failed

  • Verify your DATABRICKS_HOST is correct and includes https://

  • Check that your DATABRICKS_TOKEN is valid and not expired

  • Ensure your token has sufficient permissions

Tool Not Found

  • Make sure the server is properly installed and configured

  • Check Claude Desktop configuration file syntax

  • Restart Claude Desktop after configuration changes

Permission Denied

  • Verify your token has the required permissions

  • Check workspace access controls

  • Review Unity Catalog grants for data access

For more troubleshooting help, see CONFIGURATION.md.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details

Support

For issues, questions, or contributions:

Acknowledgments

Built with the Model Context Protocol SDK by Anthropic.

Available Tools

66 tools
add_user_to_groupA

Add a user to a group to grant them group-level permissions and access.

Inputs: user_id (required), group_id (required).

analyze_cost_by_tagB

Analyze costs broken down by custom tags to understand spending by project, team, or environment.

Inputs: tag_key (required), end_date (required), start_date (required).

cancel_job_runA

Cancel a running or pending job run.

Inputs: run_id (required).

create_catalogC

Create a new Unity Catalog catalog.

Inputs: name (required), comment, storage_root.

create_clusterB

Create a new Databricks cluster with custom configuration. Supports both fixed-size and autoscaling clusters with various runtime options.

Inputs: cluster_name (required), node_type_id (required), spark_version (required), policy_id, +10 more.

create_directoryB

Create a new directory in the workspace to organize notebooks.

Inputs: path (required).

create_groupB

Create a new group in the Databricks workspace for organizing users and permissions.

Inputs: displayName (required).

create_jobC

Create a new job with tasks, schedules, and dependencies. Supports notebook, JAR, Python, and SQL tasks.

Inputs: name (required), tags, cluster_id, max_retries, +10 more.

create_notebookC

Create a new notebook in the workspace with optional initial content. Supports Python, Scala, SQL, and R.

Inputs: path (required), format, content, language.

create_schemaC

Create a new schema in a catalog.

Inputs: name (required), catalog_name (required), comment, storage_root.

create_userC

Add a new user to the Databricks workspace.

Inputs: userName (required), email, displayName.

delete_catalogB

Delete a Unity Catalog catalog. Use force=true to delete catalogs with schemas.

Inputs: catalog_name (required), force.

delete_groupC

Delete a group from the Databricks workspace.

Inputs: group_id (required).

delete_jobB

Delete a job permanently from the workspace.

Inputs: job_id (required).

delete_notebookB

Delete a notebook or directory from the workspace. Use recursive=true to delete directories with contents.

Inputs: path (required), recursive.

delete_schemaB

Delete a schema from a catalog. Use force=true to delete schemas with tables.

Inputs: full_schema_name (required), force.

delete_tableC

Delete a table or view from Unity Catalog.

Inputs: full_table_name (required).

delete_userC

Remove a user from the Databricks workspace.

Inputs: user_id (required).

edit_clusterB

Edit the configuration of an existing cluster. The cluster must be in TERMINATED state to edit most properties.

Inputs: cluster_id (required), spark_conf, custom_tags, num_workers, +6 more.

forecast_costsB

Forecast future costs based on historical usage patterns using simple linear regression.

Inputs: forecast_days, historical_days.

get_catalog_detailsC

Get detailed information about a specific catalog including metadata and properties.

Inputs: catalog_name (required).

get_cluster_costsC

Analyze cluster costs and usage metrics including uptime, DBU consumption, and estimated costs.

Inputs: end_date (required), start_date (required), cluster_id.

get_cluster_detailsA

Get detailed information about a specific cluster including configuration, runtime version, status, and resource allocation.

Inputs: cluster_id (required).

get_cluster_eventsB

Get event history for a cluster including state changes, errors, and administrative actions.

Inputs: cluster_id (required), limit, end_time, start_time.

get_effective_permissionsA

Get the effective permissions a principal has on a Unity Catalog object (including inherited permissions).

Inputs: principal (required), securable_name (required), securable_type (required).

get_group_detailsB

Get detailed information about a specific group including all members and roles.

Inputs: group_id (required).

get_job_detailsA

Get detailed configuration and settings for a specific job.

Inputs: job_id (required).

get_job_run_outputB

Get the output and logs from a completed job run.

Inputs: run_id (required).

get_job_run_statusC

Get the current status and details of a specific job run.

Inputs: run_id (required).

get_optimization_recommendationsC

Identify cost optimization opportunities including idle clusters, oversized resources, and inefficient configurations.

Inputs: min_idle_hours.

get_permission_levelsA

Get available permission levels for a specific object type (e.g., what permissions can be granted on clusters).

Inputs: object_id (required), object_type (required).

get_permissionsC

Get access control list (ACL) for a Databricks object (cluster, job, notebook, directory, etc.).

Inputs: object_id (required), object_type (required).

get_schema_detailsC

Get detailed information about a specific schema.

Inputs: full_schema_name (required).

get_table_detailsA

Get detailed information about a table including full schema, partitions, and properties.

Inputs: full_table_name (required).

get_user_detailsB

Get detailed information about a specific user including group memberships and roles.

Inputs: user_id (required).

grant_unity_catalog_permissionsC

Grant Unity Catalog permissions on a securable object (catalog, schema, table, volume, etc.).

Inputs: principal (required), privileges (required), securable_name (required), securable_type (required).

list_catalogsB

List all Unity Catalog catalogs in the metastore. Catalogs are the top-level containers for schemas and tables.

Inputs: no named parameters.

list_clustersA

List all clusters in the Databricks workspace. Returns active, terminated, and pending clusters with their configurations and current states.

Inputs: no named parameters.

list_external_locationsA

List all external locations configured in Unity Catalog for accessing cloud storage.

Inputs: no named parameters.

list_groupsB

List all groups in the Databricks workspace with their members.

Inputs: no named parameters.

list_job_runsB

List all runs for a specific job or all jobs in the workspace.

Inputs: limit, job_id, offset.

list_jobsB

List all jobs in the workspace with their configurations and schedules.

Inputs: limit, offset.

list_notebooksB

List all notebooks and directories in a workspace path. Returns file metadata including language, size, and timestamps.

Inputs: path (required).

list_schemasC

List all schemas in a catalog. Schemas contain tables, views, and functions.

Inputs: catalog_name (required).

list_service_principalsA

List all service principals (application identities) in the workspace.

Inputs: no named parameters.

list_tablesB

List all tables and views in a schema with their metadata.

Inputs: schema_name (required), catalog_name (required).

list_usersA

List all users in the Databricks workspace with their details and status.

Inputs: no named parameters.

list_volumesC

List all volumes in a schema. Volumes are used for storing non-tabular data files.

Inputs: schema_name (required), catalog_name (required).

move_notebookC

Move or rename a notebook or directory to a new location in the workspace.

Inputs: source_path (required), destination_path (required).

pin_clusterA

Pin a cluster to prevent it from being automatically deleted or hidden from the cluster list.

Inputs: cluster_id (required).

query_tableB

Execute a SQL query against a Unity Catalog table and return results. Requires a SQL warehouse.

Inputs: query (required), warehouse_id (required), schema, catalog.

read_notebookC

Read the complete content of a notebook. Returns the notebook code/content in the specified format.

Inputs: path (required), format.

remove_user_from_groupC

Remove a user from a group.

Inputs: user_id (required), group_id (required).

resize_clusterB

Resize a running cluster by changing the number of workers or autoscaling settings.

Inputs: cluster_id (required), num_workers, autoscale_max_workers, autoscale_min_workers.

restart_clusterB

Restart a running or terminated cluster. Useful for applying configuration changes or recovering from errors.

Inputs: cluster_id (required).

revoke_unity_catalog_permissionsC

Revoke Unity Catalog permissions from a principal on a securable object.

Inputs: principal (required), privileges (required), securable_name (required), securable_type (required).

run_jobB

Trigger a manual run of a job. Can override parameters for this specific run.

Inputs: job_id (required), jar_parameters, python_parameters, notebook_parameters.

run_notebookC

Execute a notebook and wait for results. Requires specifying an existing cluster or providing cluster configuration.

Inputs: cluster_id (required), notebook_path (required), base_parameters, timeout_seconds.

set_permissionsB

Set (replace) the complete access control list for an object. This will remove any existing permissions not specified.

Inputs: object_id (required), object_type (required), access_control_list (required).

start_clusterA

Start a terminated cluster. The cluster will transition from TERMINATED to PENDING to RUNNING state.

Inputs: cluster_id (required).

terminate_clusterA

Terminate a running cluster to stop incurring costs. The cluster can be restarted later if needed.

Inputs: cluster_id (required).

unpin_clusterB

Unpin a cluster to allow it to be automatically managed according to workspace policies.

Inputs: cluster_id (required).

update_jobC

Update an existing job configuration including tasks, schedules, and settings.

Inputs: job_id (required), name, max_retries, schedule_cron, +3 more.

update_notebookB

Update an existing notebook with new content. This will overwrite the entire notebook.

Inputs: path (required), content (required), format.

update_permissionsB

Update (add or modify) specific permissions without affecting other existing permissions.

Inputs: object_id (required), object_type (required), access_control_list (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 66 tools

    Disambiguation4/5

    Most tools target a clearly distinct resource and action, so the surface is generally easy to navigate. The main ambiguity is among the permission-related tools: get_permissions, set_permissions, update_permissions, grant_unity_catalog_permissions, revoke_unity_catalog_permissions, and get_effective_permissions require careful distinction between object ACLs and Unity Catalog grants.

    Naming Consistency5/5

    Tool names consistently follow a snake_case verb_noun pattern such as list_clusters, get_job_details, create_notebook, and delete_table. Variations like pin_cluster/unpin_cluster and the get_/list_/create_/delete_ prefixes remain predictable and readable.

    Tool Count2/5

    Sixty-six tools is too many for a single MCP server and risks overwhelming tool selection, even for a broad platform like Databricks. The surface spans clusters, notebooks, jobs, identity, Unity Catalog, permissions, and costs, which would be better split into scoped servers.

    Completeness3/5

    Cluster, notebook, job, permission, and cost workflows are covered fairly completely, but there are notable gaps. Unity Catalog lacks create/update table and volume operations despite having delete_table and list_volumes, service principals are list-only, and there is no SQL warehouse management even though query_table requires a warehouse.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers