Skip to content

CLI Mode

CLI mode is activated by passing a subcommand after the connection flags. The subcommands are tool, resource, prompt, server, capabilities, verify, and conform.

Terminal window
mcp-tui [connection-flags] <subcommand> [args]
Terminal window
# list available tools
mcp-tui --cmd npx --args "@modelcontextprotocol/server-everything,stdio" tool list
# describe one tool
mcp-tui ... tool describe echo
# call a tool with key=value args
mcp-tui ... tool call echo message='hello'
tool list output
tool call output
Terminal window
mcp-tui ... resource list
mcp-tui ... resource get 'file:///example.txt' # alias: read
mcp-tui ... resource templates # URI templates
mcp-tui ... resource complete 'file:///{path}' path=doc
Terminal window
mcp-tui ... prompt list
mcp-tui ... prompt get my-prompt
mcp-tui ... prompt execute my-prompt --arg key=value # -a for short
mcp-tui ... prompt complete my-prompt topic=go
Terminal window
mcp-tui ... server # name, version, protocol
mcp-tui ... capabilities # negotiated capabilities as JSON

verify runs behavior probes; conform runs the full scenario matrix. Both are covered in Conformance testing.

Terminal window
mcp-tui verify http://localhost:8000/mcp
mcp-tui conform --report-junit conform.xml http://localhost:8000/mcp

Strings are passed verbatim. Numeric, boolean, and JSON-shaped values are coerced based on the tool’s input schema:

Terminal window
# auto-coerced
mcp-tui ... tool call sum a=1 b=2
mcp-tui ... tool call enabled flag=true
mcp-tui ... tool call query filter='{"limit":10}'

Coercion is driven entirely by the tool’s input schema: a value is parsed as the type the schema declares for that key (string, number, integer, boolean, object/array as JSON), falling back to the raw string when the schema gives no type. There is currently no per-argument type override — if a server’s schema is wrong, the coercion follows it.

CodeMeaning
0Success
1Any failure

mcp-tui exits 1 on every error — connection failures, invalid usage, tool/protocol errors, a failing verify probe or conform scenario, or a tool-layer error surfaced by --strict-output / --strict-errors. There are no distinct per-class codes. Read stderr for the human-readable classification.

See Automation & CI for pipeline patterns.