mcp2cli-api-to-cli — Claude Code skill: what it does, how to install
mcp2cli-api-to-cli converts MCP servers, OpenAPI specs, and GraphQL endpoints into CLI commands on the fly without codegen. It cuts context token usage by replacing heavy tool schemas with CLI calls.
no license 225 installs ★ 9 updated 2026-10-09
npx skills add reason-machines/mcp-skills --skill mcp2cli-api-to-cli -a claude-codeWhat mcp2cli-api-to-cli does
The skill routes agent interactions with MCP servers, OpenAPI 3.x specs, and GraphQL endpoints through the mcp2cli terminal utility. Instead of stuffing full JSON schemas of every tool into the model's context window on every turn, the agent triggers standard terminal commands. This drastically limits token consumption on repetitive tool schemas.
Under the hood, four runtime modes are available: MCP over HTTP or SSE, local MCP processes via stdio, OpenAPI document parsing, and GraphQL introspection. The bake feature allows saving complex connection flags into reusable aliases prefixed with @, or exporting them into standalone executable scripts inside ~/.local/bin/.
Passing secrets as bare CLI arguments exposes them in process trees, so the tool resolves credentials via env: or file: references instead. OAuth tokens persist in ~/.cache/mcp2cli/oauth/ with automatic refresh. Running the CLI directly expects uvx or a global installation via uv tool.
What it helps with
- connect to remote MCP servers over HTTP or SSE
- execute endpoints from an OpenAPI 3.x document without generating code
- query or mutate GraphQL schemas directly from the command line
- save recurring connection flags as named presets with
bake - pass sensitive API tokens through environment variables or file paths
Example prompts for the agent
- Connect to the MCP server at
https://mcp.example.com/sseusingmcp2cliand list all available tools. - Call the
list-petsendpoint with--limit 10using our local./openapi.yamlspec. - Save the connection configuration for
https://api.example.com/graphqlinto a baked preset calledbackend.
How to install mcp2cli-api-to-cli
1Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill mcp2cli-api-to-cli -a claude-code2Manually: put the files in place
~/.claude/skills/mcp2cli-api-to-cli/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/mcp2cli-api-to-cli/
1Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill mcp2cli-api-to-cli -a codex2Manually: put the files in place
.agents/skills/mcp2cli-api-to-cli/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill mcp2cli-api-to-cli -a cursor2Manually: put the files in place
.cursor/skills/mcp2cli-api-to-cli/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/mcp-skills skills/mcp2cli-api-to-cli2Manually: put the files in place
.github/skills/mcp2cli-api-to-cli/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill mcp2cli-api-to-cli -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/mcp-skills --path skills/mcp2cli-api-to-cliManually: put the files in place
.devin/skills/mcp2cli-api-to-cli/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill mcp2cli-api-to-cli -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about mcp2cli-api-to-cli
How do I install mcp2cli-api-to-cli in Claude Code?
Run npx skills add reason-machines/mcp-skills --skill mcp2cli-api-to-cli -a claude-code. This installs the definition file to ~/.claude/skills/mcp2cli-api-to-cli/SKILL.md.
Why use mcp2cli instead of native MCP server integration?
Standard tool registrations transmit entire parameter schemas on every assistant turn, taking up significant context. The mcp2cli tool converts calls into terminal commands, saving between 96% and 99% of schema tokens.
How does mcp2cli handle authentication credentials safely?
Avoid passing plain secrets directly in command arguments. Point to environment variables with env:VAR_NAME or specify file paths using file:/path/to/secret.