mcp2cli

A command-line tool for connecting to MCP servers, which are services that provide tools and data to AI assistants. It supports discovering available functions, running them, reading resources, and managing server configurations.

In plain words
What is it for?
Use it for one-off MCP commands, shell scripts, continuous-integration jobs, named server configurations, authentication, and JSON processing.
Why use it?
It lets developers inspect and use MCP servers from scripts or the terminal instead of building a separate client for each server.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/mcp2cli/source-code/files
Any agent
npx skills add mcp2cli/source-code --skill files
Clone the repo
git clone --depth 1 https://github.com/mcp2cli/source-code

Made for: Claude Code, Codex.

Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,675 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00060 $0.01675
Opus 5 $0.00030 $0.00838
Sonnet 5 $0.00012 $0.00335
Haiku 4.5 $0.00006 $0.00168

Measured yesterday against content hash be80f9ebce9b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

mcp2cli scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/files/SKILL.md · 228 lines

How it starts

The opening of the file, as written. The whole thing — 228 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SKILL: mcp2cli

This skill enables AI agents and coding assistants to work effectively with the mcp2cli CLI tool — both as users invoking it from the terminal and as contributors editing its source code.


When to Activate This Skill

Use this skill when the user:

  • Asks how to run a command against an MCP server from the terminal
  • Wants to create a named config, symlink alias, or set an active config
  • Needs to parse or transform mcp2cli --json output with jq
  • Is writing a shell script or CI pipeline that calls MCP tools
  • Is implementing an AI agent loop that invokes MCP tools via mcp2cli
  • Is editing source files under src/
  • Asks about the MCP protocol, transports, or capability discovery
  • Wants to install or regenerate man pages for mcp2cli or an alias

Key Concepts

Two modes

Mode When to use How
Ad-hoc Exploration, one-off scripts, CI mcp2cli --url URL COMMAND or mcp2cli --stdio CMD COMMAND
Named config + alias Daily use, multiple servers mcp2cli config init, mcp2cli link create, then use the alias directly

Dispatch routing

  • argv[0] == "mcp2cli" → host mode (config/link/use/man/daemon commands)
  • argv[0] == "<alias>" → bridge mode (MCP runtime commands for that named config)
  • mcp2cli <config-name> <command> → bridge mode with explicit config name

JSON output

Every command supports --json. The response envelope is:

{
  "app_id": "<alias>",
  "command": "<command>",
  "summary": "<one-line>",
  "lines": ["..."],
  "data": { ... }
}

Pipe to jq for scripting: email --json ls | jq '.data.items[].id'


Common Tasks

Discover what a server offers

# Ad-hoc
mcp2cli --url http://localhost:3001/mcp ls
mcp2cli --url http://localhost:3001/mcp ls --tools
mcp2cli --url http://localhost:3001/mcp ls --resources

# Named alias
email ls
email ls --prompts
email ls --filter "draft"

Call a tool

# Ad-hoc
mcp2cli --url http://localhost:3001/mcp echo --message hello

# Named alias
email send --to [email protected] --subject "Hi" --body "Hello"
email search --query "from:boss"
email reply --thread-id 123 --body "Thanks"

Read the full file on GitHub · 228 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 228 lines · 60 tokens per session scan A be80f9ebce9b

Subscribe to this mod's changes

mcp2cli is a skill published in the GitHub repository mcp2cli/source-code (8 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 60 tokens to every session and 1,675 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

harness-design-fuzzing

Reference vocabulary for designing instrumented harnesses that drive vulnerability discovery — design classes (trigger-driven vs coverage-driven), tiered scope (T1 isolated function / T2 multi-component / T3 full build), systematic input exploration, the two-coverage distinction (fuzzer-feedback vs audit)…

provos/ironcurtain · 147 tokens

memory-safety-c-cpp

Reference vocabulary for memory-safety vulnerabilities in native C/C++ code — bug-class taxonomy, common arithmetic patterns that lead to corruption, dispatch-family discipline, type-confusion idioms, use-after-free patterns, and exploitability factors. Read when analyzing, hypothesizing, designing harnesses for, or…

provos/ironcurtain · 113 tokens

vulnerability-triage

Reference vocabulary for interpreting vulnerability findings — detector-vs-impact distinction, severity anchoring on demonstrated evidence, the eleven-item interpretation rubric, delegation transparency, primitive-extent scaling, the disqualifier taxonomy (D-0..D-4), CVSS Achievable / Environmental framing…

provos/ironcurtain · 121 tokens

gmail-query-syntax

Reference for Gmail's search query syntax — operators like is:sent, newerthan:, from:, has:attachment, label:, and how they compose. Read this when constructing a Gmail search query string for the googleworkspace.gmailsearchmessages Code Mode call, especially when filtering by sent vs received, recency, sender, or…

provos/ironcurtain · 71 tokens

email-formatting

Markdown formatting conventions for email summary documents — heading depth, list style, line length, emoji policy, and a mandatory provenance footer. Read this when producing a markdown report that summarizes one or more email messages so the output matches the project's house style.

provos/ironcurtain · 53 tokens

json-schema-emails

Canonical shape of the .workflow/emails/emails.json file passed between the fetch and summarize states — required fields (sender, recipient, subject, date, body), types, and field semantics. Read this whenever you write or read emails.json so producer and consumer agree on the shape.

provos/ironcurtain · 62 tokens