---
title: Org Connectors and Scoped Secrets
description: Sign MCP servers in once for your whole organization with cvm connect, grant per-deployment tool ceilings, and inject scoped org secrets safely with cvm secrets.
canonical: https://docs.caveman.so/agents/connectors-and-secrets
product: Caveman Cloud
tab: Documentation
group: Build & Deploy Agents
---

# Org Connectors and Scoped Secrets

> Sign MCP servers in once for your whole organization with cvm connect, grant per-deployment tool ceilings, and inject scoped org secrets safely with cvm secrets.

Credentials never live inside `AGENT.md`, git repositories, or sandbox disk images. Caveman Cloud keeps external tool authentication in **Connectors** (`cvm connect`) and raw API keys or tokens in **Secrets** (`cvm secrets`), enforced outside the agent loop.

## Org Connectors (`cvm connect`)

A connector is an MCP server registered once for your organization and referenced by name in `AGENT.md` (`connectors: [linear]`). An admin adds and signs in the connector once; connector managers accept tool lists and grant specific deployments access.

### Add a connector and accept its tools

```bash
# Add a catalog connector (opens browser sign-in, then lists tools to accept)
cvm connect add linear

# Add any HTTPS MCP server by URL
cvm connect add https://tools.acme.dev/mcp --name internal
```

`cvm connect add` opens your browser for sign-in (`--no-browser` or `CAVE_NO_BROWSER=1` prints the link instead), polls until sign-in completes, prints each discovered tool with external side effects clearly marked, and asks to accept the tool list (`--yes` for non-interactive scripts).

A person's sign-in defaults to **reads only** until that person explicitly enables writes.

### Inspect, diff, accept, and grant

```bash
# List all org connectors, state, sign-in owner, accepted tool counts, and pending requests
cvm connect ls

# Test connectivity and live tool discovery
cvm connect test linear

# Show tools added, changed, or removed on the server since last acceptance
cvm connect diff linear

# Accept an updated tool list (optionally override effect classifications)
cvm connect accept linear --effect delete_issue=external --yes

# Grant a deployment access (optional tool subset and effect ceiling)
cvm connect grant linear --to support-slack --tools list_issues,create_issue --ceiling write

# Revoke a grant from a deployment
cvm connect grant linear --to support-slack --revoke
```

### Write permissions, requests, rotation, and kill switch

```bash
# Allow writes in specific environments (or lock back to read-only with --none)
cvm connect allow-writes linear --in production,development
cvm connect allow-writes linear --none

# Request access when you do not manage a connector
cvm connect request linear --for triage-bot --ceiling read

# Managers inspect and approve or refuse pending requests
cvm connect requests
cvm connect grant --request REQUEST_ID
cvm connect grant --request REQUEST_ID --refuse --reason "Read-only connector"

# Rotate sign-in without downtime (old sign-in works until new sign-in completes)
cvm connect rotate linear

# Emergency kill switch: block every call to a connector immediately
cvm connect pause linear --reason "Upstream incident"
cvm connect resume linear

# Permanently remove a connector and end its sign-in
cvm connect rm linear --yes
```

## Scoped Org Secrets (`cvm secrets`)

Secrets are named values (`STRIPE_KEY`, `SLACK_TOKEN`) available to commands executed by deployed agents whose build explicitly declares them (`secrets: [STRIPE_KEY]` in `AGENT.md`). A person sets a value once; no API or CLI command can ever read a secret value back.

### Set, list, scope, and delete secrets

```bash
# Set from stdin (never pass secret values as CLI arguments)
cvm secrets set STRIPE_KEY < stripe.key

# Or read from a file
cvm secrets set STRIPE_KEY --value-file ./stripe.key

# Scope a test key specifically to pull-request preview deployments
cvm secrets set STRIPE_KEY --env preview < stripe-test.key

# Scope a secret to one specific agent (overrides an org-wide secret of the same name)
cvm secrets set SLACK_TOKEN --agent support-bot < slack.key

# List secret names, environments, agent scopes, and last-used timestamps (never values)
cvm secrets list

# Change environments or agent scope without touching the stored value
cvm secrets scope SLACK_TOKEN --env production,development --agent support-bot

# Delete permanently
cvm secrets delete SLACK_TOKEN --yes
```

### Security rules enforced by `cvm secrets`

- **Stdin or `--value-file` only.** Secret values are never accepted as command-line arguments (preventing exposure in `ps`, shell history, or agent transcripts). Interactive TTY stdin is refused.
- **Preview is opt-in.** Environments default to `production,development`. Because preview deployments run pull-request code, secrets never reach `preview` unless `--env` explicitly includes `preview`.
- **Agent overrides without overlap.** A secret scoped to `--agent foo` overrides an every-agent secret of the same name for `foo`. Two secrets of the same name cannot cover the same `(environment, agent)` pair (`cave_code_secret_conflict`, exit `4`).
- **Size limits.** Values must be UTF-8 text between `8 bytes` and `64 KiB` (one trailing newline is stripped).

## Verify and undo

Check which connectors and secrets are active:

```bash
cvm connect ls
cvm secrets list
```

Pause a connector immediately or delete a secret:

```bash
cvm connect pause NAME
cvm secrets delete NAME --yes
```

Next: share versioned filesystems, multi-agent Rooms, and durable Workflows in [Drives, Rooms & Workflows](/agents/drives-rooms-workflows).
