mcp2cli

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

CLI

High risk

We rate an entry high when the tool writes to external systems, handles money, production databases or secrets, or runs arbitrary commands. The CLI installs it only with your consent.

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, checks the risk and pins the version.

Other ways to install

Install the tool

pipx install mcp2cli

Without pipx, pip install mcp2cli works too.

You will need: pipx

Checked against the repository on Sep 25, 2026, commit 052390a.

Text for your agent

Install the CLI: uv tool install mcp2cli, or run it without installing via uvx mcp2cli --help. Agent skill: npx skills add knowsuchagency/mcp2cli --skill mcp2cli. Then connect to a source with --mcp, --spec or --graphql and inspect commands with --list.

Other ways from the author
uv tool install mcp2cli

Global install via uv. To run once without installing: uvx mcp2cli --help. Also available as pip install mcp2cli.

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.

Security check

  • 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

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.

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.

Editors’ pick

Open-source personal AI assistant on your own machine: answers in Telegram, Slack, Discord and WhatsApp, extended with skills and plugins

CLIHigh risk390.7KRepository stars
Editors’ pick

A self-improving agent from Nous Research with a TUI, messaging gateway, cron jobs and skills it writes itself

CLIHigh risk249.8KRepository stars
Editors’ pick

An open source coding agent for the terminal and desktop with build and plan modes

CLIHigh risk210.6KRepository stars
Editors’ pick

Open prompt library with a Claude Code plugin, MCP server and CLI: search, fetch and improve prompts and skills from an agent

PluginMedium risk171.5KRepository stars
Foxx AImcp2cli

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.