Add ucode configure skills --location to register the UC Skills MCP#214
Open
xsh310 wants to merge 2 commits into
Open
Add ucode configure skills --location to register the UC Skills MCP#214xsh310 wants to merge 2 commits into
ucode configure skills --location to register the UC Skills MCP#214xsh310 wants to merge 2 commits into
Conversation
Adds a non-interactive command that registers the Unity Catalog Skills MCP endpoint (`/ai-gateway/skills/<cat>/<sch>`) for a `<catalog>.<schema>` across every configured MCP-capable agent. Claude Code additionally receives `alwaysLoad: true` so the schema's skills are eagerly loaded and discoverable; other agents get the same endpoint from the URL alone, which their CLIs cannot express. Skills entries are tagged `kind: "skills"` in saved state so they coexist with plain mcp-services and are labelled distinctly in `ucode status`. Re-running with a new location repoints skills at that schema. Refactor (no behavior change): the non-interactive preamble shared by the mcp and skills commands is extracted into `_setup_mcp_clients`, and the `<catalog>.<schema>` validation into `_split_catalog_schema`.
xsh310
commented
Jul 15, 2026
xsh310
commented
Jul 15, 2026
…nt docstring The `configure skills` command already has its own README section (like `configure mcp`/`configure tracing`), so the Other Commands table row was redundant. Also drop the `build_skills_mcp_url` docstring for parity with the adjacent `build_mcp_service_url`.
xsh310
marked this pull request as ready for review
July 15, 2026 23:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Adds a non-interactive command that registers the Unity Catalog Skills MCP endpoint for a
<catalog>.<schema>, replacing the manual~/.claude.jsonedit used during the skills bug bash:The endpoint (
/ai-gateway/skills/<cat>/<sch>) is added to every configured MCP-capable agent (Claude, Codex, Gemini, OpenCode, Copilot). Claude Code additionally receivesalwaysLoad: trueso the schema's skills are eagerly loaded and discoverable; the other agents get the same endpoint from the URL alone, which their CLIs cannot express.Implementation
databricks.py—build_skills_mcp_url()builds{ws}/ai-gateway/skills/{cat}/{sch}(path segments, unlike the dotted mcp-services route).mcp.pybuild_mcp_http_entry(url, *, always_load=False)addsalwaysLoadwhen requested.kind: "skills"in saved state;apply_mcp_server_changesderivesalways_loadfrom that tag. The field rides in the shared entry dict but only Claude'smcp add-jsonpath consumes it — other agents are registered from the URL alone._resolve_skills_mcp_serversregisters exactly one skills entry, preserving coexisting mcp-services and dropping any stale skills entry so re-runs repoint cleanly.configure_skills_command()fans out to all configured agents via the existing apply path.cli.py—configure skillssubcommand with a required--location;ucode statuslabels skills entries(skills)._setup_mcp_clients, and the<catalog>.<schema>validation into_split_catalog_schema.Out of scope
--locationper invocation for now).Testing
Unit tests
uv run pytest, excluding e2e);ruff check,ruff format --check, andtyall clean.alwaysLoadon/off, per-agent dispatch (Claude gets the entry, Codex gets URL-only), skills registration across all agents, stale-skills replacement while preserving mcp-services, malformed--location, and CLI wiring (dispatch, required flag, error exit code).Manual end-to-end (against a real workspace)
Ran against staging workspace
eng-ml-inference.staging.cloud.databricks.comwith a real skills schemaxsh.xsh_oncall_skills, configuring both Claude Code and Codex:Config written correctly:
~/.claude.json) hasalwaysLoad: true~/.codex/config.toml) is URL-only, noalwaysLoadbearer_token_env_var = "OAUTH_TOKEN", no alwaysLoad key)…/skills/xsh/xsh_oncall_skills; namedatabricks-skills-xsh-xsh-oncall-skills(dots/underscores slugified since agent CLIs reject them)ucode statuslabels the entry(skills)Auth + live connection verified. The entry authenticates with
Bearer ${OAUTH_TOKEN}, which ucode injects into the agent's environment at launch (claude.py), so a directly-launched agent returns 401 while an agent launched viaucode claudegets a fresh token. Confirmed both cases against the endpoint's MCPinitialize:Skills actually load. Launched Claude via
ucode claude;/mcpshows the server connected, andtools/listreturns 11 tools — the 5 skills fromxsh.xsh_oncall_skillsexposed asskill_<leaf>plus the 6 static utility tools (load_skill,get_skill_files,list_skills,create_skill,update_skill,delete_skill).tools/callverified working on the loaded skills.Note on auth UX
Like all ucode-managed Databricks MCP servers, the skills entry relies on
OAUTH_TOKENbeing present in the agent's environment, which only happens when the agent is launched through ucode (ucode claude,ucode codex, …). Opening the agent directly yields a 401. This matches existing ucode MCP behavior and is more secure than baking a static PAT into the config (as the manual bug-bash setup did), but it's a sharp edge worth documenting for users.