← Back to archive

Repo of the Day

apify/mcpc

Published: Sep 26, 2026

Open repository ↗

A universal CLI client for MCP. mcpc supports persistent sessions, stdio/HTTP, OAuth 2.1, tasks, JSON output for code mode, proxy for AI sandboxes, x402, and more

Summary

mcpc is a TypeScript command-line client for the Model Context Protocol that maps every MCP operation to a shell command. It maintains persistent sessions over both stdio and Streamable HTTP, supports OAuth 2.1 with profile-based credentials stored in the OS keychain, and emits JSON output that conforms to the MCP specification, so any agent with a single Bash() tool can drive any MCP server.

What it is useful for

mcpc is useful for three distinct workflows documented in the README. First, it lets engineers manually inspect and debug MCP servers, since every server capability (tools, prompts, resources, tasks, skills, logging, notifications) has a matching CLI verb such as tools-list, tools-call, prompts-get, resources-read, and tasks-list. Second, it lets engineers script repeatable MCP workflows in plain shell using --json mode for jq pipelines. Third, it gives AI agents the full MCP protocol through one Bash() call, so an agent does not need dozens of MCP tool definitions wired into its context; instead the agent runs commands like mcpc @apify tools-call search-actors keywords:="website crawler".

A mcpc grep <pattern> command searches tools and instructions across all active sessions, enabling progressive tool discovery rather than loading every tool definition into the agent's context. OAuth profiles are reusable across sessions and across different agents on the same host, so authentication happens once per server.

Documented limitations: on headless/CI Linux, credentials fall back to ~/.mcpc/credentials.json (mode 0600) instead of the OS keychain; the x402 agentic payments wallet is marked EXPERIMENTAL; and auto-discovery of project-scope MCP config files skips any entry that references ${VAR} in url, headers, command, args, or env for security reasons.

How engineers can use it

The README documents three installation paths. On macOS or Linux, brew install apify/tap/mcpc brings its own Node.js. Otherwise install Node.js or Bun and run npm install -g @apify/mcpc (or bun install -g @apify/mcpc). On headless Linux without gnome-keyring, the README shows how to force the keychain by running mcpc inside a dbus-run-session that unlocks gnome-keyring-daemon.

Typical quickstart from the README:

mcpc login mcp.apify.com
mcpc connect mcp.apify.com @test
mcpc @test tools-list
mcpc @test tools-call search-actors keywords:="website crawler"
mcpc --json @test tools-list

Local stdio servers can be launched via a config file entry, for example mcpc connect ./.vscode/mcp.json:filesystem @fs. Tool calls accept arguments as key:=value pairs (auto-parsed as JSON where valid), as an inline JSON object, or piped via stdin, which makes the same command usable both interactively and in scripts. Engineers needing the full reference can read docs/REFERENCE.md in the repo or run mcpc help <command>.