apify/mcpc

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.

What it solves

mcpc is a universal command-line interface (CLI) client for the Model Context Protocol (MCP). It addresses the problem of AI agents wasting tokens and losing reliability when they treat MCP tools as prompt-time function calls. Instead of injecting tool definitions into the context, mcpc allows agents to interact with any MCP server using a single Bash() tool call, treating the UNIX shell as the interface between the agent and the protocol.

How it works

The tool maps every MCP operation (tools, prompts, resources, etc.) to a shell command. It uses a bridge process to maintain persistent sessions with both stateful and stateless MCP servers, handling handshakes, authentication, and keep-alives in the background. It supports multiple connection methods, including remote URLs and local config files (like those used by Claude Desktop or Cursor).

Who it’s for

  • AI Agent Developers: Who want to give their agents full MCP capabilities via a standard shell interface without wiring up dozens of individual functions.
  • Developers/DevOps: Who need to manually inspect, debug, or script repeatable MCP workflows using shell pipelines and tools like jq.
  • Power Users: Who want a unified way to manage multiple MCP servers and authentication profiles across different AI agents on one machine.

Highlights

  • Full MCP Support: Handles tools, prompts, resources, async tasks, skills, notifications, and logging.
  • Persistent Sessions: Maintains parallel connections to multiple servers, abstracting the difference between stateful and stateless protocols.
  • Progressive Tool Discovery: Includes a grep command to search for relevant tools on the fly, reducing token usage.
  • Secure Credential Management: Full OAuth 2.1 support with OS keychain integration for secure storage.
  • AI Sandboxing: Proxies MCP server connections to protect credentials from AI-generated code.
  • JSON Mode: Emits MCP-specification-compliant JSON for easy integration into shell scripts.

Related

  • Project
  • Project
  • Project
  • Project
  • Project