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
Metadata
Release files for uc-mcp-gen 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| uc_mcp_gen-0.1.1.tar.gz | 115.2 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| uc_mcp_gen-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 124.6 kB
Release files / uc_mcp_gen-0.1.1.tar.gz
| Download URL | uc_mcp_gen-0.1.1.tar.gz |
|---|---|
| Size | 115.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6eb8429ef2e3e8db15d4d5296aeadbfad3a6a7a5c54d0e0d1157c5669adb43ed
|
|
BLAKE2b-256 checksum How to use checksums |
ba8a7444d82cb21ad813dfea2efd534eb9a50193a622c27b83e08b3d147e4680
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 12, 2026.
Transparency logRelease files / uc_mcp_gen-0.1.1-py3-none-any.whl
| Download URL | uc_mcp_gen-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
712431b0a6334c0b4fac3636a80f16683ac15dcb9de8806be32fce9af2245352
|
|
BLAKE2b-256 checksum How to use checksums |
4aaf310d8840556b12342425b93c16bc9dfe6f6c0e2f088d80568beba11f7b15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 12, 2026.
Transparency logSecurity for uc-mcp-gen 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for uc_mcp_gen-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.