by apify
The most compatible MCP CLI client. Supports: Tools, Resources, Prompts, Completions, Tasks, Skills, stdio and streamable HTTP, MCP versions 2024-10-07 through 2026-07-28, persistent sessions, OAuth 2.1 with DCR, CIMD, client credentials, and ID-JAG, OS keychain, --json for code mode, grep for tool discovery, proxy for AI sandboxes, x402, and more.
# Add to your Claude Code skills
git clone https://github.com/apify/mcpcmcpc is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by apify. The most compatible MCP CLI client. Supports: Tools, Resources, Prompts, Completions, Tasks, Skills, stdio and streamable HTTP, MCP versions 2024-10-07 through 2026-07-28, persistent sessions, OAuth 2.1 with DCR, CIMD, client credentials, and ID-JAG, OS keychain, --json for code mode, grep for tool discovery, proxy for AI sandboxes, x402, and more. It has 1,124 GitHub stars.
mcpc's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/apify/mcpc" and add it to your Claude Code skills directory (see the Installation section above).
mcpc is primarily written in TypeScript. It is open-source under apify on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh mcpc against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
mcpc is a command-line client for the Model Context Protocol (MCP)
that maps MCP operations to intuitive shell commands.
Use it to inspect and debug MCP servers and to script repeatable MCP workflows in plain shell.
mcpc gives AI agents access to most capabilities of the MCP protocol through a single Bash() tool call,
so they can interact with any MCP server and its latest capabilities using the most
universal programming interface there is: the UNIX shell.
Key features:
jq, xargs, and shell pipelines for MCP workflows as shell scripts.mcpc is the most MCP specification-compliant CLI client available.
Here's how it compares to other MCP CLI clients (see Related work for the full table, legend, and notes):
Demo:

Many AI agents misuse MCP. They treat tools as prompt-time function calls, repeatedly injecting tool definitions and results into the context. Tokens get wasted, context rots, the agent gets slower and less reliable, leading to the popular conclusion: "MCP sucks, CLIs are better".
mcpc challenges that narrative. It maps (almost) every MCP operation to an intuitive CLI command that
agents pick up from --help alone. Any agent with shell access gets full MCP support without
wiring up dozens of MCP functions. Just one Bash() tool, and mcpc handles the rest:
┌──────────┐ Bash() ┌────────┐ MCP ┌────────────┐
│ AI agent │ ─────────► │ mcpc │ ────────► │ MCP server │
└──────────┘ └────────┘ └────────────┘
Sessions, OAuth, Tools,
Resources, Prompts,
Tasks, Skills, x402, ...
CLI is the perfect local interface between agents and MCP, while MCP remains the standard remote interface for server discovery, authentication, and access control. The two aren't exclusive, they're complementary.
As a bonus, the same mcpc configuration, OAuth profiles, and live sessions can be shared across
many AI agents on the same machine. Authenticate once, reuse everywhere.
With Homebrew (macOS and Linux), which brings its own Node.js:
brew install mcpc
With Nix (from nixpkgs unstable):
nix profile install nixpkgs#mcpc
Otherwise install the latest Node.js or Bun first, then:
npm install -g @apify/mcpc
# Or with Bun
bun install -g @apify/mcpc
Linux: credentials use the OS keychain via the Secret Service API.
GNOME/KDE desktops work out of the box. On headless/CI systems, mcpc falls back to a
file-based store (~/.mcpc/credentials.json, mode 0600).
To force the keychain on headless systems, install gnome-keyring
(via apt-get, dnf, or pacman) and run:
dbus-run-session -- bash -c "echo -n 'password' | gnome-keyring-daemon --unlock && mcpc ..."
# List all active sessions and saved authentication profiles
mcpc
# Log in to a remote MCP server and save OAuth credentials for future use
mcpc login mcp.apify.com
# Create a persistent session and interact with it
mcpc connect mcp.apify.com @test
mcpc @test # show server info and capabilities
mcpc @test tools-list # list available tools
mcpc @test tools-call search-actors keywords:="website crawler"
# Use JSON mode for scripting
mcpc --json @test tools-list
# Use a local MCP server package (stdio) referenced from a config file
mcpc connect ./.vscode/mcp.json:filesystem @fs
mcpc @fs tools-list
Usage: mcpc [<@session>] [<command>] [options]
Universal command-line client for the Model Context Protocol (MCP).
Commands:
connect [<server>] [@session] Connect to an MCP server and start a new named @session
close <@session> Close a session
restart <@session> Restart a session (losing all state)
login <server> Log in to a server and save an OAuth profile
logout <server> Delete an OAuth profile for a server
clean [resources...] Clean up mcpc data (sessions, profiles, logs, all)
grep <pattern> Search tools and instructions across all active sessions
x402 [subcommand] [args...] Configure an x402 payment wallet (EXPERIMENTAL)
help [command] [subcommand] Show help for a command
Options:
--json Output in JSON format for scripting
--verbose Enable debug logging
--profile <name> OAuth profile for the server ("default" if not provided)
--timeout <seconds> Request timeout in seconds (default: 60)
--max-chars <n> Truncate output to n characters (ignored in --json mode)
--insecure Skip TLS certificate verification (for self-signed certs)
-v, --version Output the version number
-h, --help Display help
MCP session commands (after connecting):
<@session> Show MCP server info, capabilities, and tools overview
<@session> grep <pattern> Search tools and instructions
<@session> tools-list List all server tools
<@session> tools-get <name> Get tool details and schema
<@session> tools-call <name> [arg:=val ... | <json> | <stdin]
<@session> tasks-list
<@session> tasks-get <taskId>
<@session> tasks-result <taskId>
<@session> tasks-cancel <taskId>
<@session> prompts-list
<@session> prompts-get <name> [arg:=val ... | <json> | <stdin]
<@session> completion-complete prompt|resource <ref> <arg:=val ... | <json> | <stdin>
<@session> resources-list
<@session> resources-read <uri> [-o <file> | --raw]
<@session> resources-subscribe <uri> <file>
<@session> resources-unsubscribe <uri>
<@session> resources-templates-list
<@session> resources-directory-read <uri>
<@session> skills-list
<@session> skills-get <skill> [file] [--raw]
<@session> logging-set-level <level>
<@session> ping
<@session> server-discover
<@session> logs [-n N] [--follow] [--since 1h]
Run "mcpc" without arguments to show active sessions and OAuth profiles.
Run "mcpc --json" to get the same data as `{ sessions: [...], profiles: [...] }`.
Agent guide: mcpc help --skill
REFERENCE.md collects the full --help output of every command in one page.
In your terminal, run mcpc help <command> to see the same help for a single command.
With no arguments, mcpc lists all active sessions and saved OAuth profiles:
# List all sessions and OAuth profiles (also in JSON mode)
mcpc
mcpc --json
# Show command help or version
mcpc --help
mcpc --version
# Clean stale sessions and old log files
mcpc clean
The connect, login, and logout commands accept a <server> argument in these formats:
mcp.apify.com or https://mcp.apify.com) — scheme defaults to https://~/.vscode/mcp.json:filesystem) — file:entry-name syntaxconnect additionally supports two bulk forms that connect many servers at once:
~/.vscode/mcp.json) — connect every server in the file