Repository navigation
MCP registration command: appkit mcp register - #755
MarioCadenas wants to merge 3 commits into
Conversation
Register an AppKit app as a Unity Catalog MCP Service (config.source_app -> the app's /mcp) through `databricks api`, so Unity Gateway serves it at /ai-gateway/mcp-services/<catalog.schema.name>. Creates or updates the service, grants EXECUTE on it and CAN_USE on the app per --grant, prints the gateway URL, and explains when the workspace lacks App sources. `unregister` deletes the service and leaves the app running. Stopgap until Asset Bundles can declare an App-backed MCP Service; it lives in commands/mcp/ so it can be deleted in one go. Signed-off-by: mario.cadenas <mario.cadenas@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
No code change: the previous check failed with `pnpm: not found` because corepack's pnpm shim was not enabled on the check machine. Signed-off-by: mario.cadenas <mario.cadenas@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
📦 Bundle size reportCompared against
|
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 1.4 MB (-222 B) | 501 KB (-19 B) |
| Type declarations | 482 KB | 174 KB |
| Source maps | 2.7 MB (-35 B) | 931 KB (-22 B) |
| Other | 11 KB | 3.7 KB |
| Total | 4.6 MB (-257 B) | 1.6 MB (-41 B) |
Per-entry composition (own code — deps external (as shipped))
| Entry | Initial (gz) | Lazy (gz) | Total (gz) | node_modules (min) | Own code (min) |
|---|---|---|---|---|---|
. |
119 KB (+335 B) | 2.4 KB (-1 B) | 121 KB (+334 B) | external | 379 KB (+854 B) |
./beta |
119 KB (+346 B) | 4.5 KB | 123 KB (+346 B) | external | 357 KB (+854 B) |
./testing |
47 KB (+326 B) | 38 KB | 85 KB (+326 B) | external | 247 KB (+854 B) |
./tsdown |
630 B | 0 B | 630 B | external | 1.0 KB |
./type-generator |
31 KB | 0 B | 31 KB | external | 89 KB |
Chunks:
| Entry | Chunk | Load | Size (gz) |
|---|---|---|---|
. |
index.js |
initial | 114 KB |
. |
utils.js |
initial | 4.6 KB |
. |
remote-tunnel-manager.js |
lazy | 2.4 KB |
./beta |
beta.js |
initial | 92 KB |
./beta |
stream-manager.js |
initial | 5.9 KB |
./beta |
define-schema.js |
initial | 5.8 KB |
./beta |
service-context.js |
initial | 4.3 KB |
./beta |
modular.js |
initial | 3.6 KB |
./beta |
databricks.js |
initial | 3.3 KB |
./beta |
wide-event-emitter.js |
initial | 2.8 KB |
./beta |
client.js |
initial | 645 B |
./beta |
index.js |
initial | 20 B |
./beta |
index.js |
lazy | 4.0 KB |
./beta |
supervisor-api.js |
lazy | 201 B |
./beta |
databricks.js |
lazy | 187 B |
./beta |
index.js |
lazy | 124 B |
./testing |
manifest.js |
initial | 34 KB |
./testing |
index.js |
initial | 10 KB |
./testing |
wide-event-emitter.js |
initial | 2.9 KB |
./testing |
index.js |
lazy | 34 KB |
./testing |
remote-tunnel-manager.js |
lazy | 2.4 KB |
./testing |
utils.js |
lazy | 1.8 KB |
./tsdown |
index.js |
initial | 630 B |
./type-generator |
index.js |
initial | 31 KB |
@databricks/appkit-ui
npm tarball (packed): 396 KB — gzipped download (dist + bin; excludes release-only docs/NOTICE).
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 433 KB | 147 KB |
| Type declarations | 251 KB | 93 KB |
| Source maps | 843 KB | 283 KB |
| CSS | 16 KB | 3.2 KB |
| Total | 1.5 MB | 527 KB |
Per-entry composition (consumer bundle — deps bundled, peerDeps external)
| Entry | Initial (gz) | Lazy (gz) | Total (gz) | node_modules (min) | Own code (min) |
|---|---|---|---|---|---|
./js |
5.3 KB | 49 KB | 55 KB | 208 KB | 14 KB |
./js/beta |
2.4 KB | 0 B | 2.4 KB | 0 B | 5.3 KB |
./react |
442 KB | 49 KB | 490 KB | 1.4 MB | 181 KB |
./react/beta |
13 KB | 0 B | 13 KB | 25 KB | 13 KB |
Chunks:
| Entry | Chunk | Load | Size (gz) |
|---|---|---|---|
./js |
index.js |
initial | 5.2 KB |
./js |
chunk |
initial | 120 B |
./js |
apache-arrow |
lazy | 49 KB |
./js/beta |
beta.js |
initial | 2.4 KB |
./react |
index.js |
initial | 439 KB |
./react |
tslib |
initial | 2.1 KB |
./react |
apache-arrow |
lazy | 49 KB |
./react/beta |
beta.js |
initial | 13 KB |
🤖 AppKit PR bot🔬 Run evalsStart an eval for this PR from the evals-monitor app: Go to Evals Monitor → 📦 Try this PR's app templateScaffolds a new app from this PR's SDK build. Run it in any folder (requires the GitHub CLI — gh run download 46989832372 -R databricks/appkit -n appkit-template-0.106.0-pr.bb18e8e-work-25-mcp-registration-command-appki-755 -D appkit-pr-755 \
&& unzip -o "appkit-pr-755/appkit-template-0.106.0-pr.bb18e8e-work-25-mcp-registration-command-appki-755.zip" -d "appkit-pr-755" \
&& databricks apps init --template "appkit-pr-755"The template pins |
|
Review 1 · Fail · 1 critical, 1 major, 2 minor, 1 trivial, 1 pre-existing Does the change do what the task asked? No. Gate: major and worse must be fixed. 6 findings (2 important, 3 nits, 1 pre-existing). 3 findings (2 important, 1 nit). The repository check passes, but re-registering can remove existing service rate limits and an accepted malformed unregister name can delete a different service. Bundle variable app names also reach the API unresolved. The brief mentions /xavier-review, /ponytail-review, and /security-review; those exact commands were unavailable here. Important (required)
Nit (not required, below the gate)
Pre-existing (not required, there before this change)
|
- Re-registering an existing MCP Service now carries over its
include_tool_selectors and rate_limits; `update_mask=config` replaces
the whole config, so they were silently cleared before.
- Service names are URL-encoded per part, so a `#` or `?` in the name
can no longer truncate the path and hit a different service.
- App names must be lowercase letters, digits and hyphens, which stops
path tricks in the permissions URL and unresolved `${var...}` names
from databricks.yml (the error says to pass --app).
Signed-off-by: mario.cadenas <mario.cadenas@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
|
Review 2 · Pass · 1 trivial Does the change do what the task asked? Yes. Gate: major and worse must be fixed. 1 finding (1 nit): nothing needs fixing. No findings: nothing needs fixing. The round 2 changes preserve existing service rate limits and selectors, encode service names for API requests, and reject unresolved bundle app names with --app guidance; the repository gate passes. The exact /xavier-review, /ponytail-review, and /security-review commands were unavailable here. Nit (not required, below the gate)
|
What
MCP registration command: appkit mcp register
Why
The check failed because the shell it runs in had no
pnpm, not because of the code. That's fixed, and the check now passes when run exactly the way the board runs it.finish.shruns the check with plainsh -con this machine, and that shell couldn't findpnpm. My earlier passing run only worked because I had put a temporarypnpmon PATH.corepack enable pnpm, the setup step the repo documents. It addspnpmandpnpxto the Node folder under~/.nvm. It's machine setup, not a repo change;corepack disable pnpmundoes it.sh -c, without my temporary PATH or registry setting. It exited 0: install, lint and format, knip, build, typecheck, and all 10 tests passed. The working tree is clean.The
mcp register/mcp unregisterwork itself is unchanged in fa3ee39. It has still not been run against a real workspace, and the text used to detect a workspace without App sources is still a guess. I updated the closing note with all of this.Also noticed:
apps/dev-playground/client/package-lock.json:pnpm installsometimes rewrites it.knip.json: has old "Remove from ignore" entries.How it was verified
pnpm install --frozen-lockfile && pnpm run check && pnpm run knip && pnpm build && pnpm run typecheck && pnpm vitest run --changed "$(git merge-base HEAD origin/main)"passed.Screenshots
None
Notes
None