You signed in with another tab or window. Reload
to refresh your session. You signed out in another tab or window. Reload
to refresh your session. You switched accounts on another tab or window. Reload
to refresh your session. Dismiss alert
JustTryAI / databricks-mcp-server Public
A Model Completion Protocol (MCP) server for interacting with Databricks services
6 stars
1 fork
Branches
Tags
Activity
Notifications
You must be signed in to change notification settings
master
Go to file
Code
| Name | | Name | Last commit message | Last commit date |
| --- | --- | --- | --- |
| Latest commit
-------------
LBurley-Modutecture
Update README with correct repository URL and remove databricks-mcp f…
Mar 13, 2025
81cd60b
· Mar 13, 2025
History
-------
9 Commits
| | |
| .cursor/rules | | .cursor/rules | Add Cursor rules for the Databricks MCP Server project | Mar 13, 2025 |
| docs | | docs | Move documentation from documents/ to docs/ directory | Mar 13, 2025 |
| examples | | examples | Project restructuring and cleanup: Organized code, added documentatio… | Mar 13, 2025 |
| scripts | | scripts | Add new utility scripts and server modules | Mar 13, 2025 |
| src | | src | Add new utility scripts and server modules | Mar 13, 2025 |
| tests | | tests | Update project documentation and test infrastructure | Mar 13, 2025 |
| .cursor.json | | .cursor.json | Add .cursor.json rules file for project structure and conventions | Mar 13, 2025 |
| .env.example | | .env.example | Initial commit | Mar 12, 2025 |
| .gitignore | | .gitignore | Update README with correct repository URL and remove databricks-mcp f… | Mar 13, 2025 |
| README.md | | README.md | Update README with correct repository URL and remove databricks-mcp f… | Mar 13, 2025 |
| SUMMARY.md | | SUMMARY.md | Project restructuring and cleanup: Organized code, added documentatio… | Mar 13, 2025 |
| project_structure.md | | project_structure.md | Update project documentation and test infrastructure | Mar 13, 2025 |
| pyproject.toml | | pyproject.toml | Project restructuring and cleanup: Organized code, added documentatio… | Mar 13, 2025 |
| start_mcp_server.ps1 | | start_mcp_server.ps1 | Update project documentation and test infrastructure | Mar 13, 2025 |
| start_mcp_server.sh | | start_mcp_server.sh | Standardize script organization and naming conventions | Mar 13, 2025 |
| uv.lock | | uv.lock | Project restructuring and cleanup: Organized code, added documentatio… | Mar 13, 2025 |
| View all files | | |
A Model Completion Protocol (MCP) server for Databricks that provides access to Databricks functionality via the MCP protocol. This allows LLM-powered tools to interact with Databricks clusters, jobs, notebooks, and more.
The Databricks MCP Server exposes the following tools:
uv
package manager (recommended for MCP servers)Install uv
if you don't have it already:
```shell
curl -LsSf https://astral.sh/uv/install.sh | sh
irm https://astral.sh/uv/install.ps1 | iex
```
Restart your terminal after installation.
Clone the repository:
shell
git clone https://github.com/JustTryAI/databricks-mcp-server.git
cd databricks-mcp-server
Set up the project with uv
:
```shell
uv venv
..venv\Scripts\activate
source .venv/bin/activate
uv pip install -e .
uv pip install -e ".[dev]"
```
Set up environment variables:
```shell
set DATABRICKS_HOST=https://your-databricks-instance.azuredatabricks.net
set DATABRICKS_TOKEN=your-personal-access-token
export DATABRICKS_HOST=https://your-databricks-instance.azuredatabricks.net
export DATABRICKS_TOKEN=your-personal-access-token
```
You can also create an .env
file based on the .env.example
template.
To start the MCP server, run:
# Windows
.\start_mcp_server.ps1
# Linux/Mac
./start_mcp_server.sh
These wrapper scripts will execute the actual server scripts located in the scripts
directory. The server will start and be ready to accept MCP protocol connections.
You can also directly run the server scripts from the scripts directory:
# Windows
.\scripts\start_mcp_server.ps1
# Linux/Mac
./scripts/start_mcp_server.sh
The repository includes utility scripts to quickly view Databricks resources:
# View all clusters
uv run scripts/show_clusters.py
# View all notebooks
uv run scripts/show_notebooks.py
databricks-mcp-server/
├── src/ # Source code
│ ├── __init__.py # Makes src a package
│ ├── __main__.py # Main entry point for the package
│ ├── main.py # Entry point for the MCP server
│ ├── api/ # Databricks API clients
│ ├── core/ # Core functionality
│ ├── server/ # Server implementation
│ │ ├── databricks_mcp_server.py # Main MCP server
│ │ └── app.py # FastAPI app for tests
│ └── cli/ # Command-line interface
├── tests/ # Test directory
├── scripts/ # Helper scripts
│ ├── start_mcp_server.ps1 # Server startup script (Windows)
│ ├── run_tests.ps1 # Test runner script
│ ├── show_clusters.py # Script to show clusters
│ └── show_notebooks.py # Script to show notebooks
├── examples/ # Example usage
├── docs/ # Documentation
└── pyproject.toml # Project configuration
See project_structure.md
for a more detailed view of the project structure.
The project uses the following linting tools:
# Run all linters
uv run pylint src/ tests/
uv run flake8 src/ tests/
uv run mypy src/
The project uses pytest for testing. To run the tests:
# Run all tests with our convenient script
.\scripts\run_tests.ps1
# Run with coverage report
.\scripts\run_tests.ps1 -Coverage
# Run specific tests with verbose output
.\scripts\run_tests.ps1 -Verbose -Coverage tests/test_clusters.py
You can also run the tests directly with pytest:
# Run all tests
uv run pytest tests/
# Run with coverage report
uv run pytest --cov=src tests/ --cov-report=term-missing
A minimum code coverage of 80% is the goal for the project.
docs/api
directoryexamples/
directory for usage examplesCheck the examples/
directory for usage examples. To run examples:
# Run example scripts with uv
uv run examples/direct_usage.py
uv run examples/mcp_client_usage.py
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
A Model Completion Protocol (MCP) server for interacting with Databricks services
No releases published
No packages published
You can’t perform that action at this time.