Agent skill

MCP-CLI

by philschmid in philschmid/mcp-cli

Interacts with MCP servers from the command line: lists servers and tools, inspects a tool's JSON schema, and calls a tool with JSON arguments from stdin or an argument.

MITAuto-check passedAgent Workflows

Install MCP-CLI

skills CLI
$ npx skills add philschmid/mcp-cli --skill mcp-cli -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install philschmid/mcp-cli mcp-cli --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mcp-cli
GitHub stars
1.3k
Token cost
~832 tokens
SKILL.md length
217 words
Files
39 (incl. scripts)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

Interacts with MCP servers from the command line: lists servers and tools, inspects a tool's JSON schema, and calls a tool with JSON arguments from stdin or an argument.

  • Works in 4 steps: Discover: mcp-cli → see available servers → Explore: mcp-cli info → see tools with… → Inspect: mcp-cli info → get full JSON… → …
  • Listing the MCP servers and tools available in the current environment
  • SKILL.md covers Commands, Workflow, Examples and Advanced Chaining, plus 3 more sections
  • Runs Shell and TypeScript scripts from its folder

What it does

The CLI exposes five core commands: running mcp-cli alone lists every configured server and its tools, info <server> shows a server's tools with parameters, info <server> <tool> returns the full JSON schema for one tool, grep searches tool names by pattern, and call <server> <tool> runs a tool, reading JSON arguments from stdin when none are given inline. Both a server/tool and a server tool argument order work, and call prints raw text content directly rather than JSON, so no separate parsing step is needed for plain text results.

A short workflow moves from discovering servers, to exploring a server's tools with parameters, to inspecting one tool's full schema, to executing it with arguments, and results can be chained into further shell commands, such as piping a filesystem search result into a read call. Two flags are listed, -d to include descriptions and -c to point at a specific config file, and a table of common mistakes maps wrong subcommands like run or list to their correct equivalents, call and info, along with the exit codes for client, server and network errors.

When your agent uses it

  • Listing the MCP servers and tools available in the current environment
  • Inspecting a specific MCP tool's input schema before calling it
  • Calling an MCP tool with JSON arguments from the command line
  • Chaining one MCP tool's output into another command

Example prompts

  • “List all available MCP servers and their tools.”
  • “Show me the JSON schema for the filesystem server's search_files tool.”
  • “Call the github server's create_issue tool with this JSON payload.”

Requirements

  • The mcp-cli binary
  • A configured MCP servers file

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Discover: mcp-cli → see available servers
  2. Explore: mcp-cli info → see tools with parameters
  3. Inspect: mcp-cli info → get full JSON schema
  4. Execute: mcp-cli call '' → run with arguments

What it can do on your machine

Read from SKILL.md and the folder at commit d77672a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Shell and TypeScript, from the files we listed), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

MCP-CLI loads about 832 tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 217 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~40
When it runs · the whole SKILL.md, loaded when a task matches
~832

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from philschmid/mcp-cli at commit d77672a, republished under its MIT licence (© philschmid). 217 words, ~832 tokens.

Download SKILL.mdSave it as .claude/skills/mcp-cli/SKILL.md (or your agent's skills folder). This skill also uses 38 other files; get the full folder from GitHub.
name
mcp-cli
description
Interface for MCP (Model Context Protocol) servers via CLI. Use when you need to interact with external tools, APIs, or data sources through MCP servers.

MCP-CLI

Access MCP servers through the command line. MCP enables interaction with external systems like GitHub, filesystems, databases, and APIs.

Commands

CommandOutput
mcp-cliList all servers and tools
mcp-cli info <server>Show server tools and parameters
mcp-cli info <server> <tool>Get tool JSON schema
mcp-cli grep "<pattern>"Search tools by name
mcp-cli call <server> <tool>Call tool (reads JSON from stdin if no args)
mcp-cli call <server> <tool> '<json>'Call tool with arguments

Both formats work: <server> <tool> or <server>/<tool>

Workflow

  1. Discover: mcp-cli → see available servers
  2. Explore: mcp-cli info <server> → see tools with parameters
  3. Inspect: mcp-cli info <server> <tool> → get full JSON schema
  4. Execute: mcp-cli call <server> <tool> '<json>' → run with arguments

Examples

bash
# List all servers
mcp-cli

# With descriptions  
mcp-cli -d

# See server tools
mcp-cli info filesystem

# Get tool schema (both formats work)
mcp-cli info filesystem read_file
mcp-cli info filesystem/read_file

# Call tool
mcp-cli call filesystem read_file '{"path": "./README.md"}'

# Pipe from stdin (no '-' needed!)
cat args.json | mcp-cli call filesystem read_file

# Search for tools
mcp-cli grep "*file*"

# Output is raw text (pipe-friendly)
mcp-cli call filesystem read_file '{"path": "./file"}' | head -10

Advanced Chaining

bash
# Chain: search files → read first match
mcp-cli call filesystem search_files '{"path": ".", "pattern": "*.md"}' \
  | head -1 \
  | xargs -I {} mcp-cli call filesystem read_file '{"path": "{}"}'

# Loop: process multiple files
mcp-cli call filesystem list_directory '{"path": "./src"}' \
  | while read f; do mcp-cli call filesystem read_file "{\"path\": \"$f\"}"; done

# Conditional: check before reading
mcp-cli call filesystem list_directory '{"path": "."}' \
  | grep -q "README" \
  && mcp-cli call filesystem read_file '{"path": "./README.md"}'

# Multi-server aggregation
{
  mcp-cli call github search_repositories '{"query": "mcp", "per_page": 3}'
  mcp-cli call filesystem list_directory '{"path": "."}'
}

# Save to file
mcp-cli call github get_file_contents '{"owner": "x", "repo": "y", "path": "z"}' > output.txt

Note: call outputs raw text content directly (no jq needed for text extraction)

Options

FlagPurpose
-dInclude descriptions
-c <path>Specify config file

Common Errors

Wrong CommandErrorFix
mcp-cli server toolAMBIGUOUS_COMMANDUse call server tool or info server tool
mcp-cli run server toolUNKNOWN_SUBCOMMANDUse call instead of run
mcp-cli listUNKNOWN_SUBCOMMANDUse info instead of list
mcp-cli call serverMISSING_ARGUMENTAdd tool name
mcp-cli call server tool {bad}INVALID_JSONUse valid JSON with quotes

Exit Codes

  • 0: Success
  • 1: Client error (bad args, missing config)
  • 2: Server error (tool failed)
  • 3: Network error

© philschmid, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 38 other files (scripts) in the repository root of philschmid/mcp-cli.

  • SKILL.md
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • .gitignore
  • CHANGELOG.md
  • LICENSE
  • README.md
  • biome.json
  • bun.lock
  • comparison.jpeg
  • install.sh
  • mcp_servers.json
  • package.json
  • scripts/generate-system-instructions.ts
  • scripts/release.sh
  • src/client.ts
  • src/commands
  • … and 22 more

Open the folder on GitHubat commit d77672a

Compare with similar skills

MCP-CLI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

MCP-CLI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
MCP-CLI this skillphilschmid/mcp-cli1.3k—~832Automated safety check: PassMIT
MCP Server Builderanthropics/skills180k62 repos~2.3kAutomated safety check: PassApache-2.0
MCP Server BuildershareAI-lab/learn-claude-code78k5 repos~1.2kAutomated safety check: PassMIT
MCP Integration for Pluginsanthropics/claude-plugins-official37k11 repos~3.1kAutomated safety check: PassApache-2.0
Fastmcp Client CLIPrefectHQ/fastmcp28k1 repos~823Automated safety check: PassApache-2.0
Crush Configurationcharmbracelet/crush29k—~3.7kAutomated safety check: PassCustom licence

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 62 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • MCP Server Builder

    shareAI-lab/learn-claude-code

    Walks through building MCP servers in Python or TypeScript that expose tools, resources and prompts to Claude, with templates, registration and testing.

    78k GitHub starsUsed in 5 repos~1.2k tokens
    Agent WorkflowsAuto-check passed
  • MCP Integration for Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.

    37k GitHub starsUsed in 11 repos~3.1k tokens
    Agent WorkflowsAuto-check passed
  • Fastmcp Client CLI

    PrefectHQ/fastmcp

    Query and invoke tools on MCP servers using fastmcp list and fastmcp call.

    28k GitHub starsUsed in 1 repo~823 tokens
    Agent WorkflowsAuto-check passed
  • Crush Configuration

    charmbracelet/crush

    Explains how to configure the Crush coding agent with crushrc or crush.json, covering providers, models, LSPs, MCP servers, hooks, permissions and config precedence.

    29k GitHub stars~3.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Context Mode Output Sandbox

    mksglu/context-mode

    Routes large command, file, API and browser output through context-mode tools so only the needed result enters the agent's context, instead of dumping it via Bash.

    26k GitHub stars~4.1k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

Categories

Questions about MCP-CLI

What does MCP-CLI do?

Interacts with MCP servers from the command line: lists servers and tools, inspects a tool's JSON schema, and calls a tool with JSON arguments from stdin or an argument. The CLI exposes five core commands: running mcp-cli alone lists every configured server and its tools, info <server> shows a server's tools with parameters, info <server> <tool> returns the full JSON schema for one tool, grep searches tool names by pattern, and call <server> <tool> runs a tool, reading JSON arguments from stdin when none are given inline. Both a server/tool and a server tool argument order work, and call prints raw text content directly rather than JSON, so no separate parsing step is needed for plain text results.

When should I use MCP-CLI?

MCP-CLI fits situations like: listing the MCP servers and tools available in the current environment; inspecting a specific MCP tool's input schema before calling it; calling an MCP tool with JSON arguments from the command line; chaining one MCP tool's output into another command.

How do I install MCP-CLI in Claude Code?

Run `npx skills add philschmid/mcp-cli --skill mcp-cli -a claude-code`. Or copy the skill folder (the philschmid/mcp-cli repository) into .claude/skills/mcp-cli in your project. Claude Code loads it when a task matches its description.

How do I install MCP-CLI in Codex?

Run `npx skills add philschmid/mcp-cli --skill mcp-cli -a codex`. Or copy the skill folder (the philschmid/mcp-cli repository) into .agents/skills/mcp-cli in your project. Codex loads it when a task matches its description.

Can I use MCP-CLI in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add philschmid/mcp-cli --skill mcp-cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mcp-cli, .gemini/skills/mcp-cli, .github/skills/mcp-cli and .opencode/skills/mcp-cli in your project.

What does MCP-CLI need to run?

Going by SKILL.md and its folder, MCP-CLI needs a shell and TypeScript for the scripts in its folder. Our summary lists: The mcp-cli binary; A configured MCP servers file.

Does MCP-CLI access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is MCP-CLI safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does MCP-CLI use?

MCP-CLI is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does MCP-CLI use?

About 832 tokens (SKILL.md is roughly 3.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to MCP-CLI?

Skills that share tags, products or a category with MCP-CLI: MCP Server Builder (anthropics/skills, 180k stars), MCP Server Builder (shareAI-lab/learn-claude-code, 78k stars), MCP Integration for Plugins (anthropics/claude-plugins-official, 37k stars) and Fastmcp Client CLI (PrefectHQ/fastmcp, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains MCP-CLI?

philschmid (a GitHub user) maintains it in philschmid/mcp-cli, which has 1,278 GitHub stars. The repository was last updated on February 5, 2026.

Source: philschmid/mcp-cli on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.