← Files agent.cloudARCHIVED FILE

references/connection.md

2.89 KB · Nov 30, 2026 · 07:37 UTC

↓ Download file

# Connect when platform access is needed

The installed MCP server is `agent-cloud` for production (`https://agent.cloud/mcp`) or `agent-cloud-staging` for staging (`https://staging-agent.cloud/mcp`). Credentials and app references stay in their environment. Root/staff deployments are outside this plugin. Use the installed package's environment; do not change endpoints to bypass a failure.

If authenticated tools are available, call `account_get` and verify the current organization, purpose and scopes. Check that this package's protocol version, `2026-10-27`, appears in the account result's supported `protocol_versions` before app operations. On incompatibility, retain the brief/app references and request a compatible package/service update rather than guessing tools or bypassing the check. For missing/expired access, use the client's supported OAuth connection flow. Browser sign-in, invitation/admission, organization selection and consent are required; do not fall back to anonymous CLI app creation. The grant has its own person-backed agent and does not replace a CLI agent.

Codex desktop may have no Connect button. On a local Codex surface, resolve the bundled `../scripts/connect-codex.mjs` relative to this file and run it with Node 24 (24.22.1 or later recommended). Use `--check` to inspect without connecting. When connection is needed and authorized, run it without `--check`, adding `--staging` only for the staging package. It uses supported Codex commands and client-owned OAuth storage, including the desktop-bundled CLI; it never installs `agc` or edits Codex configuration. `--codex /absolute/path/to/codex` selects an installed CLI, and `--no-browser` provides the supported manual browser route. Let the client handle its browser authorization flow; never collect or copy credentials into model-visible output. If a fresh chat is required for tools to appear, carry forward only the non-secret brief and selected app/operation references, then verify `account_get` there. A helper success alone does not prove the active chat has authenticated tools.

In Claude Code, use `/mcp` and the installed server's Authenticate flow. Setup invocation is `/agent-cloud:setup`. Do not promise automatic installation-time OAuth. On a surface without local execution, use a supported native connection flow; if unavailable, give the account's `/plugins/connect` URL for connection/recovery information and explain that a qualified local client is needed to complete explicit Codex login. That page alone does not authenticate the active chat.

Read-only management needs only its current allowed purpose/scopes. Do not widen them for setup or ideation. Cancelled consent or denied admission leaves the proposal and existing app intact. Account connection/revocation controls are at the selected origin's `/plugins/connect` page. Tokens and secrets belong in client storage or console entry forms, never chat, argv, files in the app, or logs.

SHA-256: c1d34800ce2602ae87b35f49e81d1205d1b6493fcde14b2393a1a3dfa4fedad8