Complete reference for the mcp2cli YAML configuration schema.
~/.local/share/mcp2cli/configs/<name>.yaml
Override with: MCP2CLI_CONFIG_DIR=/custom/path
schema_version: 1 # Required. Always 1.
app:
profile: bridge # Application profile (only "bridge" currently)
server:
display_name: "My MCP Server" # Human-readable name for --help banners
transport: streamable_http # streamable_http | stdio
endpoint: "http://localhost:3001/mcp" # Required for streamable_http transport
stdio:
command: "npx" # Subprocess command (required for stdio)
args: # Subprocess arguments
- "@modelcontextprotocol/server-everything"
cwd: "/path/to/working/dir" # Optional working directory
env: # Optional environment variables
API_KEY: "sk-abc123"
NODE_ENV: "production"
roots: # Optional: exposed via roots/list
- uri: "file:///home/user/project"
name: "Project Root"
defaults:
output: human # human | json | ndjson
timeout_seconds: 120 # Operation timeout (0 = no timeout)
logging:
level: warn # trace | debug | info | warn | error
format: pretty # pretty | json
outputs:
- kind: stderr # stderr | stdout | file
# - kind: file
# path: /var/log/mcp2cli.log
auth:
browser_open_command: "xdg-open" # For OAuth browser flows (null = disabled)
token_store_file: null # Custom token path (auto-derived if null)
events:
enable_stdio_events: true # Human-readable events on stderr
http_endpoint: null # HTTP webhook URL (POST JSON per event)
local_socket_path: null # Unix socket path (NDJSON)
sse_endpoint: null # SSE server bind address (host:port)
command: null # Shell command per event
profile: # Optional: customize CLI surface
display_name: "My Custom CLI"
aliases: {} # Rename commands
hide: [] # Hide commands from help/ls
groups: {} # Custom command grouping
flags: {} # Rename flags per command
resource_verb: get # Verb for resource reads| Type | Default | Required |
|---|---|---|
integer |
1 |
Yes |
Must be 1. Used for future config migrations.
| Type | Default | Required |
|---|---|---|
string |
"bridge" |
Yes |
The application profile to use. Currently only bridge is supported.
| Type | Default | Required |
|---|---|---|
string |
"MCP Bridge Server" |
No |
Human-readable name shown in --help banners and JSON output.
| Type | Default | Required |
|---|---|---|
string |
streamable_http |
Yes |
Transport protocol. Values:
| Value | Description |
|---|---|
streamable_http |
HTTP JSON-RPC with SSE streaming |
stdio |
Stdin/stdout with subprocess |
| Type | Default | Required |
|---|---|---|
string | null |
null |
For HTTP |
Full URL for the MCP server endpoint. Required when transport: streamable_http.
Special value: https://demo.invalid/mcp activates the built-in demo backend.
| Type | Default | Required |
|---|---|---|
string | null |
null |
For stdio |
Executable to spawn as the MCP server subprocess.
| Type | Default |
|---|---|
string[] |
[] |
Arguments passed to the subprocess.
| Type | Default |
|---|---|
string | null |
null |
Working directory for the subprocess. If null, inherits the current directory.
| Type | Default |
|---|---|
map<string, string> |
{} |
Environment variables merged into the subprocess environment.
| Type | Default |
|---|---|
array |
[] |
Roots exposed to the server via roots/list. Each entry has:
| Field | Type | Description |
|---|---|---|
uri |
string |
Root URI (typically file:// paths) |
name |
string |
Human-readable label |
| Type | Default | Values |
|---|---|---|
string |
human |
human, json, ndjson |
Default output format. Overridden by --json or --output flags.
| Type | Default | Range |
|---|---|---|
integer |
120 |
0–∞ |
Default timeout for all MCP operations, in seconds. 0 disables timeouts.
Overridden by --timeout flag per-command.
| Type | Default | Values |
|---|---|---|
string |
warn |
trace, debug, info, warn, error |
Minimum log level for tracing output.
| Type | Default | Values |
|---|---|---|
string |
pretty |
pretty, json |
Log output format. json is useful for log aggregation.
| Type | Default |
|---|---|
array |
[{kind: stderr}] |
Log output destinations. Each entry:
| Field | Values | Description |
|---|---|---|
kind |
stderr, stdout, file |
Output target |
path |
(file only) | File path for kind: file |
| Type | Default |
|---|---|
string | null |
null |
Command to open URLs in the browser (for OAuth flows). Examples: xdg-open, open, wsl-open.
| Type | Default |
|---|---|
string | null |
null (auto-derived) |
Custom path for token storage. If null, defaults to instances/<name>/tokens.json.
| Type | Default |
|---|---|
boolean |
true |
Write human-readable event lines to stderr.
| Type | Default |
|---|---|
string | null |
null |
HTTP URL for webhook event delivery. Each event is POSTed as JSON.
| Type | Default |
|---|---|
string | null |
null |
Path to a Unix domain socket for NDJSON event delivery.
| Type | Default |
|---|---|
string | null |
null |
Bind address for an SSE (Server-Sent Events) HTTP server. Format: host:port.
| Type | Default |
|---|---|
string | null |
null |
Shell command executed per event. Environment variables available:
| Variable | Content |
|---|---|
MCP_EVENT_TYPE |
Event type name |
MCP_EVENT_JSON |
Full JSON event |
MCP_EVENT_APP_ID |
Config name |
MCP_EVENT_MESSAGE |
One-line message |
Optional profile overlay for CLI customization.
| Type | Default |
|---|---|
string | null |
null |
Custom name for --help banner. If null, uses server.display_name.
| Type | Default |
|---|---|
map<string, string> |
{} |
Command renames. Keys are original names (dot-notation for grouped), values are new names.
aliases:
long-running-operation: lro # Top-level rename
create.payload: object # Grouped subcommand rename| Type | Default |
|---|---|
string[] |
[] |
Commands to hide from --help and ls.
| Type | Default |
|---|---|
map<string, string[]> |
{} |
Custom grouping. Keys are group names, values are lists of command names.
groups:
mail:
- send
- reply
- draft-create| Type | Default |
|---|---|
map<string, map<string, string>> |
{} |
Per-command flag renames. Outer key is command name, inner map is original→new.
flags:
echo:
message: msg| Type | Default |
|---|---|
string |
"get" |
Verb for the resource read command.
Any config field can be overridden via environment variable:
MCP2CLI_<PATH__TO__FIELD>=<value>
| Config Path | Environment Variable |
|---|---|
logging.level |
MCP2CLI_LOGGING__LEVEL |
server.endpoint |
MCP2CLI_SERVER__ENDPOINT |
defaults.output |
MCP2CLI_DEFAULTS__OUTPUT |
defaults.timeout_seconds |
MCP2CLI_DEFAULTS__TIMEOUT_SECONDS |
Additionally:
| Variable | Description |
|---|---|
MCP2CLI_CONFIG_DIR |
Override config directory path |
MCP2CLI_DATA_DIR |
Override data directory path |
| Path | Content |
|---|---|
configs/ |
Named config YAML files |
instances/<name>/discovery.json |
Cached discovery inventory |
instances/<name>/tokens.json |
Stored auth credentials |
instances/<name>/session.json |
Negotiated capabilities cache |
instances/<name>/daemon.json |
Daemon PID file |
instances/<name>/daemon.sock |
Daemon Unix socket |
instances/<name>/jobs/ |
Background job records |
active.json |
Currently active config pointer |
Default base: ~/.local/share/mcp2cli/
schema_version: 1
server:
transport: streamable_http
endpoint: http://localhost:3001/mcpschema_version: 1
server:
transport: stdio
stdio:
command: npx
args: ['@modelcontextprotocol/server-everything']schema_version: 1
server:
transport: streamable_http
endpoint: https://demo.invalid/mcpAnonymous usage telemetry configuration. See Telemetry Collection Guide for full details.
| Field | Type | Default | Description |
|---|---|---|---|
enabled |
bool |
true |
Master switch. Set to false to disable telemetry |
endpoint |
string? |
null |
Optional HTTP endpoint for shipping NDJSON event batches |
batch_size |
int |
25 |
Number of events to batch before shipping to HTTP endpoint |
telemetry:
enabled: true
# endpoint: "https://your-collector.example.com/v1/events"
# batch_size: 25Any one of these disables telemetry completely:
# In config
telemetry:
enabled: false# Via environment
export MCP2CLI_TELEMETRY=off
# Via CLI flag
mcp2cli --no-telemetry ls
# Via DO_NOT_TRACK standard
export DO_NOT_TRACK=1- CLI Reference — every command and flag
- Getting Started — config setup walkthrough
- Profile Overlays — profile customization guide
- Telemetry Collection — telemetry backend setup