Skip to content

Commit c57b8ca

Browse files
committed
feat(cli): os mcp connect registers the environment's MCP server with Claude Code
Resolves the environment the way os deploy does, reads its hostname from the control plane, and runs (or with --print, prints) claude mcp add with the URL alone, named after the environment. --url covers a self-hosted or local server. No token is stored or handed to the client. os dev's Connect row now prints through the same line builder. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2dLQEXWGsE2SZ3Qn5F
1 parent 679dc88 commit c57b8ca

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎.changeset/30889-os-mcp-connect.md‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@objectstack/cli': patch
3+
---
4+
5+
feat(cli): `os mcp connect` registers your environment's MCP server with Claude Code in one command
6+
7+
Clause-②: no
8+
Metadata-protocol: none
9+
10+
`os mcp connect` finds the environment `os deploy` deploys to (`--env`, then the active environment for this control plane, then your organization's only one; several with no `--env` is refused, as deploy refuses) and runs `claude mcp add --transport http NAME https://ENV-HOST/api/v1/mcp`. The server is named after the environment (its slug, else its display name, else its id), so several environments can be registered side by side; `--name` overrides it.
11+
12+
- `--print` prints the endpoint and the `claude mcp add` line and runs nothing. For any other MCP client, add that endpoint as a remote HTTP MCP server in the client's own settings.
13+
- `--url http://localhost:3000` connects a self-hosted or local server instead, named `objectstack` like the `os dev` banner's Connect row. The banner now prints its line through the same builder, so the two stay one spelling.
14+
- No token is stored or handed to the client. Claude Code runs the environment's own OAuth: run `/mcp` in Claude Code and the browser shows the environment's sign-in and consent. The command prints where to revoke that grant (Account → Connect an AI Assistant in the environment's console).

0 commit comments

Comments
 (0)