# MCP Doesn't Suck. Your Agent Does. — Jan Čurn, Apify

## Executive summary

The talk argues that recent criticism of the Messaging/Communication Protocol (MCP) is misplaced; the issue lies with naive client implementations (the 'harness') rather than the protocol itself. Jan Čurn outlines three key architectural fixes—Sub-agents, Progressive tool discovery, and Code Mode—to solve context bloat. He advocates for a hybrid approach: using MCP for secure, remote access and leveraging Command Line Interfaces (CLIs) for local agent interaction, demonstrating this with the open-source universal CLI client, mcpc.

## Key takeaways

- Context Bloat is a Harness Issue: The primary complaint—that MCP consumes too much context (e.g., loading 100 tools at once)—is due to poor client implementation, not the protocol design. The protocol itself is robust, but the agent harness must be designed correctly.
- Three Architectural Fixes: Solutions include: 1) Using sub-agents to delegate tasks and isolate context. 2) Implementing Progressive tool discovery, where tools are added to context only when needed. 3) Adopting Code Mode, treating tools as code that models are better at analyzing and writing than traditional tool calling.
- CLI vs. MCP: Local vs. Remote: CLIs are superior for local access because agents naturally interact with them as code (like bash), and they do so progressively. MCP remains the superior choice for secure, authenticated remote access.
- Introducing mcpc: mcpc is an open-source universal CLI client for MCP, designed to support all protocol features (e.g., stddio, remote servers, OAuth, asynchronous tasks, and d-JSON output) while abstracting the complexity of the MCP protocol for both agents and humans.

## Technical details

- MCP Protocol: MCP is a standard for secure agent-to-tool interaction, introduced by Anthropic, designed to connect agents with tools and resources.
- Progressive Tool Discovery: A method to prevent context bloat by only adding tool definitions to the context when they are actively needed, rather than loading all available tools upfront.
- Code Mode: Treating MCP tools and servers as code rather than just functions. This leverages the model's strength in code analysis (e.g., using `grep`) and allows for better navigation and understanding of tool definitions.
- mcpc Client: The open-source universal CLI client for MCP, supporting features like stddio, remote server connections, OAuth authentication, persistent sessions, asynchronous tasks, and d-JSON output for programmatic piping.
- x402 Support: mcpc has added support for x402, a tool used for managing local wallets, demonstrating the client's ability to integrate specialized protocols.

## Practical implications

- Build engineers should design agent harnesses to implement progressive tool discovery and use sub-agents to manage context and prevent token waste.
- For enterprise integration, use MCP for secure, remote access and expose local tool functionality via a CLI wrapper (like mcpc) to maintain agent efficiency.
- The use of d-JSON output from CLI tools allows for piping and composing complex sequences of tool calls, treating the entire process as code.
- The mcpc client provides a standardized, feature-rich way to interact with MCP, simplifying development for both human users and AI agents.

## Topics

Agent Development, Protocol Design, CLI/API Integration, Context Management, AI Tooling, Apify, mcpc (GitHub), Introducing mcpc, Apify MCP server

Source: https://www.youtube.com/watch?v=pAnLpiAG6Es
