Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add reason-machines/mcp-skills --skill mcp2cli-api-to-cli -a claude-code
Open on GitHub

What 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/sse using mcp2cli and list all available tools.
  • Call the list-pets endpoint with --limit 10 using our local ./openapi.yaml spec.
  • Save the connection configuration for https://api.example.com/graphql into a baked preset called backend.

How to install mcp2cli-api-to-cli

1Skills CLI (Vercel)

npx skills add reason-machines/mcp-skills --skill mcp2cli-api-to-cli -a claude-code

2Manually: put the files in place

~/.claude/skills/mcp2cli-api-to-cli/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/mcp2cli-api-to-cli/

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.

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set98

The whole set →
claude-peers-mcp-inter-instance-messaging claude-peers-mcp-inter-instance-messaging — a skill that sets up the claude-peers MCP server so Claude sessions on one machine discover each other and exchange messages through a local broker. CX Codex +1 228installs pal-mcp-server-multi-model-orchestration The pal-mcp-server-multi-model-orchestration skill uses PAL MCP to bring multiple AI models into code reviews, debugging, and planning. Use it when you want another model to inspect a change. CX Codex +1 227installs anysearch-mcp-server anysearch-mcp-server connects your coding agent to live web search, 23 specialized data categories, and parallel batch queries. Useful when your workflow needs fresh market data, research papers, or web pages. CX Codex +1 226installs mcp-brasil-server mcp-brasil-server is a Claude Code skill that connects an agent to 70+ Brazilian public APIs through 533 tools for querying economic, legal, transparency, court, and election data. CX Codex +1 225installs figma-mcp-go figma-mcp-go wires up an MCP server that reads and changes Figma documents through a plugin, so no API token or REST quota is involved. CX Codex +1 223installs jsreverser-mcp-javascript-reverse-engineering jsreverser-mcp-javascript-reverse-engineering guides agents through JavaScript reverse engineering in live browsers: runtime function hooking, network call tracing, deobfuscation, and crypto logic extraction. CX Codex +1 223installs cocos-creator-mcp-server Wires an AI assistant to the Cocos Creator 3.8.6+ editor over MCP: scenes, nodes, components, prefabs and assets through 50 tools. CX Codex +1 221installs opennews-mcp-news-aggregation opennews-mcp-news-aggregation is a Claude Code skill that aggregates crypto news from 84+ sources with impact ratings and trading signals for market monitoring. CX Codex +1 221installs

Project sponsors

Companies that keep this analytics open