mcp2cli-runtime-api-tooling

Converts MCP servers, OpenAPI specs, and GraphQL endpoints into runtime CLIs without code generation.

4|Updated May 16, 2026
One-click install
npx skills add https://github.com/reason-machines/devtools-skills --skill mcp2cli-runtime-api-tooling-reason-machines
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mcp2cli-runtime-api-tooling
Source: https://github.com/reason-machines/devtools-skills/tree/main/skills/mcp2cli-runtime-api-tooling
Command: npx skills add https://github.com/reason-machines/devtools-skills --skill mcp2cli-runtime-api-tooling-reason-machines

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI agents waste thousands of tokens loading full tool schemas for MCP servers and APIs, and integrating each new API normally requires writing custom client code. This Skill turns any MCP server, OpenAPI spec, or GraphQL endpoint into a CLI at runtime, cutting tool schema token costs by 96-99%. ## Core Features & Use Cases - Runtime API-to-CLI Conversion: Introspect MCP (HTTP/SSE and stdio), OpenAPI, and GraphQL sources and expose their operations as subcommands with no codegen step. - Baked Named Configurations: Save connection settings, auth, and tool filters once, then invoke them with a short @name prefix or install them as standalone commands. - Token-Efficient Output: Use compact listings, usage-based tool ranking, and TOON encoding to minimize tokens sent to AI agents. - Use Case: Connect an AI agent to a GitHub MCP server by baking the configuration once, then run commands like mcp2cli @github search-repositories --query "rust" while only spending ~20 tokens on tool discovery instead of ~1,400. ## Quick Start Ask the agent to list the available tools from an MCP server or OpenAPI spec by running mcp2cli with the server URL or spec path and the --list flag.

Frequently Asked Questions about mcp2cli-runtime-api-tooling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert an OpenAPI spec into a CLI?▼

Run mcp2cli with the --spec flag pointing to a local or remote OpenAPI file, plus --base-url for the API endpoint. Use --list to see generated subcommands, then call endpoints directly, for example mcp2cli --spec ./openapi.yaml --base-url http://localhost:8000 list-pets --limit 20.

How to call MCP server tools from the command line?▼

Use mcp2cli with --mcp for HTTP/SSE servers or --mcp-stdio for local servers launched via stdin/stdout. List tools with --list, then invoke a tool as a subcommand with its arguments, such as mcp2cli --mcp-stdio "npx @modelcontextprotocol/server-filesystem /tmp" read-file --path /tmp/data.json.

Does mcp2cli support OAuth authentication?▼

Yes, mcp2cli supports OAuth across all modes, including authorization code with PKCE and client credentials flows. Tokens are cached in ~/.cache/mcp2cli/oauth/ and refreshed automatically when expired.

How do I avoid passing secrets in CLI arguments?▼

Use the env: or file: prefixes so secrets are read from environment variables or files instead of appearing in process lists. For example, pass --auth-header "Authorization:Bearer env:API_TOKEN" to load the token from the API_TOKEN environment variable.

Why is my OpenAPI spec not working with mcp2cli?▼

Specs with relative server definitions need an explicit --base-url flag so requests resolve correctly. Also note that local file specs are never cached, while remote specs cache for one hour by default and can be refreshed with --refresh.

How does mcp2cli reduce token costs for AI agents?▼

Instead of sending full tool schemas (~1,400 tokens for 96 tools), agents use --list --compact for ~20 tokens of tool names. Usage-aware ranking with --top N and TOON output format further reduce tokens by 40-60% on large responses.