Skip to content

feat(cli): add cloud mcp add to register the Cloud MCP server in coding agents - #1213

Draft
sdairs wants to merge 4 commits into
mainfrom
feat/cloud-mcp-add
Draft

sdairs wants to merge 4 commits into
mainfrom
feat/cloud-mcp-add

Conversation

@sdairs

@sdairs sdairs commented Nov 4, 2026

Copy link
Copy Markdown
Member

Closes #1212

Summary

Adds clickhousectl cloud mcp add <agent> (claude, codex, gemini, opencode, pi). It registers the hosted Cloud MCP server for the user through the agent's own CLI, then starts that agent's OAuth sign-in.

  • Needs no clickhousectl credentials. Cloud-wide flags are rejected and hidden from cloud mcp help only.
  • Gemini has no sign-in command. Claude's refuses to run without a terminal, so without one we skip it. Both return the in-agent command (/mcp) as sign_in_command.
  • Agent CLI output goes to stderr; a failed step passes its exit code through.

Test plan

  • Unit and subprocess tests (fake agent CLIs) for argv, call order, JSON, exit codes and flag rejection.
  • Live: a headless Claude Code session found the command from --help, registered the server and got /mcp back with exit 0.

🤖 Generated with Claude Code

sdairs and others added 4 commits November 4, 2026 09:41
…ng agents (#1212)

Registers https://mcp.clickhouse.cloud/mcp for the user through the agent's
own CLI (claude, codex, gemini, opencode, pi), then starts that agent's OAuth
sign-in. Needs no clickhousectl credentials; Cloud-wide flags are rejected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cloud mcp rejects --org-id, --org-name, --api-key, --api-secret and --url.
Hidden copies on the mcp subcommand stop clap propagating the visible ones
there, so other Cloud commands are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude mcp login exits 1 without a terminal, which is how coding agents and
scripts run commands. Register the server, skip sign-in, and return /mcp as
the sign-in command instead of failing after a partial success.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

Add cloud mcp add to register the Cloud MCP server in coding agents

1 participant