mcp2cli 3.6.0__tar.gz → 3.8.0__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mcp2cli
3
- Version: 3.6.0
3
+ Version: 3.8.0
4
4
  Summary: Turn any MCP server or OpenAPI spec into a CLI
5
5
  Author: Stephan Fitzpatrick
6
6
  Author-email: Stephan Fitzpatrick <stephan@knowsuchagency.com>
@@ -158,6 +158,30 @@ mcp2cli --mcp-stdio "node server.js" --env API_KEY=sk-... --env DEBUG=1 \
158
158
  search --query "test"
159
159
  ```
160
160
 
161
+ ### MCP roots and completion
162
+
163
+ Expose one or more filesystem roots when a server scopes operations to a
164
+ workspace. Paths are converted to `file://` URIs; explicit roots must also use
165
+ the `file://` scheme.
166
+
167
+ ```bash
168
+ mcp2cli --mcp-stdio "npx @modelcontextprotocol/server-filesystem /tmp" \
169
+ --root "$PWD" --root file:///var/shared --list
170
+ ```
171
+
172
+ Request prompt-argument or resource-template completions with
173
+ `REF:ARG=PREFIX`:
174
+
175
+ ```bash
176
+ mcp2cli --mcp https://example.com/mcp \
177
+ --complete "greeting:name=San"
178
+ mcp2cli --mcp https://example.com/mcp \
179
+ --complete "file:///docs/{topic}:topic=api"
180
+ ```
181
+
182
+ Both options work when starting a persistent session; roots are retained by
183
+ the session daemon and completion requests can be sent through `--session`.
184
+
161
185
  ### OpenAPI mode
162
186
 
163
187
  ```bash
@@ -173,6 +197,9 @@ mcp2cli --spec ./spec.json --auth-header "Authorization:Bearer tok_..." create-i
173
197
  # POST with JSON body from stdin
174
198
  echo '{"name": "Fido", "tag": "dog"}' | mcp2cli --spec ./spec.json create-pet --stdin
175
199
 
200
+ # Flags given with --stdin are merged into the JSON (a conflicting value is an error)
201
+ echo '{"name": "Fido"}' | mcp2cli --spec ./spec.json create-pet --tag dog --stdin
202
+
176
203
  # Local YAML spec
177
204
  mcp2cli --spec ./api.yaml --base-url http://localhost:8000 --list
178
205
  ```
@@ -208,13 +235,14 @@ mcp2cli bake create petstore --spec https://api.example.com/spec.json \
208
235
  --exclude "delete-*,update-*" --methods GET,POST --cache-ttl 7200
209
236
 
210
237
  # Create a baked tool from an MCP stdio server
211
- mcp2cli bake create mygit --mcp-stdio "npx @mcp/github" \
212
- --include "search-*,list-*" --exclude "delete-*"
238
+ mcp2cli bake create myfs --mcp-stdio "npx -y @modelcontextprotocol/server-filesystem /tmp" \
239
+ --include "search-*,list-*" --exclude "list-allowed-*"
213
240
 
214
241
  # Use a baked tool with @ prefix — no connection flags needed
215
242
  mcp2cli @petstore --list
216
243
  mcp2cli @petstore list-pets --limit 10
217
- mcp2cli @mygit search-repos --query "rust"
244
+ mcp2cli @myfs --list # search-files, list-directory, list-directory-with-sizes
245
+ mcp2cli @myfs search-files --path /tmp --pattern "**/*.md" # pattern is a glob, relative to --path
218
246
 
219
247
  # Manage baked tools
220
248
  mcp2cli bake list # show all baked tools
@@ -232,6 +260,8 @@ Filtering options:
232
260
 
233
261
  Configs are stored in `~/.config/mcp2cli/baked.json`. Override with `MCP2CLI_CONFIG_DIR`.
234
262
 
263
+ `bake show` masks the credential values it knows about — the OAuth client secret and every `--auth-header` value — while leaving `env:`/`file:` references readable so the config stays diagnosable. Values baked in with `--env` are printed as stored, so scrub those before pasting the output if an env var carries a token.
264
+
235
265
  ### Usage-aware tool ranking
236
266
 
237
267
  mcp2cli tracks tool invocations locally and uses that data to rank `--list` output, reducing token costs for LLM agents working with large servers.
@@ -338,6 +368,8 @@ Options:
338
368
  --base-url URL Override base URL from spec
339
369
  --transport TYPE MCP HTTP transport: auto|sse|streamable (default: auto)
340
370
  --env KEY=VALUE Env var for MCP stdio server (repeatable)
371
+ --root PATH|FILE_URI Expose a filesystem root to an MCP server (repeatable)
372
+ --complete SPEC Complete an MCP prompt or resource-template argument
341
373
  --oauth Enable OAuth (authorization code + PKCE flow)
342
374
  --oauth-client-id ID OAuth client ID (supports env:/file: prefixes)
343
375
  --oauth-client-secret S OAuth client secret (supports env:/file: prefixes)
@@ -409,7 +441,3 @@ protocol directly and import no SDK, so they hold across majors.
409
441
  ## License
410
442
 
411
443
  [MIT](LICENSE)
412
-
413
- ---
414
-
415
- <sub>mcp2cli builds on ideas from [CLIHub](https://kanyilmaz.me/2026/02/23/cli-vs-mcp.html) by Kagan Yilmaz (CLI-based tool access for token efficiency)</sub>
@@ -139,6 +139,30 @@ mcp2cli --mcp-stdio "node server.js" --env API_KEY=sk-... --env DEBUG=1 \
139
139
  search --query "test"
140
140
  ```
141
141
 
142
+ ### MCP roots and completion
143
+
144
+ Expose one or more filesystem roots when a server scopes operations to a
145
+ workspace. Paths are converted to `file://` URIs; explicit roots must also use
146
+ the `file://` scheme.
147
+
148
+ ```bash
149
+ mcp2cli --mcp-stdio "npx @modelcontextprotocol/server-filesystem /tmp" \
150
+ --root "$PWD" --root file:///var/shared --list
151
+ ```
152
+
153
+ Request prompt-argument or resource-template completions with
154
+ `REF:ARG=PREFIX`:
155
+
156
+ ```bash
157
+ mcp2cli --mcp https://example.com/mcp \
158
+ --complete "greeting:name=San"
159
+ mcp2cli --mcp https://example.com/mcp \
160
+ --complete "file:///docs/{topic}:topic=api"
161
+ ```
162
+
163
+ Both options work when starting a persistent session; roots are retained by
164
+ the session daemon and completion requests can be sent through `--session`.
165
+
142
166
  ### OpenAPI mode
143
167
 
144
168
  ```bash
@@ -154,6 +178,9 @@ mcp2cli --spec ./spec.json --auth-header "Authorization:Bearer tok_..." create-i
154
178
  # POST with JSON body from stdin
155
179
  echo '{"name": "Fido", "tag": "dog"}' | mcp2cli --spec ./spec.json create-pet --stdin
156
180
 
181
+ # Flags given with --stdin are merged into the JSON (a conflicting value is an error)
182
+ echo '{"name": "Fido"}' | mcp2cli --spec ./spec.json create-pet --tag dog --stdin
183
+
157
184
  # Local YAML spec
158
185
  mcp2cli --spec ./api.yaml --base-url http://localhost:8000 --list
159
186
  ```
@@ -189,13 +216,14 @@ mcp2cli bake create petstore --spec https://api.example.com/spec.json \
189
216
  --exclude "delete-*,update-*" --methods GET,POST --cache-ttl 7200
190
217
 
191
218
  # Create a baked tool from an MCP stdio server
192
- mcp2cli bake create mygit --mcp-stdio "npx @mcp/github" \
193
- --include "search-*,list-*" --exclude "delete-*"
219
+ mcp2cli bake create myfs --mcp-stdio "npx -y @modelcontextprotocol/server-filesystem /tmp" \
220
+ --include "search-*,list-*" --exclude "list-allowed-*"
194
221
 
195
222
  # Use a baked tool with @ prefix — no connection flags needed
196
223
  mcp2cli @petstore --list
197
224
  mcp2cli @petstore list-pets --limit 10
198
- mcp2cli @mygit search-repos --query "rust"
225
+ mcp2cli @myfs --list # search-files, list-directory, list-directory-with-sizes
226
+ mcp2cli @myfs search-files --path /tmp --pattern "**/*.md" # pattern is a glob, relative to --path
199
227
 
200
228
  # Manage baked tools
201
229
  mcp2cli bake list # show all baked tools
@@ -213,6 +241,8 @@ Filtering options:
213
241
 
214
242
  Configs are stored in `~/.config/mcp2cli/baked.json`. Override with `MCP2CLI_CONFIG_DIR`.
215
243
 
244
+ `bake show` masks the credential values it knows about — the OAuth client secret and every `--auth-header` value — while leaving `env:`/`file:` references readable so the config stays diagnosable. Values baked in with `--env` are printed as stored, so scrub those before pasting the output if an env var carries a token.
245
+
216
246
  ### Usage-aware tool ranking
217
247
 
218
248
  mcp2cli tracks tool invocations locally and uses that data to rank `--list` output, reducing token costs for LLM agents working with large servers.
@@ -319,6 +349,8 @@ Options:
319
349
  --base-url URL Override base URL from spec
320
350
  --transport TYPE MCP HTTP transport: auto|sse|streamable (default: auto)
321
351
  --env KEY=VALUE Env var for MCP stdio server (repeatable)
352
+ --root PATH|FILE_URI Expose a filesystem root to an MCP server (repeatable)
353
+ --complete SPEC Complete an MCP prompt or resource-template argument
322
354
  --oauth Enable OAuth (authorization code + PKCE flow)
323
355
  --oauth-client-id ID OAuth client ID (supports env:/file: prefixes)
324
356
  --oauth-client-secret S OAuth client secret (supports env:/file: prefixes)
@@ -390,7 +422,3 @@ protocol directly and import no SDK, so they hold across majors.
390
422
  ## License
391
423
 
392
424
  [MIT](LICENSE)
393
-
394
- ---
395
-
396
- <sub>mcp2cli builds on ideas from [CLIHub](https://kanyilmaz.me/2026/02/23/cli-vs-mcp.html) by Kagan Yilmaz (CLI-based tool access for token efficiency)</sub>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mcp2cli"
3
- version = "3.6.0"
3
+ version = "3.8.0"
4
4
  description = "Turn any MCP server or OpenAPI spec into a CLI"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mcp2cli"
3
- version = "3.6.0"
3
+ version = "3.8.0"
4
4
  description = "Turn any MCP server or OpenAPI spec into a CLI"
5
5
  readme = "README.md"
6
6
  license = "MIT"