Complete reference for every mcp2cli command, flag, and option.
mcp2cli [--json] [--output <FORMAT>] [--timeout <SECS>] <command>
mcp2cli [--json] [--output <FORMAT>] [--timeout <SECS>] <config-name> <command>
mcp2cli --url <URL> [--json] [--timeout <SECS>] <command>
mcp2cli --stdio <COMMAND> [--env KEY=VAL]... [--json] [--timeout <SECS>] <command>
<alias> [--json] [--output <FORMAT>] [--timeout <SECS>] <command>
| Flag | Short | Description |
|---|---|---|
--json |
Output JSON instead of human-readable text | |
--output <FORMAT> |
-o |
Output format: human, json, ndjson |
--timeout <SECONDS> |
Operation timeout in seconds (0 = no timeout; overrides config) |
|
--non-interactive |
Fail instead of prompting for input (CI mode) | |
--input-json <JSON> |
Supply elicitation answers (and auth login credentials) as a JSON object so prompts never block (CI mode) |
|
--no-telemetry |
Disable anonymous local usage telemetry for this invocation | |
--url <URL> |
Ad-hoc HTTP MCP server URL (no config needed) | |
--stdio <COMMAND> |
Ad-hoc stdio MCP server command (no config needed) | |
--env <KEY=VALUE> |
Environment variable for --stdio server (repeatable) |
--non-interactive, --input-json, and --timeout are global and apply to every
command surface (the dynamic per-server CLI and the static bridge). They make
mcp2cli safe to run unattended:
--non-interactiveturns any prompt (elicitation,auth logintoken entry) into an immediate error instead of blocking on a TTY.--input-json '<OBJECT>'pre-supplies answers. For elicitation, the keys are the requested field names. Forauth login, pass--input-json '{"bearer_token": "<token>", "account": "<optional>"}'.
email --non-interactive search --query "from:boss"
email --input-json '{"bearer_token": "tok_123"}' auth login
email --no-telemetry --timeout 30 send --to user@example.com --subject "Hi" --body "..."These manage configs and aliases — no server connection required.
Create a new named config.
mcp2cli config init --name <NAME> --app bridge \
[--transport <stdio|streamable_http>] \
[--endpoint <URL>] \
[--stdio-command <CMD>] \
[--stdio-arg <ARG>]... \
[--force]| Flag | Required | Description |
|---|---|---|
--name <NAME> |
✅ | Config name (alphanumeric, hyphens) |
--app <PROFILE> |
Application profile (default: bridge) |
|
--transport <TYPE> |
stdio or streamable_http (default: streamable_http) |
|
--endpoint <URL> |
for HTTP | Server endpoint URL |
--stdio-command <CMD> |
for stdio | Subprocess command |
--stdio-arg <ARG> |
Subprocess argument (repeat for each arg) | |
--force |
Overwrite an existing config of the same name |
# HTTP email server
mcp2cli config init --name email --app bridge \
--transport streamable_http --endpoint https://mcp.example.com/email
# Local stdio reference server (the everything server speaks echo/add, not email)
mcp2cli config init --name local --app bridge \
--transport stdio --stdio-command npx \
--stdio-arg @modelcontextprotocol/server-everythingList all named configs.
mcp2cli config listDisplay a named config.
mcp2cli config show --name <NAME>Manage the active config.
mcp2cli use email # Set active config
mcp2cli use --show # Show current active config
mcp2cli use --clear # Clear active configCreate a symlink alias to mcp2cli. By default this also generates and installs a man page for the alias.
mcp2cli link create --name email \
[--dir <PATH>] [--force] [--man-dir <PATH>] [--no-man]| Flag | Required | Description |
|---|---|---|
--name <NAME> |
✅ | Alias name (also the symlink filename) |
--dir <PATH> |
Directory for the symlink (default: next to binary) | |
--force |
Replace an existing symlink of the same name | |
--man-dir <PATH> |
Man page install directory (default: ~/.local/share/man/man1) |
|
--no-man |
Skip man page generation and installation |
Reserved names: mcp2cli, config, link, use, daemon.
# Install an `email` alias bound to the active/email config
mcp2cli link create --name email
# email ls, email send, email auth login ... now dispatch to that configManage background daemon processes.
mcp2cli daemon start <CONFIG_NAME> # Start daemon for config
mcp2cli daemon stop <CONFIG_NAME> # Stop running daemon
mcp2cli daemon status [CONFIG_NAME] # Check daemon statusList server capabilities.
<alias> ls [--tools] [--resources] [--prompts] [--filter <PATTERN>] [--all]| Flag | Description |
|---|---|
--tools |
Show only tools |
--resources |
Show only resources |
--prompts |
Show only prompts |
--filter <PATTERN> |
Filter results by name substring |
--all |
List every item without pagination |
Dump full server capabilities, metadata, and negotiated protocol info.
<alias> inspectRun runtime health diagnostics.
<alias> doctorChecks: transport connection, server info, auth state, cached capabilities.
Server liveness check with latency measurement.
<alias> pingServer tools become commands with flags from JSON Schema. With an email alias
bound to an email MCP server, its tools are exposed directly (the alias already
namespaces them, so there is no email. prefix on the command):
<alias> <tool-name> [--flag <value>]...Examples against the email server:
email send --to user@example.com --subject "Hi" --body "..." # String flags
email search --query "from:boss" # String flag
email draft create --subject "New draft" # Dotted tool (draft.create)
email reply --thread-id 123 --body "Thanks" # String flags
email labels add --thread-id 123 --label important # Dotted tool (labels.add)Flag types follow the tool's JSON Schema — booleans become bare switches, arrays and objects take JSON values:
local echo --message hello # String flag
local add --a 5 --b 3 # Integer flags
<alias> deploy --tags '["a","b"]' # Array flag (JSON)
<alias> process --include-metadata # Boolean flag
<alias> build --config '{"opt": true}' # JSON flagThe
localalias above points at a stdio@modelcontextprotocol/server-everythingconfig — a real reference server whose tools areecho/add/etc., not email tools.
<alias> tool list [--filter <PATTERN>] [--all]
<alias> tool call <TOOL_NAME> [--arg <KEY=VALUE>]... [--args-file <PATH>] [--args-json <JSON>] [--background]<alias> get <URI>
<alias> <resource-verb> <URI> # If profile.resource_verb is setExamples against the email server:
email get mail://inbox
email get mail://thread/123<alias> <template-name> [--param <value>]...
<alias> <template-name> <positional> # Single-param templates<alias> resource list [--filter <PATTERN>] [--all]
<alias> resource read <URI><alias> subscribe <URI>
<alias> unsubscribe <URI><alias> <prompt-name> [--arg <value>]...<alias> prompt list [--filter <PATTERN>] [--all]
<alias> prompt run <PROMPT_NAME> [--arg <KEY=VALUE>]...email auth login # Prompt for a bearer token (or read it from stdin)
email auth logout # Clear stored credentials
email auth status # Show current auth stateauth login reads a bearer token interactively, from a piped stdin
(echo "$TOKEN" | email auth login), or from
--input-json '{"bearer_token": "<token>"}'. With --non-interactive and no
token available it fails fast instead of prompting.
<alias> jobs list # List all background jobs
<alias> jobs show <JOB_ID> # Show job details
<alias> jobs show --latest # Show most recent job
<alias> jobs wait <JOB_ID> # Block until job completes
<alias> jobs wait --latest # Wait for most recent job
<alias> jobs cancel <JOB_ID> # Cancel a running job
<alias> jobs cancel --latest # Cancel most recent job
<alias> jobs watch <JOB_ID> # Stream job progress events
<alias> jobs watch --latest # Watch most recent job<alias> log <LEVEL>| Level | Description |
|---|---|
trace |
Most verbose |
debug |
Debug messages |
info |
Informational |
warn |
Warnings |
error |
Errors only |
<alias> complete <REF_TYPE> <REF_NAME> <ARG_NAME> [CURRENT_VALUE]Requests tab-completion values from the server.
| Argument | Description |
|---|---|
<REF_TYPE> |
Reference type: ref/prompt, ref/resource |
<REF_NAME> |
Name of the prompt or resource |
<ARG_NAME> |
Argument name to complete |
[CURRENT_VALUE] |
Current partial input for filtering |
Multiple sources for tool arguments, merged in order (later wins):
# From file
email send --args-file ./payload.json
# From JSON string
email send --args-json '{"to": "user@example.com"}'
# From flags
email send --to user@example.com
# Combined (merged, flags override)
email send --args-file base.json --args-json '{"subject": "Hi"}' --to final@example.com| Variable | Description |
|---|---|
MCP2CLI_CONFIG_DIR |
Override config directory |
MCP2CLI_DATA_DIR |
Override data directory |
MCP2CLI_LOGGING__LEVEL |
Override log level |
MCP2CLI_LOGGING__FORMAT |
Override log format |
MCP2CLI_SERVER__ENDPOINT |
Override server endpoint |
MCP2CLI_SERVER__TRANSPORT |
Override transport type |
MCP2CLI_DEFAULTS__OUTPUT |
Override default output format |
MCP2CLI_DEFAULTS__TIMEOUT_SECONDS |
Override default timeout |
Pattern: MCP2CLI_ prefix + config path with __ as separator.
- Configuration Reference — full YAML schema
- Getting Started — quick start
- Discovery-Driven CLI — how dynamic commands work