Skip to content

Commands

Every mcpwn invocation looks like:

mcpwn [GLOBAL OPTIONS] <command> <target> [COMMAND OPTIONS]

Global options come before the command

Connection flags such as -x/--proxy are parsed by the top-level app, so they go before the subcommand: mcpwn -x http://127.0.0.1:8080 enum http://host/mcp/.

The target is either a URL or a local command line, and the transport is auto-detected from it.

Subcommands

Command Purpose
enum Connect and enumerate tools, prompts, resources and templates.
call Call a tool and render its result.
prompt Render a prompt template with arguments.
read Read a resource by URI.
info Show server info, or one tool/prompt's parameters.
ping Check connectivity to a server.
shell Open an interactive session over one persistent connection.
sqlmap Generate a sqlmap request for a tool call (and optionally run it).

Global options

These apply to every command and are set on the top-level mcpwn app.

Flag Meaning
-t, --transport auto (default), http, sse, stdio. See Transports & targets.
-H, --header Extra HTTP header Name: value (repeatable).
-e, --env Env var KEY=VALUE for stdio servers (repeatable).
-x, --proxy Route HTTP/SSE traffic through a proxy, e.g. Burp http://127.0.0.1:8080.
-k, --insecure Disable TLS certificate verification.
--timeout Per-operation timeout in seconds (default 30).
--cwd Working directory for stdio servers.
--no-banner Suppress the ASCII banner.
--no-color Disable coloured output (also honours NO_COLOR).
-V, --version Show the version and exit.

Passing arguments to tools & prompts

call, prompt and sqlmap accept arguments two ways, which can be combined:

  • -a key=value (repeatable). Each value is parsed as JSON, falling back to a plain string — so -a a=2 is the integer 2, -a name=alice is the string "alice".
  • --json '{...}' — a whole JSON object. Keys from -a are layered on top.
mcpwn call http://host/mcp/ add -a a=2 -a b=40
mcpwn call http://host/mcp/ search --json '{"q":"test","limit":5}'
mcpwn call http://host/mcp/ search --json '{"q":"test"}' -a limit=5