Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

mcp2cli

$ mcp2cli Community Med Risk
knowsuchagency · Agent Bridges & Meta · MIT · macos / linux / windows

mcp2cli (knowsuchagency/mcp2cli) turns any MCP server (--mcp / --mcp-stdio), OpenAPI spec (--spec), or GraphQL endpoint into an on-demand CLI at runtime without generating code. Designed to cut LLM tool-schema token overhead by ~96% via --list, --search, --jq, and --auth-header env references.

FCRS-1.0 Score
87 /100
Good
Medium Confidence
Zero-Friction Install
pip install mcp2cli
CLI vs MCP Decision CLI Preferred vs MCP

mcp2cli provides progressive disclosure (--list, --search, <tool> --help) across MCP, OpenAPI, and GraphQL while preserving --jq output filtering.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Built explicitly for progressive agent tool discovery with --list, --search, --help, --req-json, --stdin, and --jq.

  • Supports --list, --search, --jq, --req-json, and --stdin
Trust & Safety 21 / 25

--auth-header "...:env:VAR" avoids secret exposure in process args; execution side effects mirror the underlying MCP/OpenAPI endpoint.

  • Env/file indirection in --auth-header protects API tokens
Setup & Portability 14 / 15

Pure Python CLI installable via uvx mcp2cli or pip install mcp2cli across macOS, Linux, and Windows.

  • Instant execution via uvx mcp2cli and PyPI
Utility & Efficiency 14 / 15

Bridges MCP, OpenAPI, and GraphQL dynamically with zero codegen and massive token savings.

  • Dynamic runtime adapter for MCP, OpenAPI, and GraphQL
Maintenance & Lineage 8 / 10

Active knowsuchagency/mcp2cli project under MIT license.

  • knowsuchagency/mcp2cli repository
Docs & Verifiability 7 / 10

Clear README covering MCP, OpenAPI, GraphQL, auth indirection, and --jq.

  • README at github.com/knowsuchagency/mcp2cli

Security, Auth & Guardrails

Auth Modes
No Auth Env API Key Config File
Credential Storage

Stateless runtime references via --auth-header "Authorization:env:API_TOKEN" or file references so secrets stay out of process args.

Side Effects
Read-Only Remote Write
Cost & Quotas

100% free and MIT open-source.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# mcp2cli Agent Rules
- Always start with `--list` or `--search <query>`, then `<command> --help` before executing.
- Pass secrets with `env:VAR_NAME` syntax in `--auth-header` so raw tokens never enter shell history.
- Use `--jq <filter>` to keep large API responses compact.

Agent-Ready Command Recipes

Safe Read-Only Queries

List tools from an OpenAPI spec in compact format
mcp2cli --spec https://petstore3.swagger.io/api/v3/openapi.json --list

Summarizes all API endpoints at ~16 tokens per tool without bloating context.

Inspect parameters of one MCP tool before calling
mcp2cli --mcp-stdio "npx -y @modelcontextprotocol/server-filesystem ." read_file --help

Lazy-loads schema help for a single tool on demand.

Controlled Writes & Previews

Invoke an OpenAPI endpoint with env-referenced auth and --jq
mcp2cli --spec ./openapi.yaml --base-url https://api.example.com --auth-header "Authorization:env:API_TOKEN" get-users --jq '.items[:5]'

Executes an API operation while resolving credentials from env and filtering JSON output.

Strengths for Agents

  • + Unifies MCP, OpenAPI, and GraphQL specs into one progressive-disclosure CLI.
  • + Built-in --jq filtering and --auth-header ...:env:VAR secret indirection.
  • + Zero codegen needed; runs immediately via uvx mcp2cli.

Caveats & Pitfalls

  • ! Every invocation re-parses or caches specs locally, which can add slight latency on huge OpenAPI files.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI