From mcp-cli
Discover and call MCP tools via the `mcp` CLI. Use when the needed tool is not exposed as a native `mcp__<server>__<tool>` in your tool list, when given an ad-hoc server URL, when you need to search across servers, or when context budget rules out loading a large catalogue natively.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mcp-cli:mcp-cliThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Use the `mcp` CLI to discover and call tools on external MCP servers.
Use the mcp CLI to discover and call tools on external MCP servers.
All commands run via bash. Output is JSON on stdout, logs on stderr.
Decision rule: if the tool you need is already loaded as
mcp__<server>__<tool> in your tool list, call it natively. Otherwise, use
this CLI.
Available servers:
!mcp servers
Use this skill when:
mcp tools <url> rather
than asking them to register it.mcp schema, not the entire catalogue's tax every turn.mcp tools --query).jq, capture it, or chain calls.mcp stats).Skip this skill when:
mcp__<server>__<tool> and you'll call it
more than once or twice this session — native is faster (no schema fetch,
no JSON-string escaping).If both paths are open, prefer native for repeat calls and prefer this CLI for one-shot, ad-hoc, or multi-server exploration.
Tool schemas are large — a single MCP server can produce tens of thousands of tokens of JSON Schema. To keep prompts cheap, this CLI uses a two-phase pattern:
mcp tools returns compact summaries (name + description only).mcp schema <server> <tool> returns the full schema for one tool, on demand.When deciding which tool to call, list with mcp tools (cheap), then fetch the
schema for the chosen tool with mcp schema before constructing the call.
mcp servers
# HTTP server
mcp add <name> <url>
# Stdio server (spawns a local process)
mcp add <name> --stdio <command> [args...]
# All tools across all servers — name + description only
mcp tools
# Filter by server
mcp tools <server>
# Search by keyword
mcp tools --query "search term"
# Force-refresh cached tool list
mcp tools --refresh
# Include full inputSchema for every tool (rarely needed; expensive)
mcp tools --full
# Returns name, description, and the full JSON Schema for one tool.
# Use this once you've decided which tool to call.
# Reads from the local cache; falls back to a live discover if no cache exists.
mcp schema <server> <tool>
# Estimate how many tokens each server's schemas would consume.
# Shows the savings of compact summaries vs full schemas.
# Cache-only — run `mcp tools <server> --refresh` first if a server is empty.
mcp stats
# Per-tool breakdown
mcp stats --full
# With inline params (waits for final result)
mcp call <server> <tool> --params '{"key": "value"}'
# With piped params
echo '{"key": "value"}' | mcp call <server> <tool>
# With individual flags (typed from the cached schema)
mcp call <server> <tool> --query "hello" --limit 10
# Stream progress for long-running tools (NDJSON to stdout)
mcp call <server> <tool> --stream --params '{"key": "value"}'
# Show parameters for a single tool (reads from cache; live-fetches if missing)
mcp call <server> <tool> --help
Some servers (e.g. Notion) expose data as resources — addressable by URI — rather than (or in addition to) tools. List them, then read one by URI.
# List readable resources and resource templates across servers
mcp resources
# Filter by server
mcp resources <server>
# Search by keyword (uri/name/description)
mcp resources <server> --query "search term"
# Read a resource's contents by URI (output: {"contents":[{"uri","mimeType","text"|"blob"}]})
mcp read <server> <uri>
# Truncate large resources (default 30000 chars; full output saved to a file)
mcp read <server> <uri> --max-output 5000
Resource listings are fetched live (not cached). Templates appear with a
uriTemplate (e.g. notion://page/{id}) — substitute the parameters to form a
concrete URI before reading.
# OAuth (outputs auth URL for user)
mcp auth <name> --callback-url <your-callback-url>
# Manual token
MCP_AUTH_TOKEN=<bearer-token> mcp auth <name>
mcp auth is idempotent: if the server is already connected it's a no-op that
returns {"status":"complete"} immediately, without starting a new OAuth flow
or handing back a fresh auth_url. So it's safe to run without checking first —
you'll only get back an auth_url (with "status":"pending") when the server
actually needs authenticating.
Use mcp ping to test whether a server is reachable — and, for servers that
require auth, whether your stored credentials are accepted. It opens a real
session with the saved token, so against an auth-requiring server a missing or
expired token makes it fail.
mcp ping <server>
{"status":"ok"} and exits 0.mcp auth <server> to authenticate.mcp remove <name>
If the tool you need is already exposed as mcp__<server>__<tool> in your
tool list, call it natively and skip the rest of this skill.
mcp serversmcp add <name> <url>mcp auth <name> --callback-url <your-callback-url> — it's
idempotent (no-op if already connected), so it's safe to run. Only present an
auth_url to the user when the output has "status":"pending"; a
"status":"complete" means you're already connected. To check connection
status without authenticating, use mcp ping <name>.mcp tools <server> — pick the tool you needmcp schema <server> <tool>mcp call <server> <tool> --params '{...}'Skip step 5 only when:
mcp call ... --help, which prints parameters from the cache.# Get tool names only
mcp tools <server> | jq '.[].name'
# Find tools matching a keyword and grab the first one's schema
TOOL=$(mcp tools <server> --query "search" | jq -r '.[0].name')
mcp schema <server> "$TOOL"
# Call with result from another command
echo '{"query": "..."}' | mcp call <server> search
# Chain tool results
mcp call <server> list --params '{}' | jq '.content' | ...
MCP_CALLBACK_URL is pre-configured in ~/.bashrc — no need to pass --callback-url manually.mcp tools JSON output omits inputSchema by default. Use mcp schema to fetch one, or mcp tools --full for everything (expensive).{"content": "...", "isError": false}{"contents": [{"uri": "...", "mimeType": "...", "text": "..."}]} (binary resources use blob with base64 instead of text)"truncated": true, an [output truncated at N chars] marker, and an [full output saved to <path>] line so you can read the rest. Tune with --max-output N (0 disables). For mcp call, keep the end instead of the start with --truncate tail (default is head).--stream for long-running tools — streams NDJSON progress events to stdout{"type":"progress","data":"..."} or {"type":"result","content":"...","isError":false}Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub paulbellamy/mcp --plugin mcp-cli