aicoolies logo
mcp2cli logo
mcp2cli logo

mcp2cli

Turn any MCP server, OpenAPI spec, or GraphQL endpoint into a CLI — at runtime, with zero codegen.

freeupdated Jul 28, 2026

mcp2cli turns MCP servers, OpenAPI specs, and GraphQL endpoints into standard CLIs at runtime — no codegen, no schema bloat. Tools and arguments load only when requested via --list and --help flags, cutting up to 96–99% of the tokens that native MCP integrations waste on schema preloading. Works with Claude Code, Cursor, Codex, and any agent that can call shell commands, and ships with OAuth, stdio/HTTP/SSE transports, and a bake mode for reusable connections.

MCP servers, OpenAPI specs, and GraphQL endpoints all share the same problem when wired into agentic workflows: every session loads full schemas upfront, and those schemas can consume thousands of tokens before any real work begins. In long Claude Code, Cursor, or Codex sessions with multiple servers configured, that overhead compounds across every turn — even when the agent only ever calls one or two tools. mcp2cli turns any of these surfaces into a standard command-line interface at runtime, with no code generation and no persistent server. Tools and arguments load on demand through `--list` and `--help` flags, so the agent fetches only the schema fragments it actually uses, only when it needs them.

The savings claim is concrete: 96 to 99 percent fewer tokens compared to native MCP tool calls in typical workloads. mcp2cli supports MCP over HTTP, SSE, and stdio transports, OpenAPI specs as local files or remote URLs, and GraphQL endpoints with introspection-driven query generation. OAuth is built in across all three modes — authorization code with PKCE for browser logins, client credentials for machine-to-machine flows, and automatic token refresh persisted under `~/.cache/mcp2cli/oauth/`. A `bake` subcommand lets developers freeze a configured connection into a named alias (`mcp2cli @petstore list-pets`), and `bake install` writes a standalone wrapper into `~/.local/bin` so an agent can call the baked tool as if it were a native binary.

mcp2cli surfaced on Hacker News in May 2026 with 144 points and over a hundred comments, driven largely by the "MCP tax" framing that landed with teams already tracking per-session token costs. The project is MIT licensed, written in Python, distributed via PyPI (`uvx mcp2cli` or `uv tool install mcp2cli`), and ships an installable AI agent skill that teaches Claude Code, Cursor, and Codex how to invoke it. With more than 2,100 GitHub stars and active commits in the past week, it represents one of the first production-ready answers to a problem that grows worse as MCP adoption deepens — and as agent sessions get longer, token-efficient tool invocation is likely to become a default expectation rather than an optimization.

Pricing

Free and open source (MIT). No hosted service; runs locally as a CLI wrapper.

Platforms

CLI distributed via PyPI (uvx / uv tool install). Works on macOS, Linux, and Windows. Integrates with Claude Code, Cursor, Codex, and any agent that can invoke shell commands.

Categories

Tags

Use Cases

Alternatives

Related Tools

MCPJam Inspector

Test and debug MCP servers before they ship

Open-source platform for inspecting, debugging and regression-testing MCP servers, MCP Apps and ChatGPT apps, with OAuth and protocol conformance for local and CI workflows.

freemiumOpen SourceTelemetry

ToolHive

Run and govern MCP servers across desktop, CLI and Kubernetes

Open-source MCP runtime and governance platform that runs servers in isolated containers, curates registries, enforces access policies, and operates gateways across desktop, CLI, and Kubernetes.

Open Source
grafana mcp

Grafana MCP Server

First-party MCP server for querying and managing Grafana

Grafana's official Model Context Protocol server, letting AI assistants search dashboards, query datasources, and manage alerts/incidents on your Grafana instance through a standard MCP interface.

Open Source
MCP Registry parent MCP protocol mark

MCP Registry

Official open catalog of Model Context Protocol servers

The official, community-run registry for discovering and publishing Model Context Protocol (MCP) servers — an open index that MCP clients read to find available servers.

Open Source
Figma Console MCP logo

Figma Console MCP

Turn a Figma design system into a programmable API for AI assistants

Figma Console MCP is open-source design-system infrastructure that exposes Figma to AI assistants through MCP. It supports structured extraction, design creation and editing, debugging, accessibility audits, and bidirectional design-token workflows across local, remote read-only, and paired cloud modes; it is not a generic one-click Figma-to-code exporter.

Open SourceTelemetry
MCP Context Forge logo

MCP Context Forge

IBM-backed ContextForge gateway for federating MCP, A2A, REST, and gRPC APIs

MCP Context Forge is IBM’s Apache-2.0 ContextForge project for operating a gateway, registry, and proxy across MCP servers, A2A agents, REST APIs, and gRPC services. It centralizes discovery, authentication, policy controls, federation, and observability, with deployment paths through PyPI, Docker, and Kubernetes.

Open Source

Comparisons

WOZCODE vs mcp2cli — Token Optimization at Different Layers of the Claude Code Stack

WOZCODE and mcp2cli both promise to cut Claude Code costs dramatically, but they attack the problem from opposite ends. WOZCODE intercepts tool execution to compress the dynamic loop while you are coding; mcp2cli converts verbose MCP, OpenAPI, and GraphQL schemas into compact CLI tools so Claude reads less before every turn. Picking the right one — or running both — depends on where your token budget is actually bleeding.

WOZCODEmcp2cli