record-demo
Record or regenerate the mcpc demo GIFs (the README hero docs/images/mcpc-demo.gif and the focused tapes in docs/vhs/) with VHS. Use whenever asked to create,…
Use the mcpc CLI to work with MCP (Model Context Protocol) servers from the shell - connect to a server as a persistent session, then list and call tools, read resources, get prompts, and run async tasks. Use --json for scripting and code mode. Reach for this whenever
$ npx -y skills add apify/mcpc --skill mcpc --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/mcpcContext preview
The summary Claude sees to decide when to auto-load this skill.
Use the mcpc CLI to work with MCP (Model Context Protocol) servers from the shell - connect to a server as a persistent session, then list and call tools, read resources, get prompts, and run async tasks. Use --json for scripting and code mode. Reach for this whenever
name: mcpc description: Use the mcpc CLI to work with MCP (Model Context Protocol) servers from the shell - connect to a server as a persistent session, then list and call tools, read resources, get prompts, and run async tasks. Use --json for scripting and code mode. Reach for this whenever interacting with MCP servers, calling MCP tools, or accessing MCP resources programmatically. allowed-tools: Bash(mcpc:*), Bash(npx @apify/mcpc:*), Read, Grep
`mcpc` maps every MCP operation to a shell command. For agents this is often more efficient than function calling: discover the right tool on demand, then generate shell commands (ideally with `--json`) instead of carrying tool definitions in context.
The examples below use `mcpc` as a command on `PATH`. If it is not installed globally or otherwise available, use the published package through `npx` instead:
npx -y @apify/mcpc@latest --help
After checking the help, prefix the commands below with `npx @apify/mcpc` (for example, `npx @apify/mcpc connect ...`).
1. **Connect once** to a server — this creates a persistent, named `@session`. A background bridge process keeps the connection (and its state) alive. 2. **Run commands against the `@session`**: list/call tools, read resources, get prompts, run async tasks. There is no one-shot `mcpc <url> tools-list` — connect first. 3. **Default output is human-readable**; add `--json` for machine-readable, MCP-spec shaped output that composes with `jq` and shell pipelines (code mode).
Everything is self-documenting — when unsure, ask the CLI:
mcpc --help # all commands + global options mcpc help connect # help for one command mcpc @apify tools-call foo --help # that tool's details + schema
mcpc # list sessions + auth profiles (start here) mcpc connect mcp.apify.com @apify # connect, create the @apify session mcpc @apify # server info, capabilities, tools overview mcpc @apify tools-list # list tools mcpc @apify tools-call <tool> q:="hi" # call a tool
Server formats accepted by `connect`:
mcpc connect mcp.apify.com @apify # remote server, explicit session name mcpc connect mcp.apify.com # auto-name the session → @apify mcpc connect ./.vscode/mcp.json:fs @fs # one config entry (stdio or http) mcpc connect # discover standard configs + connect everything
(`mcp.apify.com` → `@apify`). A matching session (same server + auth) is reused.
to configs you trust. Bulk connects skip stdio entries unless you pass `--stdio`.
checked-in `.mcp.json` could point `${GITHUB_TOKEN}` at an attacker's server. Entries that reference `${VAR}` are skipped (the output names the variables), and `-H` is refused. Review the file before connecting it by name (`mcpc connect ./.mcp.json`), which expands `${VAR}`.
`--protocol-version <version>` (e.g. `--protocol-version 2025-11-25`) to pin one exact version — the connection fails if the server does not support it.
`http(s)://` URL) — not config files or auto-discovery.
mcpc # list all sessions and their state
mcpc @apify # session details, capabilities, tools (also reports the
# negotiated MCP version and the transport carrying it)
mcpc restart @apify # restart (after server updates, or to recover an 'expired' session)
mcpc close @apify # tear the session down**Session states:**
mcpc @apify tools-list # compact list with inline param signatures mcpc @apify tools-list --full # full JSON schemas mcpc @apify tools-get <tool> # one tool's details + schema mcpc @apify tools-call <tool> --help # shortcut for tools-get: that tool's details + schema mcpc grep "search" # search tools + instructions across ALL sessions mcpc @apify grep "actor" --resources # search one session # grep filters: --tools/--resources/--prompts/--instructions, -E regex, -s case-sensitive, -m <n> max # grep exits 0 on match, 1 on no matches (grep convention)
Prefer progressive discovery: `grep` to find the right tool, then `tools-get` for its schema. This keeps token use low instead of dumping every tool definition.
For scripts and CI, pin a tool's schema to catch breaking changes early:
mcpc --json @apify tools-get <tool> > expected.json # snapshot the schema mcpc @apify tools-call <tool> --schema expected.json <args> # fail fast if it drifted # also on
mcpc is a command-line client for the Model Context Protocol (MCP) that maps every MCP operation to an intuitive shell command.
Repo: apify/mcpc
Record or regenerate the mcpc demo GIFs (the README hero docs/images/mcpc-demo.gif and the focused tapes in docs/vhs/) with VHS. Use whenever asked to create,…