Skip to content
Development
Skill

/mcpc

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

From plugin
mcpc
1.1k2 skills

Claude Code

$ npx -y skills add apify/mcpc --skill mcpc --agent claude-code

SKILL.md

mcpc.SKILL.md
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: MCP command-line client

`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 ...`).

Mental model

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

First steps

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

Connecting

Server formats accepted by `connect`:

  • `mcp.example.com` — remote HTTP server (`https://` is added automatically)
  • `localhost:8080` or `127.0.0.1:8080` — local HTTP server (`http://` is the default for `localhost` and `127.0.0.1`)
  • `~/.vscode/mcp.json:filesystem` — a single entry from a config file (`file:entry`)
  • `~/.vscode/mcp.json` — connect **every** entry in a config file
  • _(no server)_ — auto-discover standard configs and connect all of them
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
  • `@session` is optional — omit it to auto-generate a name from the server

(`mcp.apify.com` → `@apify`). A matching session (same server + auth) is reused.

  • **Stdio (command-based) entries launch a local process on connect** — only connect

to configs you trust. Bulk connects skip stdio entries unless you pass `--stdio`.

  • **A bare `mcpc connect` treats config files in the current directory as untrusted** — a

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}`.

  • The MCP protocol version is negotiated automatically. Pass

`--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.

  • `login` / `logout` only accept an MCP server URL (a bare host or full

`http(s)://` URL) — not config files or auto-discovery.

Sessions

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:**

  • 🟢 **live** — ready to use
  • 🟡 **connecting** / **reconnecting** — transient; retry in a moment
  • 🟡 **disconnected** — bridge alive but the server has gone quiet; retry to reconnect
  • 🟡 **crashed** — bridge process died; auto-restarts on next use
  • 🔴 **unauthorized** — auth failed; run `mcpc login <server>` then `mcpc restart @session`
  • 🔴 **expired** — server dropped the session; run `mcpc restart @session`

Discovering and inspecting tools

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
Read more
@apify
Ships withmcpc

mcpc is a command-line client for the Model Context Protocol (MCP) that maps every MCP operation to an intuitive shell command.

Stars on GitHub

Momentum

stars in total
1.1k
Star history of apify/mcpc on GitHub, a chart by star-history.com

Other skills on mcpc.

record-demo

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.…

@apify@apifyInstall Skill

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about mcpc.

Which coding agents can use mcpc?
mcpc installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.