npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

databricks-mcp

v1.0.1

Published

Standalone MCP (Model Context Protocol) server for Databricks SQL using @databricks/sql

Readme

Databricks MCP Server (databricks-mcp)

A standalone MCP (Model Context Protocol) server that connects to Databricks using the native @databricks/sql Node.js driver. Built with TypeScript and the official @modelcontextprotocol/sdk.

Exposes four MCP tools over stdio:

| Tool | Description | |---|---| | list_catalogs_and_schemas | List all available catalogs and schemas | | execute_query | Execute a SQL query (SELECT only by default) | | get_tables | List all tables in the connected database | | get_schema | Get columns and types for a specific table |


Quick Usage via npx (No repository clone needed)

You can run this MCP server directly using npx in any MCP client:

npx -y databricks-mcp

Environment Variables

| Variable | Required | Description | |---|---|---| | DATABRICKS_HOST | Yes | Databricks workspace hostname (e.g., adb-123.azuredatabricks.net) | | DATABRICKS_TOKEN | Yes | Databricks Personal Access Token | | DATABRICKS_HTTP_PATH | Yes | SQL Warehouse HTTP path (e.g., /sql/1.0/warehouses/abc123def456) | | ALLOWED_OPERATIONS | No | Comma-separated list of permitted SQL operations. Default: SELECT. Example: SELECT,INSERT,UPDATE | | ALLOW_ALL | No | Set to true to allow all SQL operations (disables ALLOWED_OPERATIONS). Useful for dev/admin mode. |


Client Integration Guide

1. Antigravity / Gemini IDE / VS Code MCP Extension

Add the following to your MCP settings file (~/.gemini/antigravity-ide/mcp.json or VS Code MCP configuration):

{
  "mcpServers": {
    "databricks-db": {
      "command": "npx",
      "args": ["-y", "databricks-mcp"],
      "env": {
        "DATABRICKS_HOST": "adb-123456789.12.azuredatabricks.net",
        "DATABRICKS_TOKEN": "dapi...",
        "DATABRICKS_HTTP_PATH": "/sql/1.0/warehouses/abc123def456",
        "ALLOWED_OPERATIONS": "SELECT"
      }
    }
  }
}

2. Claude Code

{
  "mcpServers": {
    "databricks-db": {
      "command": "npx",
      "args": ["-y", "databricks-mcp"],
      "env": {
        "DATABRICKS_HOST": "adb-123456789.12.azuredatabricks.net",
        "DATABRICKS_TOKEN": "dapi...",
        "DATABRICKS_HTTP_PATH": "/sql/1.0/warehouses/abc123def456"
      }
    }
  }
}

3. OpenCode

Add to ~/.config/opencode/opencode.json:

{
  "mcp": {
    "databricks-db": {
      "type": "local",
      "command": ["npx", "-y", "databricks-mcp"],
      "environment": {
        "DATABRICKS_HOST": "adb-123456789.12.azuredatabricks.net",
        "DATABRICKS_TOKEN": "dapi...",
        "DATABRICKS_HTTP_PATH": "/sql/1.0/warehouses/abc123def456",
        "ALLOWED_OPERATIONS": "SELECT"
      },
      "enabled": true
    }
  }
}

4. Cursor / Windsurf / Zed

Add to .cursor/mcp.json or your editor's MCP configuration:

{
  "mcpServers": {
    "databricks-db": {
      "command": "npx",
      "args": ["-y", "databricks-mcp"],
      "env": {
        "DATABRICKS_HOST": "adb-123456789.12.azuredatabricks.net",
        "DATABRICKS_TOKEN": "dapi...",
        "DATABRICKS_HTTP_PATH": "/sql/1.0/warehouses/abc123def456"
      }
    }
  }
}

Local Development

If developing locally or running from source:

# Install dependencies
npm install

# Build TypeScript to dist/
npm run build

# Run locally
DATABRICKS_HOST="adb-123.azuredatabricks.net" \
DATABRICKS_TOKEN="dapi..." \
DATABRICKS_HTTP_PATH="/sql/1.0/warehouses/abc123" \
  npm start

Security & Permission Guard

By default, execute_query only permits SELECT statements (read-only mode).

You can configure allowed SQL operations via ALLOWED_OPERATIONS or allow all operations via ALLOW_ALL:

# Read-only (default)
ALLOWED_OPERATIONS=SELECT

# Read-write
ALLOWED_OPERATIONS=SELECT,INSERT,UPDATE,DELETE

# Stored procedures & DML
ALLOWED_OPERATIONS=SELECT,INSERT,UPDATE,DELETE,MERGE,CALL

# Unrestricted admin mode
ALLOW_ALL=true

Queries starting with a disallowed keyword are intercepted and blocked before reaching Databricks.


Running Unit Tests

# Run all unit tests (61 test cases across 5 suites)
npm test

# Run tests with coverage report
npm run test:coverage

License

MIT © Victo Principe