run-mcp 1.5.1 → 1.6.0

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.
Files changed (3) hide show
  1. package/README.md +23 -0
  2. package/dist/index.js +1215 -631
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -77,8 +77,31 @@ Examples:
77
77
  $ run-mcp --out-dir ./test-output # Agent mode with options
78
78
  $ run-mcp --out-dir ./screenshots node srv.js # REPL mode with options
79
79
 
80
+ ## Headless Mode (Single-Shot CI/CD)
80
81
 
82
+ For CI/CD pipelines, shell scripts, or parsing via `jq`, `run-mcp` exposes a suite of headless subcommands that pipe clean JSON to stdout and isolate standard errors and progress updates to stderr. You must use `--` to separate the command from the target server options.
81
83
 
84
+ ```bash
85
+ # Get tool names as a flat list
86
+ run-mcp list-tools -- node my-server.js | jq -r '.[].name'
87
+
88
+ # Call a tool and extract a field
89
+ run-mcp call generate '{"prompt":"test"}' -- node my-server.js | jq '.content[0].text'
90
+
91
+ # Read a resource and pipe to file
92
+ run-mcp read docs://config -- node my-server.js > config.json
93
+ ```
94
+
95
+ Available subcommands:
96
+ - `call <tool> [json_args]`
97
+ - `list-tools`
98
+ - `list-resources`
99
+ - `list-prompts`
100
+ - `read <uri>`
101
+ - `describe <tool>`
102
+ - `get-prompt <name> [json_args]`
103
+
104
+ Use `run-mcp <subcommand> --help` for specific command options (like `--timeout` and `--raw`).
82
105
  ## Agent Use Cases
83
106
 
84
107
  ### Dynamic Testing