Skip to content

Add ucode configure --mcp one-shot flag#199

Open
sunishsheth2009 wants to merge 1 commit into
databricks:mainfrom
sunishsheth2009:sunish-sheth_data/configure-mcp-flag
Open

Add ucode configure --mcp one-shot flag#199
sunishsheth2009 wants to merge 1 commit into
databricks:mainfrom
sunishsheth2009:sunish-sheth_data/configure-mcp-flag

Conversation

@sunishsheth2009

Copy link
Copy Markdown

Summary

Adds a --mcp flag to ucode configure so an agent and its Databricks MCP server(s) can be set up in a single command:

ucode configure --agents claude --mcp system.ai.slack

Previously this took two steps (ucode configure --agents claude then ucode 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

  • --mcp takes a comma-separated list of fully-qualified <catalog>.<schema>.<name> service names.
  • Runs after the workspace + agents are configured (right beside the existing --tracing hook) and dispatches to the already-tested configure_mcp_command(services=...).
  • Without --agents (e.g. MCP-only clients such as Cursor): configures just the workspace — no interactive agent picker — then registers the servers.
  • Bare short names (slack) are rejected with a pointer to ucode configure mcp for the interactive picker.

Changes

  • src/ucode/cli.py: --mcp option on the configure callback + handler; an MCP-only branch that does a workspace-only configure_shared_state when 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 check clean. 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 cursor client support in the separate cursor PR; the --mcp flag itself is independent and works today for the model agents.

This pull request and its description were written by Isaac.

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
@sunishsheth2009

Copy link
Copy Markdown
Author

Note: this flag is transport-independent — it dispatches to configure_mcp_command, which under #201 registers each client's Databricks MCP server as a ucode mcp-proxy stdio entry. Verified it merges cleanly on top of #201 (no conflict) and its tests pass on that base, so it can land in either order relative to #201.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants