mcp2cli 3.7.0__tar.gz → 3.8.1__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.
- {mcp2cli-3.7.0 → mcp2cli-3.8.1}/PKG-INFO +12 -10
- {mcp2cli-3.7.0 → mcp2cli-3.8.1}/README.md +11 -9
- {mcp2cli-3.7.0 → mcp2cli-3.8.1}/pyproject.toml +1 -1
- {mcp2cli-3.7.0 → mcp2cli-3.8.1}/pyproject.toml.orig +1 -1
- {mcp2cli-3.7.0 → mcp2cli-3.8.1}/src/mcp2cli/__init__.py +746 -136
- {mcp2cli-3.7.0 → mcp2cli-3.8.1}/src/mcp2cli/__main__.py +0 -0
- {mcp2cli-3.7.0 → mcp2cli-3.8.1}/src/mcp2cli/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mcp2cli
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.8.1
|
|
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>
|
|
@@ -197,6 +197,9 @@ mcp2cli --spec ./spec.json --auth-header "Authorization:Bearer tok_..." create-i
|
|
|
197
197
|
# POST with JSON body from stdin
|
|
198
198
|
echo '{"name": "Fido", "tag": "dog"}' | mcp2cli --spec ./spec.json create-pet --stdin
|
|
199
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
|
+
|
|
200
203
|
# Local YAML spec
|
|
201
204
|
mcp2cli --spec ./api.yaml --base-url http://localhost:8000 --list
|
|
202
205
|
```
|
|
@@ -214,7 +217,7 @@ mcp2cli --graphql https://api.example.com/graphql users --limit 10
|
|
|
214
217
|
mcp2cli --graphql https://api.example.com/graphql create-user --name "Alice" --email "alice@example.com"
|
|
215
218
|
|
|
216
219
|
# Override auto-generated selection set fields
|
|
217
|
-
mcp2cli --graphql https://api.example.com/graphql
|
|
220
|
+
mcp2cli --graphql https://api.example.com/graphql --fields "id name email" users
|
|
218
221
|
|
|
219
222
|
# With auth
|
|
220
223
|
mcp2cli --graphql https://api.example.com/graphql --auth-header "Authorization:Bearer tok_..." users
|
|
@@ -232,13 +235,14 @@ mcp2cli bake create petstore --spec https://api.example.com/spec.json \
|
|
|
232
235
|
--exclude "delete-*,update-*" --methods GET,POST --cache-ttl 7200
|
|
233
236
|
|
|
234
237
|
# Create a baked tool from an MCP stdio server
|
|
235
|
-
mcp2cli bake create
|
|
236
|
-
--include "search-*,list-*" --exclude "
|
|
238
|
+
mcp2cli bake create myfs --mcp-stdio "npx -y @modelcontextprotocol/server-filesystem /tmp" \
|
|
239
|
+
--include "search-*,list-*" --exclude "list-allowed-*"
|
|
237
240
|
|
|
238
241
|
# Use a baked tool with @ prefix — no connection flags needed
|
|
239
242
|
mcp2cli @petstore --list
|
|
240
243
|
mcp2cli @petstore list-pets --limit 10
|
|
241
|
-
mcp2cli @
|
|
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
|
|
242
246
|
|
|
243
247
|
# Manage baked tools
|
|
244
248
|
mcp2cli bake list # show all baked tools
|
|
@@ -256,6 +260,8 @@ Filtering options:
|
|
|
256
260
|
|
|
257
261
|
Configs are stored in `~/.config/mcp2cli/baked.json`. Override with `MCP2CLI_CONFIG_DIR`.
|
|
258
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
|
+
|
|
259
265
|
### Usage-aware tool ranking
|
|
260
266
|
|
|
261
267
|
mcp2cli tracks tool invocations locally and uses that data to rank `--list` output, reducing token costs for LLM agents working with large servers.
|
|
@@ -316,7 +322,7 @@ mcp2cli --spec ./spec.json --pretty list-pets
|
|
|
316
322
|
mcp2cli --spec ./spec.json --raw get-data
|
|
317
323
|
|
|
318
324
|
# Truncate large responses to first N records
|
|
319
|
-
mcp2cli --spec ./spec.json
|
|
325
|
+
mcp2cli --spec ./spec.json --head 5 list-records
|
|
320
326
|
|
|
321
327
|
# Pipe-friendly (compact JSON when not a TTY)
|
|
322
328
|
mcp2cli --spec ./spec.json list-pets | jq '.[] | .name'
|
|
@@ -435,7 +441,3 @@ protocol directly and import no SDK, so they hold across majors.
|
|
|
435
441
|
## License
|
|
436
442
|
|
|
437
443
|
[MIT](LICENSE)
|
|
438
|
-
|
|
439
|
-
---
|
|
440
|
-
|
|
441
|
-
<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>
|
|
@@ -178,6 +178,9 @@ mcp2cli --spec ./spec.json --auth-header "Authorization:Bearer tok_..." create-i
|
|
|
178
178
|
# POST with JSON body from stdin
|
|
179
179
|
echo '{"name": "Fido", "tag": "dog"}' | mcp2cli --spec ./spec.json create-pet --stdin
|
|
180
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
|
+
|
|
181
184
|
# Local YAML spec
|
|
182
185
|
mcp2cli --spec ./api.yaml --base-url http://localhost:8000 --list
|
|
183
186
|
```
|
|
@@ -195,7 +198,7 @@ mcp2cli --graphql https://api.example.com/graphql users --limit 10
|
|
|
195
198
|
mcp2cli --graphql https://api.example.com/graphql create-user --name "Alice" --email "alice@example.com"
|
|
196
199
|
|
|
197
200
|
# Override auto-generated selection set fields
|
|
198
|
-
mcp2cli --graphql https://api.example.com/graphql
|
|
201
|
+
mcp2cli --graphql https://api.example.com/graphql --fields "id name email" users
|
|
199
202
|
|
|
200
203
|
# With auth
|
|
201
204
|
mcp2cli --graphql https://api.example.com/graphql --auth-header "Authorization:Bearer tok_..." users
|
|
@@ -213,13 +216,14 @@ mcp2cli bake create petstore --spec https://api.example.com/spec.json \
|
|
|
213
216
|
--exclude "delete-*,update-*" --methods GET,POST --cache-ttl 7200
|
|
214
217
|
|
|
215
218
|
# Create a baked tool from an MCP stdio server
|
|
216
|
-
mcp2cli bake create
|
|
217
|
-
--include "search-*,list-*" --exclude "
|
|
219
|
+
mcp2cli bake create myfs --mcp-stdio "npx -y @modelcontextprotocol/server-filesystem /tmp" \
|
|
220
|
+
--include "search-*,list-*" --exclude "list-allowed-*"
|
|
218
221
|
|
|
219
222
|
# Use a baked tool with @ prefix — no connection flags needed
|
|
220
223
|
mcp2cli @petstore --list
|
|
221
224
|
mcp2cli @petstore list-pets --limit 10
|
|
222
|
-
mcp2cli @
|
|
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
|
|
223
227
|
|
|
224
228
|
# Manage baked tools
|
|
225
229
|
mcp2cli bake list # show all baked tools
|
|
@@ -237,6 +241,8 @@ Filtering options:
|
|
|
237
241
|
|
|
238
242
|
Configs are stored in `~/.config/mcp2cli/baked.json`. Override with `MCP2CLI_CONFIG_DIR`.
|
|
239
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
|
+
|
|
240
246
|
### Usage-aware tool ranking
|
|
241
247
|
|
|
242
248
|
mcp2cli tracks tool invocations locally and uses that data to rank `--list` output, reducing token costs for LLM agents working with large servers.
|
|
@@ -297,7 +303,7 @@ mcp2cli --spec ./spec.json --pretty list-pets
|
|
|
297
303
|
mcp2cli --spec ./spec.json --raw get-data
|
|
298
304
|
|
|
299
305
|
# Truncate large responses to first N records
|
|
300
|
-
mcp2cli --spec ./spec.json
|
|
306
|
+
mcp2cli --spec ./spec.json --head 5 list-records
|
|
301
307
|
|
|
302
308
|
# Pipe-friendly (compact JSON when not a TTY)
|
|
303
309
|
mcp2cli --spec ./spec.json list-pets | jq '.[] | .name'
|
|
@@ -416,7 +422,3 @@ protocol directly and import no SDK, so they hold across majors.
|
|
|
416
422
|
## License
|
|
417
423
|
|
|
418
424
|
[MIT](LICENSE)
|
|
419
|
-
|
|
420
|
-
---
|
|
421
|
-
|
|
422
|
-
<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>
|