PgBeam Docs
agents

agents create

Issue a new agent credential

Issue a scoped Postgres login and hosted MCP token for an AI agent. The connection string and MCP token are shown once and cannot be retrieved again. Store them securely. A ready-to-paste MCP client config (Claude Code, Cursor, or VS Code) is printed alongside the secrets.

Usage

pgbeam agents create [flags]

Options

OptionDescriptionRequiredDefault
--name <value>Human-readable label for the credentialYes-
--policy <value>Policy profile ID to enforceYes-
--client <value>MCP client to emit config for: claude (default), cursor, vscode, or allNoclaude

Global options

All global options (--token, --profile, --project, --org, --json, --no-color, --debug) are also available on this command.

Examples

# Create a credential bound to a policy profile
pgbeam agents create --name "Claude Code" --policy pol_xxx

# Create and emit a Cursor MCP config
pgbeam agents create --name agent --policy pol_xxx --client cursor

# Create and capture secrets as JSON
pgbeam agents create --name ci --policy pol_xxx --json

Output

Prints the connection string, MCP URL, MCP token, and a ready-to-paste MCP client config once. With --json, returns the full secrets object.

On this page