
Mcp2cli
Call MCP servers, OpenAPI REST APIs, or GraphQL endpoints from the shell without codegen or one-off scripts.
Install
npx skills add https://github.com/knowsuchagency/mcp2cli --skill mcp2cliWhat is this skill?
- 4-step workflow: connect, discover with --list/--search, inspect with --help, execute with flags
- Supports MCP over HTTP/SSE, MCP stdio, remote/local OpenAPI (JSON/YAML), and GraphQL endpoints
- No codegen—turns APIs into CLIs at runtime via uvx or pip install mcp2cli
- Discover tools and operations before calling them, matching agent exploration patterns
- Trigger phrases include mcp2cli, call this MCP server, create a skill for this API
Adoption & trust: 997 installs on skills.sh; 2.2k GitHub stars; 0/3 security scanners passed (skills.sh audits); trending (+200% hot-view momentum).
Recommended Skills
Lark Drivelarksuite/cli
Lark Sharedlarksuite/cli
Lark Minuteslarksuite/cli
Tzstxixu-me/skills
Runcomfy Cliagentspace-so/runcomfy-agent-skills
Caveman Helpjuliusbrussee/caveman
Journey fit
Common Questions / FAQ
Is Mcp2cli safe to install?
skills.sh reports 0 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Mcp2cli
# mcp2cli Turn any MCP server, OpenAPI spec, or GraphQL endpoint into a CLI at runtime. No codegen. ## Install ```bash # Run directly (no install needed) uvx mcp2cli --help # Or install pip install mcp2cli ``` ## Core Workflow 1. **Connect** to a source (MCP server, OpenAPI spec, or GraphQL endpoint) 2. **Discover** available commands with `--list` (or filter with `--search`) 3. **Inspect** a specific command with `<command> --help` 4. **Execute** the command with flags ```bash # MCP over HTTP mcp2cli --mcp https://mcp.example.com/sse --list mcp2cli --mcp https://mcp.example.com/sse create-task --help mcp2cli --mcp https://mcp.example.com/sse create-task --title "Fix bug" # MCP over stdio mcp2cli --mcp-stdio "npx @modelcontextprotocol/server-filesystem /tmp" --list mcp2cli --mcp-stdio "npx @modelcontextprotocol/server-filesystem /tmp" read-file --path /tmp/hello.txt # OpenAPI spec (remote or local, JSON or YAML) mcp2cli --spec https://petstore3.swagger.io/api/v3/openapi.json --list mcp2cli --spec ./openapi.json --base-url https://api.example.com list-pets --status available # GraphQL endpoint mcp2cli --graphql https://api.example.com/graphql --list mcp2cli --graphql https://api.example.com/graphql users --limit 10 mcp2cli --graphql https://api.example.com/graphql create-user --name "Alice" ``` ## CLI Reference ``` mcp2cli [global options] <subcommand> [command options] Source (mutually exclusive, one required): --spec URL|FILE OpenAPI spec (JSON or YAML, local or remote) --mcp URL MCP server URL (HTTP/SSE) --mcp-stdio CMD MCP server command (stdio transport) --graphql URL GraphQL endpoint URL Options: --auth-header K:V HTTP header (repeatable, value supports env:/file: prefixes) --base-url URL Override base URL from spec --transport TYPE MCP HTTP transport: auto|sse|streamable (default: auto) --env KEY=VALUE Env var for stdio server process (repeatable) --oauth Enable OAuth (authorization code + PKCE flow) --oauth-client-id ID OAuth client ID (supports env:/file: prefixes) --oauth-client-secret S OAuth client secret (supports env:/file: prefixes) --oauth-scope SCOPE OAuth scope(s) to request --cache-key KEY Custom cache key --cache-ttl SECONDS Cache TTL (default: 3600) --refresh Bypass cache --list List available subcommands --search PATTERN Search tools by name or description (implies --list) --fields FIELDS Override GraphQL selection set (e.g. "id name email") --pretty Pretty-print JSON output --raw Print raw response body --json Force valid JSON for every command. --list emits a JSON array; MCP calls emit the full envelope (structuredContent, isError). --toon Encode output as TOON (token-efficient for LLMs) --head N Limit output to first N records (arrays) --version Show version Bake mode: bake create NAME [opts] Save connection settings as a named tool bake list List all baked tools bake show NAME Show config (secrets masked) bake update NAME [opts] Update a baked tool bake remove NAME Delete a baked tool bake install NAME Create ~/.local/bin wrapper script @NAME [args] Run a baked tool