Skip to content

CLI Mode

CLI mode is activated by passing a subcommand (tool, resource, or prompt) after the connection flags.

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 read 'file:///example.txt'
Terminal window
mcp-tui ... prompt list
mcp-tui ... prompt get my-prompt arg=value

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}'

If schema coercion is wrong, force a string with key:str=value (planned).

CodeMeaning
0Success
1Connection failure
2Invalid arguments / usage
3Tool / resource not found
4Tool execution error
5Protocol error

See Automation & CI for pipeline patterns.