mcporter CLI Reference
A quick reference for the primary mcporter subcommands. Each command inherits --config <file> and --root <dir> to override where servers are loaded from.
#mcporter list [server]
- Without arguments, lists every configured server (with live discovery + brief
- With a server name, prints TypeScript-style signatures for each tool, doc
- With
server.tool, prints just that tool; combine with--schemafor a single - Add
--briefor--signatureswith a server orserver.tooltarget to keep - Hidden alias:
list-tools(kept for muscle memory; not advertised in help output). - Hidden ad-hoc flag aliases:
--ssefor--http-url,--insecurefor--allow-http(for plain HTTP testing). - Flags:
--brief– compact single-server output; cannot be combined with--json,--signatures– alias for--brief.--all-parameters– include every optional parameter in the signature.--schema– pretty-print the JSON schema for each tool.--timeout <ms>– per-server timeout when enumerating all servers.
status).
comments, optional summaries, and any server instructions returned during MCP initialization.
tool schema.
the server header/instructions and print compact signatures without doc comments, examples, or schemas.
--schema, --verbose, or --all-parameters.
#mcporter call <server.tool>
- Invokes a tool once and prints the response; supports positional arguments via
- Useful flags:
--server,--tool– alternate way to target a tool.--– stop flag parsing so remaining tokens stay literal positional values.--timeout <ms>– override call timeout (defaults toCALL_TIMEOUT_MS).--output text|markdown|json|raw– choose how to render theCallResult.--save-images <dir>– persist image content blocks to files under the specified directory.--raw-strings– disable numeric coercion for flag-style and positional values.--no-coerce– disable all flag-style/positional value coercion.--tail-log– stream tail output when the tool returns log handles.
pseudo-TS syntax and --arg flags.
#mcporter resource <server> [uri]
- Lists resources exposed by a server when no URI is provided.
- Reads an MCP resource when
uriis provided and renders text, markdown, JSON, - Hidden alias:
resources. - Useful flags:
--output auto|text|markdown|json|raw– choose how to render the response.--json– shortcut for--output json.--raw– shortcut for--output raw.
or raw output using the same output formatter as mcporter call.
#mcporter generate-cli
- Produces a standalone CLI for a single MCP server (optionally bundling or
- Key flags:
--server <name>(or inline JSON) – choose the server definition.--command <url|command>– point at an ad-hoc HTTP endpoint (includehttps://or usehost/path.tool) or a stdio command (anything with spaces, e.g.,"npx -y chrome-devtools-mcp@latest"). If you omit--command, the first positional argument is inspected: whitespace → stdio, otherwise the parser probes for HTTP/HTTPS and falls back to config names.--output <path>– where to write the TypeScript template.--bundle <path>– emit a bundle (Node/Bun) ready forbun x.--bundler rolldown|bun– pick the bundler implementation (defaults to Rolldown unless the runtime resolves to Bun, in which case Bun’s bundler is used automatically; still requires a local Bun install).--compile <path>– compile with Bun (implies--runtime bun).--include-tools <a,b,c>– only generate subcommands for the specified tools (exact MCP tool names). It is an error if any requested tool is missing.--exclude-tools <a,b,c>– generate subcommands for every tool except the ones listed. Unknown tool names are ignored. If all tools are excluded, generation fails.--include-toolsand--exclude-toolsare mutually exclusive.--timeout <ms>/--runtime node|bun– shared via the generator flag--from <artifact>– reuse metadata from an existing CLI artifact (legacy--dry-run– print the resolvedmcporter generate-cli ...command without- Positional shorthand:
npx mcporter generate-cli linearuses the configured
compiling with Bun).
parser so defaults stay consistent.
regenerate-cli behavior, must point at an existing CLI).
executing (requires --from).
linear definition; npx mcporter generate-cli https://example.com/mcp treats the URL as an ad-hoc server definition.
#mcporter emit-ts <server>
- Emits TypeScript definitions (and optionally a ready-to-use client) describing
- Modes:
--mode types --out <file.d.ts>(default) – export an interface whose--mode client --out <file.ts>– emit both the interface (<file>.d.ts)- Other flags:
--include-optional(alias--all-parameters) – show every optional field.--types-out <file>– override where the.d.tssits when using client
a server’s tools. This reuses the same formatter as mcporter list so doc comments, signatures, and examples stay in sync.
methods return Promise<CallResult>, with doc comments and optional summaries.
and a factory that wraps createServerProxy, returning objects whose methods resolve to CallResult.
mode.
For more detail (behavioral nuances, OAuth flows, etc.), see docs/spec.md and command-specific docs under docs/.