/ Directory / Playground / mcp2cli
● Community knowsuchagency ⚡ Instant

mcp2cli

by knowsuchagency · knowsuchagency/mcp2cli

Point mcp2cli at an MCP server (or any OpenAPI/GraphQL endpoint) and get a typed CLI you can use from shells, scripts, or other agents — no code generation.

mcp2cli inspects the target server's schema and dispatches calls at runtime. Useful for sanity-checking an MCP server, scripting against it, or letting non-agent tooling reuse the same backend.

Why use it

Key features

Live Demo

What it looks like in practice

ready

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "mcp2cli": {
      "command": "uvx",
      "args": [
        "mcp2cli"
      ]
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "mcp2cli": {
      "command": "uvx",
      "args": [
        "mcp2cli"
      ]
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "mcp2cli": {
      "command": "uvx",
      "args": [
        "mcp2cli"
      ]
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "mcp2cli": {
      "command": "uvx",
      "args": [
        "mcp2cli"
      ]
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "mcp2cli",
      "command": "uvx",
      "args": [
        "mcp2cli"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "mcp2cli": {
      "command": {
        "path": "uvx",
        "args": [
          "mcp2cli"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add mcp2cli -- uvx mcp2cli

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use mcp2cli

Sanity-check an MCP server without an LLM

👤 Developers ⏱ ~15 min intermediate

When to use: You're building/debugging an MCP and want to call tools directly.

Flow
  1. Point
    mcp2cli --target stdio:./your-mcp; list✓ Copied
    → Tools listed
  2. Call
    mcp2cli call your_tool --arg foo=bar✓ Copied
    → Result printed

Outcome: Tight dev loop without booting a chat client.

Combinations

Pair with other MCPs for X10 leverage

mcp2cli + fastmcp

Build with fastmcp; debug with mcp2cli

Combine mcp2cli with fastmcp: Build with fastmcp; debug with mcp2cli✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
list / call / describe (see docs) CLI subcommands; no MCP tools surfaced 1 call

Cost & Limits

What this costs to run

API quota
N/A
Tokens per call
N/A
Monetary
Free OSS
Tip
Pipe call JSON into jq for downstream scripting

Security

Permissions, secrets, blast radius

Credential storage: Whatever the target needs
Data egress: Wherever the target egresses

Troubleshooting

Common errors and fixes

Schema not found

Ensure the target speaks one of MCP / OpenAPI / GraphQL

Alternatives

mcp2cli vs others

AlternativeWhen to use it insteadTradeoff
MCP InspectorYou want a UINot pipeable

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills