Generate Databricks App MCP servers from OpenAPI specs
Project description
uc-mcp-gen
A CLI that compiles an OpenAPI spec directly into a self-contained Databricks App bundle — a runnable MCP server with one concrete Python function per API operation. Auth and routing are handled by a Databricks Unity Catalog connection.
How It Works
- Point
uc-mcp-gen generateat an OpenAPI spec (local file or URL, YAML or JSON) - Provide a UC connection name
- Get a self-contained Databricks App bundle back — ready to deploy with
databricks bundle deploy
The generated main.py has zero dependency on uc_mcp_gen. It's a plain FastMCP server where every API operation becomes a typed async def tool function, with all HTTP calls proxied through your UC connection.
Install
# Run without installing (recommended)
uvx uc-mcp-gen generate ...
# Or install locally for development
uv sync
Usage
uc-mcp-gen generate <spec> --connection <conn-name> [--name <service-name>] [-o <output-dir>]
Arguments:
| Argument | Description |
|---|---|
spec |
Path or URL to OpenAPI spec (.yaml, .yml, .json, or remote URL) |
--connection |
UC connection name in your Databricks workspace |
--name |
Service name (kebab-case). Derived from spec title if omitted. |
-o / --output |
Output directory. Defaults to generated_mcp_servers/<name>-app. |
Examples:
# From a local YAML spec
uc-mcp-gen generate openapi.yaml --connection my-slack-conn -o ./slack-app
# From a local JSON spec
uc-mcp-gen generate openapi.json --connection my-api-conn
# From a remote spec
uc-mcp-gen generate https://api.example.com/openapi.yaml --connection my-conn -o ./example-app
Generated Bundle
<output>/
├── databricks.yml Databricks Asset Bundle manifest
├── app.yaml App startup config — sets UC_CONNECTION_NAME
├── pyproject.toml App dependencies (mcp, databricks-sdk, starlette, uvicorn)
└── src/app/
├── __init__.py
└── main.py Self-contained FastMCP server
Deploy with:
cd <output>
databricks bundle deploy
databricks bundle run
Auth
The generated main.py handles three auth scenarios automatically:
| Scenario | Mechanism |
|---|---|
| Databricks Apps (user-facing) | X-Forwarded-Access-Token header → per-user WorkspaceClient |
| Databricks Model Serving | Model Serving credentials context |
| Service principal / local dev | Default WorkspaceClient() from environment |
All tool calls are routed through client.serving_endpoints.http_request(conn=CONNECTION_NAME, ...) — your UC connection handles the downstream API auth.
Running Tests
uv run pytest -v
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uc_mcp_gen-0.1.1.tar.gz.
File metadata
- Download URL: uc_mcp_gen-0.1.1.tar.gz
- Upload date:
- Size: 115.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6eb8429ef2e3e8db15d4d5296aeadbfad3a6a7a5c54d0e0d1157c5669adb43ed
|
|
| MD5 |
4eb0aecff0054d5494817ee0c2255846
|
|
| BLAKE2b-256 |
ba8a7444d82cb21ad813dfea2efd534eb9a50193a622c27b83e08b3d147e4680
|
Provenance
The following attestation bundles were made for uc_mcp_gen-0.1.1.tar.gz:
Publisher:
publish.yml on IceRhymers/uc-mcp-gen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uc_mcp_gen-0.1.1.tar.gz -
Subject digest:
6eb8429ef2e3e8db15d4d5296aeadbfad3a6a7a5c54d0e0d1157c5669adb43ed - Sigstore transparency entry: 1088938250
- Sigstore integration time:
-
Permalink:
IceRhymers/uc-mcp-gen@1023c277ed9f07316164c429f939883e80ce2441 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/IceRhymers
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1023c277ed9f07316164c429f939883e80ce2441 -
Trigger Event:
push
-
Statement type:
File details
Details for the file uc_mcp_gen-0.1.1-py3-none-any.whl.
File metadata
- Download URL: uc_mcp_gen-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
712431b0a6334c0b4fac3636a80f16683ac15dcb9de8806be32fce9af2245352
|
|
| MD5 |
91ee67ff1b31bffa49786ddd70af3b16
|
|
| BLAKE2b-256 |
4aaf310d8840556b12342425b93c16bc9dfe6f6c0e2f088d80568beba11f7b15
|
Provenance
The following attestation bundles were made for uc_mcp_gen-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on IceRhymers/uc-mcp-gen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uc_mcp_gen-0.1.1-py3-none-any.whl -
Subject digest:
712431b0a6334c0b4fac3636a80f16683ac15dcb9de8806be32fce9af2245352 - Sigstore transparency entry: 1088938275
- Sigstore integration time:
-
Permalink:
IceRhymers/uc-mcp-gen@1023c277ed9f07316164c429f939883e80ce2441 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/IceRhymers
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1023c277ed9f07316164c429f939883e80ce2441 -
Trigger Event:
push
-
Statement type: