AI Engineer Code 2025
MCP Doesn't Suck. Your Agent Does. — Jan Čurn, Apify
Read the talk
MCP Doesn't Suck. Your Agent Does.
Jan Čurn explains how eager tool loading wastes context, why shell interfaces avoid some of that waste, and how mcpc combines a local CLI with MCP’s remote protocol. The demo and early Connector Evals show both the appeal and the limits of that combination.
From a talk by Jan Curn
At a glance
Ideas worth remembering
Eagerly loading every tool description is a harness decision. Progressive discovery reduces the catalog the model must carry before doing useful work.
Sub-agents separate context windows, but do not eliminate token costs or make sensitive tool results safe to place in context.
mcpc combines a shell interface with MCP connections, persistent sessions, authentication, JSON composition and asynchronous tasks.
Early Connector Evals put mcpc near native CLI performance, while showing that completion time and token cost can favor different interfaces.
A hundred tools before the first question
An agent can spend a substantial part of its context window before doing any work. Jan Čurn, founder and CEO of Apify, opens with this concrete failure behind the MCP backlash: connect several servers, load every tool description immediately, and make the model carry the whole catalog through the conversation.
MCP standardizes access to tools and resources. Its adoption brought enough servers to need registries—and, in Čurn’s telling, enough registries to need registry registries. Enthusiasm then turned into complaints that MCP consumed too much context and should give way to command-line interfaces.
The example uses ten servers supplying roughly a hundred tools in total. An eager client registers all their descriptions in the model’s context. Each subsequent call adds more material, and its result comes back into the same conversation. The cost has two parts: an upfront catalog the task may barely use, followed by an accumulating history of outputs. Čurn’s suggestion that this could consume a third of the context is illustrative, rather than a measured result for a specified configuration.
The important implementation choice belongs to the agent harness: the software that decides what the model sees and how it executes tools. MCP supplies the interaction protocol; it does not prescribe this context-management strategy. Replacing the protocol therefore misses the decision that created the waste.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Separate context, discover tools, or execute code
Three approaches change different parts of that flow:
- Sub-agents: Delegate work into a separate context window. This keeps the main conversation smaller, but the delegated tokens still cost money. A password returned into the sub-agent’s context also remains exposed to whatever can use that context; delegation alone does not solve sensitive-data handling.
- Progressive tool discovery: Begin with a way to search for tools, then add descriptions when needed. Čurn points to Anthropic’s tool search tool and Cursor’s adoption of this approach. A task needing one or two tools no longer has to carry a hundred descriptions from the start.
- Code Mode: Present tools as something the model can inspect and invoke through code. Search and code navigation help locate relevant definitions; execution can compose calls instead of making every operation a separate model-facing tool interaction.
Progressive discovery reduces what enters context before execution. Code Mode changes how execution itself happens. These can work together: find the small part of the interface relevant to the task, then write code that uses it. Large intermediate values need not become conversational material merely because one operation supplies input to another.
Čurn’s rationale for Code Mode is model familiarity: models have learned from extensive code, while structured tool calling requires additional training. That is his explanation for why writing and invoking code can work better, rather than a universal performance guarantee. He also identifies a practical adoption problem: platform-specific implementations can be difficult to use, and clients may lag behind the protocol’s capabilities.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
The shell already supplies discovery and composition
A CLI naturally encourages the behavior missing from the eager MCP client. An agent usually invokes a command when it needs it, consults help when it lacks the syntax, and uses familiar commands without first loading their entire manuals. Discovery happens as the task develops.
Execution also already happens as code. A machine or sandbox runs the shell command; pipes connect outputs to subsequent commands. Models have seen these patterns in training data, and command help and manual pages provide further material for learning them. The terminal’s compact output is useful here too: it concentrates operational information into a small amount of text.
The tradeoff appears when the command reaches a remote service. A CLI can hide its network protocol and authentication behavior behind its executable. Enterprise instrumentation and credential handling then depend on that particular implementation. Čurn favors MCP for standardized remote access and the CLI for the local interface an agent uses.
What sits between an agent’s familiar shell command and a remote MCP server? The diagram shows the proposed division of work. Bash supplies the model-facing entry point; a CLI client handles sessions and authorization while speaking MCP to the server. The protocol’s complexity moves into software that manages it, rather than disappearing.
Uses a familiar Bash tool to invoke commands.
The agent uses Bash; the CLI client manages the MCP connection and authentication.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
mcpc makes protocol data usable in shell programs
mcpc is Apify’s universal CLI client for MCP, introduced here as a project that grew from a December hobby. Its design goal is broad protocol support—including tasks, resources and prompts—with a lightweight wrapper that contains no LLM. It can be installed through npm or Bun.
The key composition feature is --json. Commands can return structured data that tools such as jq can process and pass onward. A shell program can therefore connect several operations without asking the model to read and restate every intermediate result. Help text serves the other half of the interface: it is designed to let agents learn the commands without a separate skill package.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Connect once, then search the available tools
The demonstration begins with a local File System server, labeled FS, using stdio to communicate with a process on the computer. Connecting reveals the server name, protocol, capabilities, tools and available commands. The same information can be requested as JSON, making the interface inspectable by both a person and a program.
The remote Apify connection adds authentication. Login opens a browser, the user selects an account, and mcpc stores credentials in the local OS keychain. After connecting, the client displays server information, including the server’s instructions explaining what it does. It can then list tools and commands.
The session list now contains three MCP sessions. mcpc persists them so the user can return later, and different agents—such as Claude Code and Codex—can use the same established setup. Connection state lives in the client rather than requiring each agent to recreate the configuration.
Progressive discovery becomes concrete with mcpc’s grep command. Searching for find returns three matching tools from FS and four from Apify. The observable change is from a set of connected servers to a short, relevant selection of tools. Searching the available descriptions narrows what the agent needs to inspect; connecting to a server does not require presenting its whole tool catalog to the model upfront.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Start remote work without holding the foreground
Next, an Apify web-search tool illustrates asynchronous execution. Adding --task starts work on the server while leaving the local client free to do something else. The client can check progress and retrieve results later, or detach while the task continues. Čurn detaches during the demo; the sequence demonstrates background execution rather than a completed search result.
Asynchronous tasks and JSON composition address different costs. A task frees the foreground while remote work runs. A shell pipeline keeps intermediate processing outside the model’s conversation. Together, they let ordinary programs coordinate MCP operations while reserving context for information the agent actually needs to reason about.
The closing feature tour also mentions x402 support, local wallet management and proxy commands for sandboxing. These broaden mcpc’s intended role, but the recording does not develop their payment or isolation mechanisms.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Compare the connector while keeping the agent fixed
Connector Evals changes the benchmark question. Instead of comparing agents, it compares the interfaces through which an agent works: native CLI, raw MCP and mcpc. The presented tests use Claude Code. This focuses attention on whether the connector itself changes completion time and token cost.
The charts place task completion time on the horizontal axis and token cost on the vertical axis. In the first comparison, mcpc and the native CLI perform similarly; raw MCP finishes faster but consumes more tokens. Other presented comparisons again put mcpc near the CLI, with raw MCP performing worse. These are early results without numerical values or enough evaluation detail in the recording to establish a general ranking. They also preserve a useful tradeoff: the lowest token cost need not coincide with the fastest completion.
The ending’s proposal follows directly from the implementation: use MCP’s standardized connection to remote tools, expose it through a CLI that agents can discover and compose, and measure the resulting connector behavior. “MCP plus CLI” is the combination Čurn wants tested and improved. Choosing how an agent discovers tools, carries data and runs work matters as much as choosing the protocol.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
Related talks
- Beating RL With Reflection: GEPA and Optimize Anything
Extends the harness question from connector design to improving agent programs through execution traces, diagnostic feedback and reflective search.
Read the complete timestamped transcript
- 0:12
Cool. Hello everyone. Welcome to our talks, like one of the last talks of, uh, the conference. So thanks for coming. Uh, this talk is called MCP Doesn't Suck, Your Agent Does. My name is Jan Čurn, I'm the founder and CEO of Apify. And I don't know if you've seen th- these ones around here. Maybe I'll zoom here. Actually, we went great lengths to, uh, bring people to this talk. Uh, didn't quite work out. But anyway, thanks for coming. So as you know, uh,
- 0:42
MCP is a standard to securely access tools and resources, right? Basically, standard for agent to tool interaction. And it's been introduced by co-- by Anthropic about almost two years ago. And actually it took the world by storm, right? And actually last year, MCP became the darling of the AI world. Like, really like, like a lot of people build their servers. Uh, I think like, uh, now there's like ten to fifteen thousand servers, right? Lot of clients adopted it, and actually it became a standard, you know, like used by Claude or
- 1:12
ChatGPT to plug tools and connectors to your, to your AI agents. There was like even so many MCP, uh, servers that, that people had to create registries of MCP servers. And there were so many registries that people had to create even MCP server registry registries. Pretty wild times, right? So while MCP connects agents with tools, everybody loves MCP, right? Right? Well, not exactly. Actually, especially last year, there have been a lot of hate about MCP. Like for example, Anthropic admits that MCP sucks,
- 1:43
from Theo. MCP is the wrong ab- abstraction. Anthropic is trying so hard to fix MCP. MCP was a mistake, long live CLIs, right?
- 1:54
MCP is dead in the water. OpenClaw has shown me that API and CLI will, will win. There is a reason I didn't add MCP support to OpenClaw. Except via mcporter MCP to CLI converter. Oh, that's interesting. MCPs are mostly useless. I'll die on this hill if I have to. Every MCP could have been a deterministic CLI. That's what I'm gonna do next year. And from Garry Tan, who's gonna speak today as well, MCP sucks, honestly. Oh my God, and, uh, Peter
- 2:24
Levels, thank God MCP is dead. So I'm like, "What's happening? Why are everybody hating MCPs?" Right? This is crazy. So first, let, let's look at the problem, like what are people talking about? So the most cited problem was like, "Hey, MCP eats too much context." And actually, that's true. I mean, the first like way how agents implemented MCP was very naive, right? They were like, "Hey, MCP gives you tools." So there is like if you have ten MCP servers, it's just like ten MCP tools. So there's like a hundred tools, and
- 2:54
agents would register all these tools in the context right away. So before you actually even ask any question, MCP would like already eat like a hundred, like, you know, uh, tools in your, in your context. Maybe like one third of your context will be gone without actually like doing any work. And honestly, this is pretty crazy, I mean, if you think about it, right? And then you would be calling tools, basically adding to the context, the results will be added back to the context again. And basically the context will just like grow very long and rot over time, you lose accuracy, it costs a lot of money, and so on. It's a very ineffective way how to do
- 3:24
that.
- 3:27
But that's not the problem of MCP, that's the problem of, of, of the harness. And if you look at the MCP specification, what it says about like how you should design the harness, like it says absolutely nothing. It's up to the implementation, right? So it's your job when you're building your agent to make sure you use MCP effectively. It's not a problem of the protocol, right?
- 3:47
So what are the solutions of this? So first solution, like fairly naive, is like, "Hey, let's split the context into sub-agents." So if there's some, some task, you can basically delegate it to a new sub-agent. It's been its own, own context, so basically it doesn't pollute the main context window. I mean, that's great, but you still have to pay money for those tokens. It doesn't go away. And the problems like, uh, before are still, still around. For example, if the MCP tool, uh, returns some, some sen-
- 4:16
sensitive results like password, basically it stays in your context and it can be abused by other, other tool calls or basically like, uh, the application, right? So basically, context is, is, is a, is a really bad place to, uh, pass a sensitive value or like large data. And sub-agents only push that problem a little further, but still don't remove it. So what's the, the solution number two? Uh, I think it was end of the last year, I think first, uh, Anthropic and then Cursor introduced, uh, something which is called progressive tool
- 4:46
discovery. And, uh, I mean it's, it's so simple that it hurts even that like people have to, you know, like do this. But, uh, the idea was like, "Hey, if we put all the tools into the context, it just consumes too much tokens. So how about we put those tools into the context progressively only when you need them, right?" So for example, Anthropic, uh, in Claude introduced this like tool just called like tool search tool. And basically that tool helps you find other tools and only add those to the context when needed, right? And
- 5:16
it kind of makes sense. I mean, why would you like add all the hundred tools in your con- context all the time if you rarely need them? Like typically you just like need maybe one or two. And actually this way you can save like huge amount of context right away, basically. Makes it more effective, cheaper, you know, faster to run, and so on. So it kind of makes sense, right? So like every- everybody should be doing it now. And then solution number three, so also introduced, uh, end of last year by Cloudflare. It's called code mode, right? And the
- 5:46
big idea is like, "Hey, let's not treat MCP tools as, you know, like functions, like that you, you know, you would have to add to the context, but treat them as, as a code." And actually, models are really good at writing and, and analyzing code because, you know, they can use tools like grep They can find the ri-right, you know, definition or, like, uh, they can navigate the c-code pretty well. And in that way, they can navigate also the t-tool descriptions and information about the tools and so on. So it's, it's a pretty, like, simple
- 6:16
idea, very straightforward. So let's convert tools, MCP tools and servers into, into code and treat it as code, right? Pretty simple, but extremely effective, right? Because it, it turns out models are better at writing and calling code, code than, than, than to calling tools because tool call- tool calling is an artificial construct, basically, that we had to teach the, the LLMs to do. It's like it doesn't exist, like, in a, in a real world, like in real training data. Like, this is those, those that have to be, like, synthe- synthe-synthesized and put into the
- 6:46
model. But unfortunately, uh, even Claude's im-implementation of code mode is, like, very difficult to use. It's, like, very, like, tied to their platform, and it's, it's not really straightforward, you know. So not a lot of people are actually using code mode, you know, um, except a few examples, right? So still, most agents are living in the dark ages, and they, they don't, they they don't support these features, you know, and most MC-MCP clients. And it's a pity because the, the protocol has evolved a lot, added a lot of new things, but the
- 7:16
clients don't support it. So how are CLIs different? You know, why people compare CLIs to MCP? Well, actually, agents never load the full CLI into context. It's not like the agent would explore all the, all the commands of the CLI tool, like find a help and put it in the context. No, no, it does-- it, it, it's doing it progressively by default. So the agent, uh, is calling the CLI tool only when needed, and sometimes actually it knows the tools by heart. Like, so for example, the basic Linux commands, the
- 7:46
agents already know because they have seen it at training data since, you know, forever. But also they can, like, learn about the tools, uh, the CLI tools, uh, from help because there is help. And actually, uh, agents run CLI tools, uh, as code by default, right? So in order to ru-run CLI tools, you have to have some runtime, like sa-sa-sandbox or a machine that you can, like, run the commands in. So, and when you, like, invoke these, like, CLI tools, I mean, it's code mode by d- by default. You,
- 8:16
you run it as a code. It's like bash code, but it's still code. So, you know, it's basically like code mode, like, uh, is ava-available to, to CLIs from scratch, while MCP only had to like, sort of like grow into it, you know. And this is important, like, agents know the shell by heart. I mean, Linux shell, Linux or Unix has been around from like nineteen sixty-nine when, uh, Ken Thompson and Dennis Ritchie actually, uh, created Linux. And when you look, like, uh, the basic terminal, the, that black box of
- 8:46
like eighty columns and, I don't know, twenty-five rows, it's like really like condensed representation of what's happening in a computer, right? Like, like, like, every byte, every, e-every character there is, is optimized, you know, like over forty years to really convey only the most important information, right? So it's really, really like optimized, you know, for, for people. But it turns out, like, agents l-like this as well. And agents actually know shell by heart. They really know, like, how to do call, call, call CLI commands, how to pipe them. They
- 9:16
really know, like, how to sh-use the shell well because they have seen it in so much training data. Plus for, for the AI labs, you can actually synthesize like infinite amount of training data from using shell, right? You can just like pipe different commands together, explore the commands, extract information from their manual pages, and basically feed this all to the, the models so they know the shell really, really well. But CLIs are a local black box with no standard out and transport protocol. So basically, I mean, they are literally a black box. It's a black terminal thing, right? And you don't see what's happening
- 9:46
inside. So for example, if you wanted to like, you know, instrument like these like CLIs, uh, in your enterprise, you would have to sort of like in-introspect the protocol and like, uh, oh, are they using API or WebSocket or, you know, you don't know. You cannot inject credentials into that. So basically, CLIs are great for local interface, but for remote access, MCP is better. I mean, I have yet to see, uh, some agent like using CLI connectors. It doesn't exist because it doesn't make sense if you have MCP connectors. So how about we use MCP
- 10:16
for standard remote access and CLI for local agent access or lo-local agent interface with all the goodies like, uh, that I described? Well, that way you can provide all the protocol features of MCP through a simple tool call that all the agents already know, which is called Bash, right? So basically, the, the full complexity of MCP is hidden behind single tool call, Bash, and you don't need to worry about the sessions, authorization, OAuth, nothing. So, uh, ladies and gentlemen,
- 10:46
let me introduce you, uh, mcpc, which is like our universal CLI client for MCP. Uh, we-- this started as a hobby project, uh, during the, uh, December, uh, so or also known as Winter of Claude. And, uh, from a hobby project, it actually like, uh, you know, evolved into probably the, the most, uh, feature-rich, uh, mcpc like client on the, on the market. So you can install it like th-through NPM or Bun, and how it works, right? So the design goals for mcpc were,
- 11:16
hey, we really want to su-support, support like everything the MCP protocol has to, has to offer. You know, task, resources, prompts, basically everything, right? And maximum compatibility to make it really easy to run a-anywhere, anytime. MCP is like super lightweight. There is no LLM. It's just a, a wrapper, it's a CLI wrapper over the MCP protocol that sort of like abstracts away the, the protocol thing, but nothing else. It's very-- it's supposed to be easy to use for both agents and humans, obviously. And
- 11:47
it needs to support code mode all the way. And actually, every command in mcpc has like a option to run with dash dash JSON, which returns just like pure JSON representation of the data. Again, MCP specification compliant, so actually you can compose the different like, uh, CLI calls together with tools like jq, pipe them together, and really build like sequences of, of, of, of tools, uh, of tool calls in code. So I'll show you how it looks like, uh, just a quick demo. Um, we
- 12:17
still have some time. So here is the basic interface of, uh, mcpc, right? So it has help. Actually, the help, like, we optimized a lot to help to kind of like, uh, make it really easy for agents to pick up right away without any external skills, right? So, uh, first, let me connect to, uh,
- 12:41
a local server. Oh, no, no, no. Uh, so it supports stdio, which is like the local processes, uh, running on your computer. So here, I'm connected to MCP server called File System, FS. And when I connect, I can suddenly, like, see the server name, protocol, capabilities, tools, and available commands, right? So for example, I can get a list of the commands of the m- of, of the file system server. I can get them, get them in JSON format.
- 13:12
So again, this is like something you can use as a code because it's JSON, right? And then I can also connect, uh, to remote MCP servers. So first, I need to, uh, log in. So let's say Apify MCP server.
- 13:27
I, it opens a browser where I run authentication. So just, like, pick some, uh, pick some account. So now, uh, the mcpc is, is, is logged in, and basically it's, it securely saves your credentials into your, uh, local OS keychain, so we can now u- use them like, uh, to connect securely to, to different resources. So I'll, let me connect to Apify MCP server.
- 13:55
I hope this works. All right. So now I get, like, the basic information about the server, including instructions, you know. Actually, MCP protocol has instructions where server kind of explains what it does. But most clients, they still don't support this basic primitive, right, which is kind of crazy. mcpcs are supported of course, then it can list the tools, available commands, and so on. So now, when I run mcpc, I see I have, like, three MCP sessions. Actually, mcpc persists those sessions, right? So basically, if I go away,
- 14:25
it keeps those s- sessions alive, and I, I can come back to them later, right? So basically, it keeps a state for you. And actually, you can just connect or s- s- s- set it up once and then, like, let your code, uh Claude Code or Codex use it without you sort of having to worry about it and sharing the configuration between these different agents, basically. The agent just, just, just use the same setup. And, um, I was mentioning the progressive tool discovery, right? Uh, so mcpc has this command called grep, and I can, for example, like, look
- 14:55
for all tools or servers that contain the word find, right? And I see there is like the, the, the FS, the file system, uh, MCP server has, like, three tools that match this, this, uh, this search string, and Apify has four, right? So I can, you know, try another command. For example, I can try to run a tool called Apify RAG- RAG Web Browser, which is like one of our tools to search web. And actually, MCP protocol
- 15:25
has, like, this new feature called asynchronous task. Again, most clients doesn't support it, but here I just, like, add --task, and I run this task asynchronously. That means, like, it starts on the server, and I can like, you know, do locally other things, you know, and then just, like, pick up the results later and, you know, check the progress and so on. So we can see it's running in the background, and then eventually I can get a result, or I can actually detach, you know, and do something else. So again, like, mcpc is one of the few clients that supports, uh, that supports, uh, asynchronous task,
- 15:55
which is pretty cool, and you can get it right away in your, in your, uh, browser. Okay, I'll, I'll detach. And for example... Okay, I'm running out of time a little bit, so I'll continue with the presentation there.
- 16:10
So we did some demos here. And actually, you can use the, the --json command to, uh, return everything in JSON, and then pipe these together to create like, basically like, like shell scripts that run MCP servers in the background without wasting your, your, your context tokens. By the way, recently we added support also for x402 because it turns out, uh, there are not too many, like, uh, tools to manage your local wallets. Uh, so we added it to, to mcpc as well. So because,
- 16:40
like, we w- we are, we are supporting x402 now. So, uh, it's actually one of the coolest tools, like, you can use for x402 now. Uh, there are like s- special commands, like for example, proxies for sandboxing. You know, I will not go into detail there. But also, we wanted to, to, to understand what is the performance of the MCP, mcpc, and v- v- versus like native CLIs, right? So we will, we built this, like, new, uh, framework called Connector Evals. And, like, typically, like evals or, you know, these, like, benchmarks,
- 17:10
uh, compare like different agents. Like, h- hey, for example, like Terminal-Bench is comparing whether Codex is better than Claude Code and so on. But we sort of like flipped it, and we built a framework to, to compare like how different connectors compare with each other, right? Is it b- is it more effective to use CLI or MCP or mcpc or whatever tool? So here are a few results. Actually, and you can see that like the-- this is, uh, I think, uh, this, all these tests are using Claude Code with Sonnet five. And you can see that, for example,
- 17:41
this, this is chart, the x, x, x axis is, is the time, how long did it take to finish the task. And y chart is at the cost of tokens, right? And you can see that like mcpc and CLI are actually performing pretty similarly, while raw MCP finished faster for whatever reason, but actually, uh, consume more tokens. It's like another test. Again, mcpc and CLI are fairly comparable. Raw MCP, like, performs worse. And there's another one, again, similar result, right? So actually,
- 18:11
these tests are still, like, fairly early. Uh, but like, uh, yeah, we'd be happy if you come and check it out and, um, contribute. So please stop saying CLI is better than MCP because MCP plus CLI is the best. Thank you very much for your attention.