---
title: "agents mcp-config"
description: "Emit ready-to-paste MCP client config from a credential's secrets"
canonical: "https://pgbeam.com/docs/cli/agents/mcp-config"
last-updated: "2026-09-14T19:37:21.000Z"
---

# agents mcp-config

> Emit ready-to-paste MCP client config from a credential's secrets

URL: https://pgbeam.com/docs/cli/agents/mcp-config

Render the per-client MCP configuration (Claude Code, Claude Desktop, Cursor, VS Code, Cline, Windsurf) for the hosted agent-database MCP endpoint, given a credential's MCP URL and token. Because secrets are shown only once at creation, pass the URL + token directly (--url/--mcp-token), pipe the JSON output of `agents create --json` / `agents rotate --json` with --from-json, or read it from a saved file with --from-file. Claude Desktop, Cline and Windsurf each keep one config file per machine rather than one per project, so --write prints those with their per-OS path instead of overwriting them: merge the entry in by hand. Claude Desktop also cannot address a remote URL directly, so its config is an `mcp-remote` bridge.

## Usage

## Options

Option

Description

Required

Default

`--url <value>`

Hosted MCP URL (the mcp\_url from create/rotate)

No

-

`--mcp-token <value>`

Bearer token for the MCP endpoint (the mcp\_token from create/rotate)

No

-

`--from-json`

Read mcp\_url + mcp\_token from an `agents create --json` blob piped on stdin.

No

`false`

`--from-file <value>`

Read mcp\_url + mcp\_token from an `agents create --json` blob saved to this file.

No

-

`--client <value>`

MCP client: claude (default), claude-desktop, cursor, vscode, cline, windsurf, or all

No

`claude`

`--write`

Write each client's config to its conventional file path instead of stdout

No

`false`

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

## Examples

## Output

Prints the MCP config block(s). With --json, returns a structured array of \{ client, file, config }. With --write, writes each project-scoped client's config to its conventional file path; machine-wide files (Claude Desktop, Cline, Windsurf) are printed with their per-OS location instead of being overwritten.