mcp2cli

Convert MCP endpoints, OpenAPI specs, and GraphQL schemas into executable command-line interfaces.

1|Updated Jul 12, 2023
One-click install
npx skills add https://github.com/LumenYoung/dotfiles --skill mcp2cli-lumenyoung
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp2cli
Source: https://github.com/LumenYoung/dotfiles/tree/main/codex/skills/mcp2cli
Command: npx skills add https://github.com/LumenYoung/dotfiles --skill mcp2cli-lumenyoung

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

You want to interact with an MCP server, OpenAPI/REST API, or GraphQL endpoint from the command line without writing client code or hand-maintaining wrappers.

Core Features & Use Cases

  • On-demand discovery: Lists available tools/endpoints directly from the target source, and supports searching to quickly find what you need.
  • Direct command execution: Calls specific operations/queries with flags, including argument passing and help-driven exploration.
  • Convenient config reuse (bake mode): Saves connection settings as named tools and can install lightweight local wrappers so you don’t repeat auth and connection flags.
  • Use Case: You need to query a GraphQL service to fetch a filtered set of users for debugging. Use mcp2cli to discover available operations, run the right query with parameters, and iterate quickly without building a dedicated client.

Quick Start

Run mcp2cli with your GraphQL endpoint, list available operations, and then call the one you care about with parameters to get live results immediately.

Frequently Asked Questions about mcp2cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I call an OpenAPI or GraphQL endpoint from the command line without writing client code?

You can call OpenAPI or GraphQL endpoints directly from the command line without writing client code by converting the schema into an executable CLI. This dynamically generates subcommands and typed flags from the target schema for immediate invocation.

Can I discover and list available tools on an MCP server via CLI?

Yes, you can discover and list available tools on an MCP server via CLI. The tool inspects the target source over HTTP/SSE or stdio to list operations, supports searching by capability, and provides command help for exploration.

How do I pass authentication headers or OAuth tokens when executing a REST API operation from a terminal?

To pass authentication headers or OAuth tokens when executing REST API operations from a terminal, you specify the source and use the supported auth, header, and OAuth options during execution to authenticate the dynamically generated commands.

Is there a way to save CLI connection settings for a GraphQL service to avoid repeating flags?

Yes, you can save connection settings for a GraphQL service to avoid repeating flags using the bake mode. This saves settings as named tools and installs lightweight local wrappers so you don't repeat auth and connection flags.

What is the best way to debug a filtered GraphQL query without building a dedicated client?

The best way to debug a filtered GraphQL query without building a dedicated client is to use a dynamic CLI generator. It discovers available operations, runs the specific query with parameters, and returns live results immediately for fast iteration.

Does converting an OpenAPI spec to a CLI support caching and output shaping for API responses?

Yes, converting an OpenAPI spec to a CLI supports caching and optional output shaping for API responses. The tool dynamically generates parameters from the target schema and applies caching alongside optional output shaping during execution.