Skip to main content

Command Reference

Complete reference for all MCPProxy CLI commands.

Global Flags​

These flags are available for all commands:

FlagDescription
--configPath to configuration file
--log-levelLog level (debug, info, warn, error)
--data-dir, -dData directory path (default: ~/.mcpproxy)
--log-to-fileEnable logging to file in standard OS location
--log-dirCustom log directory path (overrides standard OS location)
--helpShow help for command

Execution Modes​

CLI commands like tools list, call tool, code exec, and auth login support two execution modes:

Daemon Mode (Default)​

When mcpproxy serve is running, CLI commands automatically connect to it via Unix socket (macOS/Linux) or named pipe (Windows). This provides:

  • Fast execution - Daemon is already loaded with connections established
  • Shared state - OAuth tokens, server connections, and search indices are shared
  • Real-time sync - Changes made via CLI reflect immediately in daemon

Detection: CLI checks for socket at ~/.mcpproxy/mcpproxy.sock (Unix) or \\.\pipe\mcpproxy-<username> (Windows).

# Start daemon
mcpproxy serve &

# These commands use daemon mode automatically
mcpproxy tools list --server=github-server # Fast - uses daemon
mcpproxy auth login --server=oauth-server # OAuth tokens shared with daemon
mcpproxy call tool --tool-name=github:search --json_args='{}' # Uses daemon's connection pool

Standalone Mode (Direct Connection)​

When no daemon is detected, CLI commands create direct connections to upstream MCP servers. This is useful for:

  • Debugging - Full control over connection with verbose logging
  • Isolated testing - Independent of daemon state
  • Single-use operations - No need to run persistent daemon
# Stop daemon to use standalone mode
pkill -f "mcpproxy serve"

# Now commands connect directly to upstream servers
mcpproxy tools list --server=github-server --log-level=debug
mcpproxy tools list --server=github-server --trace-transport # Full HTTP/SSE tracing
Forcing Standalone Mode

To debug a specific server connection without stopping the daemon:

# Use a different data directory (creates isolated socket path)
mcpproxy tools list --server=github-server --data-dir=/tmp/debug-session

# Or set empty endpoint to skip socket detection
MCPPROXY_TRAY_ENDPOINT="" mcpproxy tools list --server=github-server

Mode Comparison​

AspectDaemon ModeStandalone Mode
StartupFast (< 1s)Slower (2-5s, initializes components)
OAuth TokensShared globallyIsolated per command
Server StatePersistentEphemeral
DebuggingLimited visibilityFull component tracing
Use CaseProduction / Normal useDebugging / Testing

Environment Variables​

VariableDescription
MCPPROXY_TRAY_ENDPOINTOverride socket path. Set to empty string "" to force standalone mode

Examples:

# Custom socket endpoint
MCPPROXY_TRAY_ENDPOINT="unix:///tmp/custom.sock" mcpproxy tools list --server=myserver

# Force standalone mode (skip daemon)
MCPPROXY_TRAY_ENDPOINT="" mcpproxy tools list --server=myserver --log-level=trace
auth status requires daemon

The auth status command requires a running daemon since it queries the daemon's OAuth state:

mcpproxy auth status --server=oauth-server
# Error: auth status requires running daemon. Start with: mcpproxy serve

Server Commands​

serve​

Start the MCPProxy server:

mcpproxy serve [flags]
FlagDescriptionDefault
--listenAddress to listen on127.0.0.1:8080
--api-keyAPI key for authenticationauto-generated
--enable-socketEnable Unix socket/named pipetrue
--tray-endpointTray endpoint override (unix:///path/socket.sock or npipe:////./pipe/name)-
--debug-searchEnable debug search toolfalse
--tool-response-limitTool response limit in characters (0 = disabled)0
--read-onlyEnable read-only modefalse
--disable-managementDisable management featuresfalse
--allow-server-addAllow adding new serverstrue
--allow-server-removeAllow removing serverstrue
--enable-promptsEnable prompts for user inputtrue

doctor​

Run health diagnostics:

mcpproxy doctor [flags]
FlagDescriptionDefault
--output, -oOutput format: pretty, jsonpretty
--log-level, -lLog levelwarn
--config, -cPath to config fileauto-detect

The first section is the same needs-attention list mcpproxy attention prints; the diagnostics follow under Diagnostics: N findings. It checks for:

  • Upstream server connection errors
  • OAuth authentication requirements
  • Missing secrets
  • Runtime warnings
  • Docker isolation status
  • Tools pending quarantine approval (pending/changed counts per server)
  • Security features status (routing mode, sensitive data detection)

attention​

Print the one needs-attention list every surface shares. See Attention Command.

mcpproxy attention [-o table|json|yaml]

review​

Review quarantined servers and new or changed tools through the scan gate. See Review Commands.

mcpproxy review list
mcpproxy review show <server> [--full]
mcpproxy review approve <server> [--tools a,b] [--except a,b] [--force] [--yes]
mcpproxy review reject <server> [--tools a,b] [--yes]

catalog​

Search every catalog source, show an entry and add it quarantined. See Catalog Commands.

mcpproxy catalog search [query] [--source <id>] [--limit <n>]
mcpproxy catalog show <source>/<id>
mcpproxy catalog add <source>/<id> [--name <name>] [--env KEY=VALUE]

registry search and registry add are deprecated aliases of catalog search and catalog add; registry list, add-source, edit and remove manage the catalog sources.

client​

List the clients MCPProxy knows about (installed, connected, seen), with their connection state and reload hint, and manage their profile bindings. The client commands are documented with the profile commands in Profile Commands.

mcpproxy client list
mcpproxy client show <client>

Upstream Management​

upstream list​

List all configured servers:

mcpproxy upstream list [flags]
FlagDescriptionDefault
--output, -oOutput format: table, jsontable
--statusFilter by health status; repeatable, a comma-separated value is the same as repeating the flagall

The STATUS column is the status label (Online, Connecting, Sign-in required, Needs review, Secret required, Needs configuration, Error, Disabled). See Management Commands.

upstream logs​

View server logs:

mcpproxy upstream logs <server-name> [flags]
FlagDescription
--tailNumber of lines to show
--followFollow log output

upstream restart​

Restart a server:

mcpproxy upstream restart <server-name>
mcpproxy upstream restart --all

upstream inspect​

Inspect tool approval status for a server (tool-level quarantine):

mcpproxy upstream inspect <server-name> [flags]
FlagDescriptionDefault
--toolInspect a specific tool by nameall tools
--output, -oOutput format: table, jsontable

Examples:

# Show all tool approvals for a server
mcpproxy upstream inspect github-server

# Inspect a specific tool (shows diff if changed)
mcpproxy upstream inspect github-server --tool create_issue

# JSON output for scripting
mcpproxy upstream inspect github-server --output=json

See Tool Quarantine for details.

upstream approve​

Approve quarantined tools for a server:

mcpproxy upstream approve <server-name> [tool-names...]

Without specific tool names, approves all pending/changed tools.

Examples:

# Approve all pending/changed tools
mcpproxy upstream approve github-server

# Approve specific tools
mcpproxy upstream approve github-server create_issue list_repos

upstream enable/disable​

Enable or disable a server:

mcpproxy upstream enable <server-name>
mcpproxy upstream disable <server-name>

Configuration Import​

upstream import​

Import MCP server configurations from other AI tools:

mcpproxy upstream import <path> [flags]
FlagDescriptionDefault
--server, -sImport only a specific server by nameall
--formatForce format (claude-desktop, claude-code, cursor, codex, gemini)auto-detect
--dry-runPreview import without making changesfalse
--no-quarantineDon't quarantine imported servers (use with caution)false

Supported Formats:

SourceFormat FlagAuto-detected
Claude Desktopclaude-desktopYes
Claude Codeclaude-codeYes
Cursor IDEcursorYes
Codex CLIcodexYes (TOML)
Gemini CLIgeminiYes

Examples:

# Import from Claude Desktop config
mcpproxy upstream import ~/Library/Application\ Support/Claude/claude_desktop_config.json

# Import from Claude Code config
mcpproxy upstream import ~/.claude.json

# Preview without importing
mcpproxy upstream import --dry-run config.json

# Import with format hint (if auto-detect fails)
mcpproxy upstream import --format claude-desktop config.json

# Import only a specific server
mcpproxy upstream import --server github-server config.json

# Import without quarantine (trusted configs)
mcpproxy upstream import --no-quarantine ~/Library/Application\ Support/Claude/claude_desktop_config.json

Canonical Config Paths:

SourcemacOSWindowsLinux
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json
Claude Code~/.claude.json~/.claude.json~/.claude.json
Cursor IDE~/.cursor/mcp.json~/.cursor/mcp.json~/.cursor/mcp.json
Codex CLI~/.codex/config.toml~/.codex/config.toml~/.codex/config.toml
Gemini CLI~/.gemini/settings.json~/.gemini/settings.json~/.gemini/settings.json
Imported servers are quarantined

For security, all imported servers are quarantined by default. Use --no-quarantine to skip quarantine for configs you trust.

See Configuration Import for Web UI and REST API documentation.

Server Discovery​

search-servers​

Search MCP registries for available servers:

mcpproxy search-servers [flags]
FlagDescription
-r, --registryRegistry ID or name to search (exact match)
-s, --searchSearch term for server name/description
-t, --tagFilter servers by tag/category
-l, --limitMaximum results (default: 10, max: 50)
--list-registriesList all known registries

Tool Commands​

tools list​

List available tools:

mcpproxy tools list [flags]
FlagDescriptionDefault
--serverFilter by server name-
--tierFilter by tier: read, write, destructive, unannotated (--risk is an alias)-
--approvalFilter by review state: approved (Approved), pending (New, needs review), changed (Changed, needs review)-
--timeout, -tConnection timeout30s
--output, -oOutput format: table, json, yamltable
--trace-transportEnable detailed HTTP/SSE frame-by-frame tracingfalse

The TIER column is computed once by the core, so it agrees with the Web UI, macOS and the review payload.

activity list --view​

mcpproxy activity list --view calls|system|all selects the same views as the Web UI and macOS Activity page: calls is tool calls only, system is system events, all is everything (the default, so scripts keep working). The CLI has no sessions view; use --session <id> for one session's history. --from and --to take RFC 3339 or relative times (-24h). See Activity Commands.

call tool​

Execute a tool:

mcpproxy call tool --tool-name=<server:tool> [flags]
FlagDescriptionDefault
--tool-nameTool name in format server:tool or built-in tool name-
--json_args, -jJSON arguments for the tool{}
--output, -oOutput format: pretty, jsonpretty

Examples:

# Call a built-in tool
mcpproxy call tool --tool-name=upstream_servers --json_args='{"operation":"list"}'

# Call an upstream server tool
mcpproxy call tool --tool-name=github:list_repos --json_args='{"owner":"myorg"}'

Intent-Based Tool Variants​

For granular permission control, use intent-based tool variants:

# Read-only operations (safe, no side effects)
mcpproxy call tool-read --tool-name=github:list_repos --json_args='{}'

# Write operations (creates/modifies state)
mcpproxy call tool-write --tool-name=github:create_issue --json_args='{"title":"Bug"}'

# Destructive operations (deletes/removes state)
mcpproxy call tool-destructive --tool-name=github:delete_repo --json_args='{"repo":"test"}'
FlagDescriptionDefault
--tool-nameTool name in format server:tool-
--json_args, -jJSON arguments for the tool{}
--reasonHuman-readable reason for the operation-
--sensitivityData sensitivity: public, internal, private, unknown-
--output, -oOutput format: pretty, jsonpretty

Code Execution​

code exec​

Execute JavaScript or TypeScript code:

mcpproxy code exec [flags]
FlagDescriptionDefault
--codeJavaScript or TypeScript code to execute-
--filePath to JS/TS file (alternative to --code)-
--languageSource code language: javascript, typescriptjavascript
--inputJSON input data{}
--input-filePath to JSON file containing input data-
--max-tool-callsMaximum tool calls (0 = unlimited)0
--allowed-serversComma-separated list of allowed servers-

Examples:

# JavaScript (default)
mcpproxy code exec --code="({ result: input.value * 2 })" --input='{"value": 21}'

# TypeScript with type annotations
mcpproxy code exec --language typescript --code="const x: number = 42; ({ result: x })"

# TypeScript from file
mcpproxy code exec --language typescript --file=script.ts --input-file=params.json

See Code Execution for detailed documentation.

Authentication​

auth login​

Authenticate with an OAuth server:

mcpproxy auth login [flags]
FlagDescriptionDefault
--serverServer name to authenticate with (required)-
--timeoutAuthentication timeout5m

auth status​

Check authentication status:

mcpproxy auth status [flags]
FlagDescription
--server, -sServer name to check status for
--allShow status for all servers

auth logout​

Clear OAuth token and disconnect from a server:

mcpproxy auth logout [flags]
FlagDescriptionDefault
-s, --serverServer name to logout from (required)-
--timeoutLogout timeout30s

Secrets Management​

secrets set​

Store a secret in the system keyring:

mcpproxy secrets set <key> <value> [flags]
FlagDescription
--typeSecret type (api-key, oauth-token, password)
--from-envRead value from environment variable
--from-stdinRead value from stdin

Examples:

mcpproxy secrets set github-token "ghp_abc123" --type=oauth-token
mcpproxy secrets set api-key --from-env=MY_API_KEY
echo "secret-value" | mcpproxy secrets set db-password --from-stdin

secrets get​

Retrieve a secret:

mcpproxy secrets get <key> [flags]
FlagDescription
--typeSecret type filter
--maskedShow masked value (first/last 4 chars)

secrets del​

Delete a secret:

mcpproxy secrets del <key> [flags]
FlagDescription
--typeSecret type filter

secrets list​

List all stored secrets:

mcpproxy secrets list [flags]
FlagDescription
--jsonOutput in JSON format
--allShow all secret metadata

secrets migrate​

Migrate secrets between storage backends:

mcpproxy secrets migrate [flags]
FlagDescriptionDefault
--dry-runShow what would be migrated without executingfalse
--auto-approveSkip confirmation promptsfalse
--fromSource storage backend-
--toTarget storage backend-

Certificate Management​

trust-cert​

Install a trusted certificate:

mcpproxy trust-cert <certificate-path> [flags]
FlagDescriptionDefault
--forceInstall certificate without confirmationfalse
--keychainTarget keychain: 'system' or 'login'system

Example:

mcpproxy trust-cert /path/to/cert.pem --keychain=system

Security Scanner Commands​

MCPProxy integrates Docker-based security scanners that analyze quarantined upstream MCP servers for tool poisoning, prompt injection, CVEs, and other supply-chain risks. All commands live under mcpproxy security and cover three workflows:

  1. Scanner lifecycle — scanners, enable, disable, configure
  2. Scan operations — scan (with --all, --async, --dry-run, --scanners), rescan, status, report, cancel-all
  3. Approval & integrity — approve, reject, integrity, overview

Quick examples:

mcpproxy security scanners # list registry + status
mcpproxy security enable mcp-scan # pull the scanner image
mcpproxy security configure mcp-scan --env SNYK_TOKEN=xxx
mcpproxy security scan github-server # blocking, live progress
mcpproxy security scan github-server --dry-run # print plan, no containers
mcpproxy security report github-server # aggregated findings
mcpproxy security approve github-server # unquarantine + index tools

For the full reference — every flag, every status vocabulary, all output formats (table / json / yaml / sarif), workflow recipes, and troubleshooting — see Security Commands. For the underlying feature architecture see Security Scanner Plugin System.

Reviewing quarantined servers and new or changed tools has its own command group, mcpproxy review list|show|approve|reject: see Review Commands.