What problem does it solve?
It solves the high token cost and friction of repeatedly exposing large tool schemas by turning MCP servers, OpenAPI specs, or GraphQL endpoints into a compact CLI interface.
Core Features & Use Cases
- Dynamic CLI generation (no codegen): Create commands at runtime from MCP HTTP/SSE, MCP stdio, OpenAPI 3.x, or GraphQL introspection.
- Token-efficient tool calls: Replace repetitive tool-schema transmissions with reusable CLI-style invocations to save 96-99% of tokens per LLM turn.
- Auth, caching, and reusable connections: Support OAuth flows, secret management, spec/tool caching with TTL, and “baked” named configs for repeatable workflows.
- Use case: Turn a third-party OpenAPI service into a ready-to-run command set so an agent can list and query endpoints (with auth) without embedding massive schema text in every conversation.
Quick Start
Ask mcp2cli to list available tools from an OpenAPI spec you provide by running the command: mcp2cli --spec ./openapi.json --list.