mcp2cli CLI

A CLI that turns any MCP server, OpenAPI spec or GraphQL endpoint into commands at runtime, with no codegen

  • 2,440 ★ on the repository
  • Last commit
  • MIT
CLI

Broad access

Why this level

  • Can call write operations on external APIs, including POST requests and GraphQL mutations
  • Via --mcp-stdio it spawns arbitrary server commands and stores OAuth tokens and secrets in a cache
All reasons and checks

knowsuchagency/mcp2cli

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/mcp2cli

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • Can call write operations on external APIs, including POST requests and GraphQL mutations
  • Via --mcp-stdio it spawns arbitrary server commands and stores OAuth tokens and secrets in a cache

This is third-party code. Review the repository files before installing.

What it does

mcp2cli connects to a source, whether an MCP server over HTTP, SSE or stdio, an OpenAPI spec or a GraphQL endpoint, and builds commands from it at runtime. The --list flag shows available operations, --search finds them by name and description, and calling a command with flags runs the operation. It supports OAuth with authorization-code and client-credentials flows, passing secrets via env and file prefixes, caching, saving ready connections with bake, and output as JSON or the compact TOON format. Context saving matters for agents: the tool ranks the list by call frequency and can return command names only, which cuts token spend on schemas. It ships a skill that teaches Claude Code, Cursor and Codex to use mcp2cli and even to build new skills from APIs.

Who it is for. For developers and engineers who want to call MCP servers and APIs from the terminal and hand those commands to an agent without wasting context.

Good fit when

  • You need to quickly call an MCP tool or an API endpoint from the command line
  • You need to cut the agent's token spend on tool schemas
  • You need to build a skill or wrapper around a third-party API without writing code

Not a fit when

  • You need a long-running service with its own logic rather than one-off calls
  • The target API has no OpenAPI spec, GraphQL introspection or MCP interface

Example request

List this MCP server's tools with mcp2cli and call search for the word task

Limitations

It needs Python 3.10 or newer and installs via uv or pip. Its capabilities depend on the server or API you connect to: mcp2cli hosts nothing itself. Whether a given remote API is reachable from Russia depends on that service. OAuth tokens and cache live in ~/.cache/mcp2cli, so treat that folder as sensitive.

How to disable. Remove the tool: uv tool uninstall mcp2cli or pip uninstall mcp2cli. The skill is removed from your agent's skills directory.

FAQ

Do I need to generate code for each API?

No. mcp2cli reads the spec or introspects the endpoint at runtime and builds commands on the fly, with no codegen.

How does it save the agent tokens?

It ranks the command list by call frequency and can return names only or the compact TOON format, so the agent does not pull full schemas of every tool into context on each step.

Discussion

No questions or reviews yet.

CLI tools

A universal MCP CLI client from Apify: persistent sessions, OAuth, JSON output for scripts and shell access to any MCP server for agents

CLIBroad access1.1KRepository stars

A zero-dependency Python CLI: one catalog of MCP servers and skills for every agent, with only a compact index in context

CLIBroad access429Repository stars

The mcpl CLI searches tools across several MCP servers and calls them from the terminal, with OAuth sign-in done by a human

CLIExtended access206Repository stars

A CLI for any MCP server: list and call tools, resources and prompts, run mock and proxy modes, guard access and manage agent configs

CLIExtended access1.6KRepository stars

An Open WebUI proxy that exposes any MCP server as an HTTP API with an OpenAPI schema

CLIBroad access4.4KRepository stars
Editors’ pick

A Python framework and CLI for MCP: write servers as plain functions, test tools and install servers into Claude Code, Cursor and other clients

CLIExtended access28.4KRepository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialRepository starsMain difference
mcp2cli (this card)no2,440
clihubno668clihub turns any MCP server into a ready CLI
skill-creator: skills from OpenAPI, GraphQL and MCPno611the /skill-creator command turns a link to an OpenAPI spec

README in short

The README presents mcp2cli as one CLI for MCP servers, OpenAPI specs and GraphQL endpoints that works at runtime with no codegen. It shows install via uvx and uv tool install, HTTP, SSE and stdio modes for MCP, OpenAPI and GraphQL usage, OAuth flows, passing secrets via env and file, caching and saving connections with bake. It covers token saving through ranking and compact output, JSON and TOON modes, and compatibility with both major MCP SDK versions at once. A skill for Claude Code, Cursor and Codex is included. MIT licensed.

README badge

Report a problem