Add ucode configure --mcp one-shot flag#199
Conversation
|
Note: this flag is transport-independent — it dispatches to |
Register Databricks MCP service(s) for configured agents in a single command:
ucode configure --agents claude --mcp system.ai.slack
`--mcp` takes a comma-separated list of fully-qualified `<catalog>.<schema>.<name>`
service names. It runs after the workspace + agents are configured (alongside the
existing `--tracing` hook) and dispatches to the already-tested
`configure_mcp_command(services=...)`.
Without `--agents` (e.g. for MCP-only clients like Cursor) it configures just the
workspace — no interactive agent picker — then registers the servers. Bare short
names are rejected with a pointer to `ucode configure mcp` for the picker.
Co-authored-by: Isaac
c2d5727 to
2e7f846
Compare
|
Rebased onto latest The only conflict was in This PR is independent of the proxy PR (#201) — the Verified locally after rebase: |
Summary
Adds a
--mcpflag toucode configureso an agent and its Databricks MCP server(s) can be set up in a single command:Previously this took two steps (
ucode configure --agents claudethenucode configure mcp --services system.ai.slack). The new flag folds them together for a cleaner getting-started story (e.g. the AI Gateway MCP-services "Get started" panel can now recommend one command per client).Behavior
--mcptakes a comma-separated list of fully-qualified<catalog>.<schema>.<name>service names.--tracinghook) and dispatches to the already-testedconfigure_mcp_command(services=...).--agents(e.g. MCP-only clients such as Cursor): configures just the workspace — no interactive agent picker — then registers the servers.slack) are rejected with a pointer toucode configure mcpfor the interactive picker.Changes
src/ucode/cli.py:--mcpoption on theconfigurecallback + handler; an MCP-only branch that does a workspace-onlyconfigure_shared_statewhen no--agent(s)is given.tests/test_cli.py:TestConfigureMcpFlag— with-agents dispatch, MCP-only workspace-config path (no picker), bare-short-name rejection.README.md: documents the flag.Verification
uv run pytest→ all CLI tests pass (tests/test_cli.py: 83 passed);uv run ruff checkclean. Verified against a live workspace that the MCP-only path resolves clients correctly ("Configuring for: Cursor") and queries the real Unity Catalog MCP-services API before registering.Note: the Cursor MCP-only path pairs with the
ucode cursorclient support in the separate cursor PR; the--mcpflag itself is independent and works today for the model agents.This pull request and its description were written by Isaac.