Skip to content

connect

machina connect is the one-command bridge that lets an external agent (e.g. sportsclaw) talk to a project's MCP endpoint — it resolves the endpoint and pairs it with an auth token, ready to register, without a hand-pasted URL or key.

Usage

text
machina connect [project_id] [--reveal] [--probe] [--name <n>] [--mint [--org <id>]] [--json]
Arg / flagPurpose
project_idProject to connect (defaults to the selected project).
--revealShow the auth token (masked by default).
--probeVerify the SSE endpoint is reachable before handing it out.
--name, -nServer name for the agent (defaults to the project id; coerced to ^[A-Za-z0-9_-]+$).
--mintReuse or create a dedicated sportsclaw-<project> project API key for a durable connection.
--org, -oOrganization ID for --mint (defaults to the selected org).
--json, -jMachine-readable output (add --reveal to include the token).

Examples

bash
# resolve + verify the connection for the selected project (token masked)
machina connect --probe

# durable connection: reuse/mint a dedicated project key and reveal it
machina connect <project-id> --mint --reveal

# JSON for scripting an agent's server registration
machina connect <project-id> --mint --reveal --json

What you get

  • The MCP URL, transport (sse), and auth header (X-Api-Token) — the same derivation as machina mcp url.
  • A token paired to that endpoint. By default the ambient session/API-key credential; with --mint, a durable dedicated sportsclaw-<project> project API key (reused if it already exists, minted if not — so the connection survives your session expiring).

Token handling

The token is masked unless you pass --reveal. Treat a revealed token as a live credential — it grants access to the project's MCP surface. --mint keys are scoped per project and named sportsclaw-<project>; manage them with machina credentials.

  • mcp url — the raw endpoint resolver (no token pairing).
  • credentials — list/revoke the project API keys (--mint reuses these).