Skip to content

Commit 66bbff5

Browse files
committed
improv readme
1 parent c904270 commit 66bbff5

File tree

3 files changed

+44
-49
lines changed

3 files changed

+44
-49
lines changed

README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Table of Contents
1313
- [Usage (locally via `stdio` transport)](#usage-locally-via-stdio-transport)
1414
- [Supported tools](#supported-tools)
1515
- [Deploying UC MCP server on Databricks Apps](#deploying-uc-mcp-server-on-databricks-apps)
16+
- [Using `databricks bundle` CLI](#using-databricks-bundle-cli)
17+
- [Using `databricks apps` CLI](#using-databricks-apps-cli)
1618
- [Connecting to the UC MCP server deployed on Databricks Apps](#connecting-to-the-uc-mcp-server-deployed-on-databricks-apps)
1719
- [Developer Tools Server](#developer-tools-server)
1820
- [Deploying a custom MCP server on Databricks Apps](#deploying-a-custom-mcp-server-on-databricks-apps)
@@ -36,6 +38,7 @@ read the [contributor guidelines](CONTRIBUTING.md) to streamline the process and
3638
![status: Beta](https://img.shields.io/badge/status-Beta-yellow?style=flat-square&logo=databricks)
3739

3840
### Overview
41+
3942
A Model Context Protocol server that exposes structured and unstructured data in Unity Catalog ([vector search indexes](https://docs.databricks.com/gcp/en/generative-ai/vector-search), [functions](https://docs.databricks.com/aws/en/generative-ai/agent-framework/create-custom-tool), and [Genie spaces](https://docs.databricks.com/aws/en/genie/)), as tools.
4043

4144
<img src="docs/images/demo.png" alt="Demo image" height="400px">
@@ -87,6 +90,12 @@ cd /path/to/this/repo
8790
uv build --wheel
8891
```
8992

93+
There are two ways to deploy the server on Databricks Apps: using the `databricks bundle` CLI or using the `databricks apps` CLI. Depending on your preference, you can choose either method.
94+
95+
96+
#### Using `databricks bundle` CLI
97+
98+
To deploy the server using the `databricks bundle` CLI, follow these steps:
9099

91100
1. Set the env variables for the `schema_full_name` and `genie_space_ids` and run the `bundle deploy` command:
92101
```bash
@@ -119,6 +128,34 @@ If you are a developer iterating on the server implementation, you can repeat st
119128

120129
Please note that both variables should be provided in both `deploy` and `run` commands. The `schema_full_name` variable is used to determine the schema to use for the server, while the `genie_space_ids` variable is used to determine which Genie spaces to use.
121130

131+
#### Using `databricks apps` CLI
132+
133+
To deploy the server using the `databricks apps` CLI, follow these steps:
134+
1. Move into the project directory and build the wheel:
135+
```bash
136+
cd /path/to/this/repo
137+
uv build --wheel
138+
```
139+
2. Configure the `app.yml` file in the root of the project directory. You can use the following example as a starting point:
140+
141+
```yaml
142+
command: ["uvicorn", "databricks.labs.mcp.servers.unity_catalog.app:app"]
143+
env:
144+
- name: SCHEMA_FULL_NAME
145+
value: catalog.schema
146+
- name: GENIE_SPACE_IDS
147+
value: '["space1","space2"]'
148+
```
149+
150+
3. Deploy the app using the `databricks apps` CLI:
151+
```bash
152+
uv build --wheel
153+
databricks sync ./build -p <your-profile-name> /Workspace/Users/my-email@org.com/my-app
154+
databricks apps deploy my-app-name -p <your-profile-name> --source-code-path /Workspace/Users/my-email@org.com/my-app
155+
databricks apps start my-app-name -p <your-profile-name>
156+
```
157+
158+
122159
### Connecting to the UC MCP server deployed on Databricks Apps
123160

124161
After the app is deployed, you can connect to it using the `Streamable HTTP` transport in your MCP client, such as Claude Desktop or MCP inspector.

examples/custom-server/README.md

Lines changed: 0 additions & 49 deletions
This file was deleted.

examples/custom-server/hooks/apps_build.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,13 @@ def finalize(
4444

4545
requirements_file.write_text(Path(artifact_path).name, encoding="utf-8")
4646

47+
app_file = Path("app.yaml")
48+
if app_file.exists():
49+
self.app.display_info(f"Copying {app_file} to {build_dir}")
50+
shutil.copy(app_file, build_dir)
51+
else:
52+
self.app.display_info(f"{app_file} does not exist, skipping copy")
53+
4754
self.app.display_info(
4855
f"Apps-compatible build written to {build_dir.absolute()}"
4956
)

0 commit comments

Comments
 (0)