mcpc

A universal MCP CLI client from Apify: persistent sessions, OAuth, JSON output for scripts and shell access to any MCP server for agents

CLIHigh risk

apify/mcpc

Install

npm install -g @apify/mcpc

Or bun install -g @apify/mcpc.

This is third-party code. Review the repository files before installing.

What it does

mcpc maps every MCP operation to a shell command: listing and calling tools, reading resources, prompts and async tasks. Connecting to a server creates a named session kept alive by a background process, so you can work with several servers at once. An agent with Bash access does not need dozens of tool definitions in context: it finds the right ones via --help and grep across sessions, and with --json writes scripts using jq and xargs. It supports OAuth 2.1 with credentials in the OS keychain, a proxy that keeps keys away from generated code, tool schema validation and experimental x402 payments.

Who it is for. For MCP server developers and anyone wiring MCP into CLI agents such as Claude Code and Codex.

Good fit when

  • You need to inspect and debug an MCP server from the terminal
  • The agent burns too much context on MCP tool definitions
  • You want to automate a chain of MCP calls in a shell script or CI

Not a fit when

  • The agent has no shell access
  • Your client's built-in MCP support is enough and you use few servers

Example request

Use mcpc to connect to mcp.apify.com, find the actor search tool and look for a ready website scraper

Limitations

Requires Node.js or Bun, or Homebrew. On headless Linux, credentials go to ~/.mcpc/credentials.json unless gnome-keyring is set up. The client itself uses no LLM or external services, but whether a given MCP server is reachable from Russia depends on its owner. x402 payments are experimental and run on Base.

How to disable. Close sessions with mcpc, delete saved auth profiles, then remove the package: npm uninstall -g @apify/mcpc or brew uninstall mcpc.

Security check

  • Calls arbitrary tools on connected MCP servers
  • Stores OAuth tokens and bearer keys
  • Supports experimental x402 crypto payments

README in short

The README explains the idea: a CLI as the agent's local interface to MCP, with MCP as the remote standard. It then covers install via Homebrew, npm or Bun, sessions, three auth approaches, a sandbox proxy, agent modes for tool calling and scripting, schema validation and x402 payments. The repository includes an mcpc skill for agents. Apache 2.0 licensed.

FAQ

Can I connect a local stdio server?

Yes, reference an entry from an existing config, for example mcpc connect ./.vscode/mcp.json:filesystem @fs.

How do I keep keys away from agent-written code?

A human authenticates, and mcpc exposes that session through a local MCP proxy. The agent and generated code connect to the proxy without seeing credentials.

Editors’ pick

Open-source personal AI assistant on your own machine: answers in Telegram, Slack, Discord and WhatsApp, extended with skills and plugins

CLIHigh risk389.7K
Editors’ pick

A self-improving agent from Nous Research with a TUI, messaging gateway, cron jobs and skills it writes itself

CLIHigh risk245.5K
Editors’ pick

An open source coding agent for the terminal and desktop with build and plan modes

CLIHigh risk207.4K
Editors’ pick

Anthropic's coding agent for the terminal, IDE and GitHub: understands your codebase, runs tasks and handles git

CLIHigh risk145K