@standardbeagle/mcp-tui 0.6.1 โ†’ 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -111,7 +111,7 @@ mcp-tui # Connects automatically!
111
111
 
112
112
  **๐Ÿค– Building Automation? Use CLI Mode:**
113
113
  ```bash
114
- # List all available tools via STDIO (combined command input)
114
+ # List all available tools via STDIO (combined command input)
115
115
  mcp-tui "npx -y @modelcontextprotocol/server-everything stdio" tool list
116
116
 
117
117
  # Or via SSE
@@ -121,10 +121,21 @@ mcp-tui --url http://localhost:8000/sse tool list
121
121
  mcp-tui --url http://localhost:8000/sse tool call echo message="Hello World"
122
122
 
123
123
  # Get JSON output for your scripts
124
- mcp-tui --json --url http://localhost:8000/sse tool list
124
+ mcp-tui --url http://localhost:8000/sse tool list -f json
125
125
  ```
126
126
  *Why this works: Combined command input, perfect for CI/CD, scripts, and automated testing workflows*
127
127
 
128
+ **๐Ÿงช Writing Tests? Use Porcelain Mode:**
129
+ ```bash
130
+ # Porcelain mode gives clean output for test assertions
131
+ mcp-tui --porcelain "npx -y @modelcontextprotocol/server-everything stdio" tool call echo message="test"
132
+
133
+ # Combine with JSON for predictable parsing
134
+ result=$(mcp-tui --porcelain -f json tool call weather location="NYC")
135
+ temp=$(echo "$result" | jq -r '.temp')
136
+ ```
137
+ *Why this works: No progress messages, only result data on stdout, detailed errors on stderr*
138
+
128
139
  **๐ŸŒ Have a Web Service? Connect via HTTP:**
129
140
  ```bash
130
141
  # Visual interface for web-based MCP servers
@@ -312,6 +323,47 @@ make test-servers
312
323
  ./mcp-tui --cmd node --args "test-servers/crash-server.js" tool list
313
324
  ```
314
325
 
326
+ ### Testing with Porcelain Mode
327
+
328
+ For automated testing and CI/CD pipelines, use `--porcelain` mode to get clean, parseable output:
329
+
330
+ ```bash
331
+ # Test that a tool returns expected result
332
+ result=$(mcp-tui --porcelain "npx -y @modelcontextprotocol/server-everything stdio" tool call echo message="test")
333
+ if [[ "$result" == *"test"* ]]; then
334
+ echo "PASS: echo tool returned expected message"
335
+ else
336
+ echo "FAIL: unexpected result: $result"
337
+ exit 1
338
+ fi
339
+
340
+ # Parse JSON output for assertions
341
+ result=$(mcp-tui --porcelain -f json "npx -y @modelcontextprotocol/server-everything stdio" tool call weather location="NYC")
342
+ temp=$(echo "$result" | jq -r '.temp')
343
+ if [[ "$temp" =~ ^[0-9]+ ]]; then
344
+ echo "PASS: temperature is numeric: $temp"
345
+ else
346
+ echo "FAIL: invalid temperature: $temp"
347
+ exit 1
348
+ fi
349
+
350
+ # Count tools in CI/CD
351
+ tool_count=$(mcp-tui --porcelain -f json tool list | jq '.count')
352
+ if [ "$tool_count" -gt 0 ]; then
353
+ echo "PASS: server exposes $tool_count tools"
354
+ else
355
+ echo "FAIL: no tools available"
356
+ exit 1
357
+ fi
358
+ ```
359
+
360
+ **Porcelain Mode Benefits:**
361
+ - โœ… No progress messages or timestamps
362
+ - โœ… Predictable output for assertions
363
+ - โœ… Clean stdout with only result data
364
+ - โœ… Detailed errors on stderr for debugging
365
+ - โœ… Perfect for CI/CD pipelines and automated tests
366
+
315
367
  ## ๐Ÿ“‹ Commands Reference
316
368
 
317
369
  ### Command Line Arguments
@@ -352,16 +404,15 @@ mcp-tui prompt get <name> [args...] # Get a prompt with arguments
352
404
 
353
405
  ### Global Options
354
406
  ```bash
355
- --url string # URL for SSE servers (primary method)
356
- --type string # Transport type (currently: sse)
357
- --timeout duration # Connection timeout (default 30s)
407
+ --url string # URL for SSE/HTTP servers
408
+ --cmd string # Command to run MCP server (STDIO mode)
409
+ --args strings # Arguments for server command
410
+ --transport string # Transport type (stdio, sse, http, streamable-http)
411
+ --timeout duration # Connection timeout (default 10s)
412
+ --format string # Output format: text or json (short: -f) (default "text")
413
+ --porcelain # Machine-readable output (no progress messages)
358
414
  --debug # Enable debug mode with detailed logging
359
415
  --log-level string # Log level (debug, info, warn, error)
360
- --json # Output results in JSON format
361
-
362
- # Legacy options (STDIO support coming back soon):
363
- --cmd string # Command to run MCP server (not yet implemented)
364
- --args strings # Arguments for server command (not yet implemented)
365
416
  ```
366
417
 
367
418
  ## ๐Ÿ” Error Handling & Debugging
package/bin/mcp-tui CHANGED
Binary file
package/bin/mcp-tui-local CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@standardbeagle/mcp-tui",
3
- "version": "0.6.1",
3
+ "version": "0.7.1",
4
4
  "description": "A comprehensive Terminal User Interface (TUI) and Command Line Interface (CLI) for Model Context Protocol (MCP) servers with full tool, prompt, and resource management",
5
5
  "main": "index.js",
6
6
  "bin": {