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

AI Engineer · 18 min · 177 sentences · from YouTube's caption track

Each timecode opens YouTube at the start of that sentence. Line anchors (#s42) are the cue ids in the WebVTT, and every line carries its start and end seconds. All transcripts has every talk, and the whole corpus as one file.

  1. 00:12Cool.
  2. 00:13Hello everyone.
  3. 00:14Welcome to our talk.
  4. 00:16It's like one of the last talks of uh the conference.
  5. 00:18So, thanks for coming.
  6. 00:19U this talk is called MCP doesn't suck, your agent does.
  7. 00:23My name is Han Chern.
  8. 00:24I'm the founder and CEO of Appify.
  9. 00:26And I don't know if you've seen the these ones around here.
  10. 00:30Maybe I'll zoom here.
  11. 00:31Actually, we went great lengths to uh bring people to this talk.
  12. 00:34Uh didn't quite work out.
  13. 00:38But anyway, thanks for coming.
  14. 00:40So, as you know, uh MCP is a standard to securely access tools and resources, right?
  15. 00:46Basically, standard for agentto tool interaction and it's been introduced by by Antropic about almost two years ago and actually it took the world by storm, right?
  16. 00:56And 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 now there's like 10 to 15,000 servers right a lot of clients adopted it and actually it became a standard you know like used by cloud or chpt to plug tools and connectors
  17. 01:14to your to your AI agents.
  18. 01:16There 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 have to create even MCP
  19. 01:24server registry registries.
  20. 01:26Pretty wild times, right?
  21. 01:28So when MCP connects agents with tools, everybody loves MCP, right?
  22. 01:32Right.
  23. 01:33Well, not exactly.
  24. 01:35Actually, especially last year, there have been a lot of hate about MCP.
  25. 01:39Like for example, Antropic admits that MCP sucks from to MCP is the wrong abstraction.
  26. 01:46Antropic is trying so hard to fix MCP.
  27. 01:49MCP was a mistake.
  28. 01:50Long live CLIs, right?
  29. 01:54MCP is dead in the water.
  30. 01:56Open Claw has shown me that API and CLI will will win.
  31. 02:01There is a reason I didn't add MCP support to Open Claw except via MCorter MCP to CLI converter.
  32. 02:06Oh, that's interesting.
  33. 02:08MCPS are mostly useless.
  34. 02:10I'll die on this hill if I have to.
  35. 02:13Every MCP could have been a deterministic CLI.
  36. 02:15That's what I'm going to do next year.
  37. 02:18And from Gary Tan who's going to speak today as well, MCP sucks honestly.
  38. 02:22Oh my god.
  39. 02:23And uh Peter levels, thank god MCP is dead.
  40. 02:26So I'm like what's happening?
  41. 02:28Why are everybody hitting MCPS, right?
  42. 02:30This is crazy.
  43. 02:31So first like let's look at the problem like what are people talking about?
  44. 02:35So the most slighted problem was like hey MCP eats too much context and actually that's true.
  45. 02:40I 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 10 MCP servers you just like 10 MCP tools so there's like 100 tools and agents would register all these tools in the context right away so before you actually even
  46. 02:58ask any question MCP would like eat like 100 like you know tools in in your context maybe like onethird of your context would 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
  47. 03:13basically adding to the context the results would be added back to the context again and basically the context would just like grow very long and the wrote over time you lose accuracy
  48. 03:22it cost a lot of money and so on it's very ineffective way how to do that but that's not the problem of MCP that's problem of of the harness and if you look at the MCP specification
  49. 03:32what 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.
  50. 03:43It's not a problem of the protocol, right?
  51. 03:47So what are the solutions of this?
  52. 03:49So first solution like fairly naive is like hey let's split the context into sub agents.
  53. 03:54So if there's some task you can basically delegate it to a new sub agent it own context.
  54. 04:01So basically it doesn't pull you the main context window.
  55. 04:03I mean that's great but you still have to pay money for those tokens.
  56. 04:06It doesn't go away.
  57. 04:08And the problems like u before are still still around.
  58. 04:11For example, if the MCP tool uh returns some some sensitive results like password, basically it stays in your context and it can be abused by other other tool calls or basically like u application, right?
  59. 04:25So basically context is is is a really bad place to uh pass sensitive value or like large data and sub agents only push that problem a little further but still don't remove it.
  60. 04:37So what's the solution number two?
  61. 04:39Uh I think it was end of the last year.
  62. 04:42I think first uh Antropic and then cursor introduced something which is called progressive tool discovery.
  63. 04:48And uh I mean it's it's so simple that it hurts even that like people have to you know like do this.
  64. 04:52But uh the idea was like hey if we put all the tools into the context it just consumes too much tokens.
  65. 05:00So how about we put those tools into the context progressively only when you need them right?
  66. 05:04So for example, Antropic uh in cloth 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?
  67. 05:16And it kind of makes sense.
  68. 05:17I why would you like add all the 100 tools in your context all the time if you rarely need them?
  69. 05:23Like typically you just like need maybe one or two and actually this way you can save like huge amount of context right away.
  70. 05:30basically makes it more effective, cheaper, you know, faster to run and so on.
  71. 05:35So it kind of makes sense, right?
  72. 05:36So like every everybody should be doing it.
  73. 05:38No. And then solution number three also introduced uh end of last year by Cloudflare.
  74. 05:45It's called code mode, right?
  75. 05:46And the 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 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 grab they can find the
  76. 06:05right you know definition like they can navigate the code pretty well and that way they can navigate also the two descriptions and information about the tools and so on.
  77. 06:14So it's it's a pretty like simple idea very straightforward that 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
  78. 06:32calling tools because cool tool calling is an artificial construct basically that we have 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 those has to like syn syn synthetized and put into the model.
  79. 06:48But unfortunately uh even cloud implementation of code mode is like very difficult to use.
  80. 06:53It's like very like tied to their platform and it's it's not really straightforward you know.
  81. 06:57So not a lot of people are actually using code mode you know uh except few examples right so still most agents are living in the dark ages and this they don't they don't support these features you know and most mcp clients and it's a pity because the protocol has evolved a lot
  82. 07:15a lot of new things but the clients don't support it so how are CLI different you know why people compare CLI to MCP well actually agents never load the full CLI into context it's not like the agent would explore
  83. 07:28all the all the commands of the CLI tool like find a help and put it in the context.
  84. 07:34No, no, it does it it it's doing it progressively by default.
  85. 07:38So 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 agents already know because they have seen it training data
  86. 07:49since you know forever but also they can like learn about the tools uh the CLI tools from help because there is help and actually uh agents run CLI tools
  87. 08:02uh as code by default right so in order to run CLI tools you have to have some runtime like sand sandbox or machine that you can like run the commands in.
  88. 08:11So and when you like invoke these like CLI tools I mean it's code mode by by default you you run it as a code it's like bash code but it's still code
  89. 08:20so you know it's basically like code mode like uh is available to to CLI from scratch while MCP only had to like sort of like grow into it you know
  90. 08:30and this is important like agents know the shell by heart I mean Linux shell Linux or Unix has been around from like 1969 when uh Ken Thompson and Dis Richie actually created Linux
  91. 08:43and when you look like the basic terminal that black box of like 80 columns and I don't know 25 rows it's like really like condensed representation of what's happening in the computer right like like every bite every every character there is is optimized you know like over 40 years to really convey only the most important information right
  92. 09:03so it's really really like optimized you know for for people but it turns out like agents like this as And agents actually know shell by heart.
  93. 09:12They really know like how to do call call C cli commands, how to pipe them.
  94. 09:16They really know like how to use a shell well because they have seen it in so much training data.
  95. 09:20Plus for for the AI labs, you can actually synthesize like infinite amount of training data from using shell, right?
  96. 09:26You can just like pipe different commands together, explore the commands, extract information from your manual pages and basically feed this all to the models.
  97. 09:33So they know the shell really really well.
  98. 09:36But CLI are a local black box with no standard outend transport protocol.
  99. 09:41So basically I mean they are literally a black box.
  100. 09:43It's a black terminal thing right and you don't see what's happening inside.
  101. 09:47So for example if you wanted to like you know instrument like these like CLI uh in your enterprise you would have to sort of like in introspect the protocol and like uh oh are they using API or websockets or you know you don't know you cannot inject their credentials into that.
  102. 10:01So basically CLI are great for local interface but for remote access MCP is better.
  103. 10:07I mean I have yet to see uh some agent like using CLI connectors it doesn't exist because it doesn't make sense.
  104. 10:13You have MCP connectors.
  105. 10:14So how about we use MCP for standard remote access and CLI for local agent access or local agent interface with all the goodies like uh that I described.
  106. 10:24Well, 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.
  107. 10:34So basically the full complexity of MCP is hidden behind single tool call bash and you don't need to worry about the sessions authorization all out nothing.
  108. 10:44So uh ladies and gentlemen let me introduce you uh MCPC which is like our universal CLI client for MCP.
  109. 10:52uh we this started as a hobby project uh during the uh December so or also known as winter of cloth and u from a hobby project it actually like u you know evolved into probably the the most uh featurerich
  110. 11:07uh MCPC like cline on on the market.
  111. 11:10So you can install it like through npm or ban and how it works right.
  112. 11:14So the design goes for MCPC where hey we really want to support support like everything the MCP protocol has to has to offer you know task resources proons basically everything
  113. 11:25right and maximum compatibility to make it really easy to run anywhere anytime.
  114. 11:30MCP is like super lightweight.
  115. 11:32There is no LLM.
  116. 11:33It's just a a wrapper.
  117. 11:34It's a CLI wrapper over the MCP protocol that sort of like abstracts away the protocol thing but nothing else.
  118. 11:40It's very it's supposed to be easy to use for both agents and humans obviously and it needs to support code mode all the way and actually every command in MCPC
  119. 11:51has like a option to run with D-JSON which returns just like pure JSON representation of the data again MCP specification compliant.
  120. 11:59So actually you can compose the different like uh CLI calls together with tools like jq pipe them together and really build like a sequences of of of of tools
  121. 12:10uh of tool calls in code.
  122. 12:12So I'll show you how it looks like uh just a quick demo u we still have some time.
  123. 12:19So here is the basic interface of mcpc right.
  124. 12:22So it has help actually the help like we optimized a lot the help to kind of like make it really easy for agents to pick up right away without any external skills.
  125. 12:33Right.
  126. 12:34So uh first let me connect to uh a local server.
  127. 12:43Oh no no no. Uh so it supports stddio which is like the local processes uh running on your computer.
  128. 12:51So here I'm connect 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 of the file system server
  129. 13:08I can get them get them in JSON format 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
  130. 13:20So first I need to uh login.
  131. 13:22So let's say appy mcp server.
  132. 13:27I it opens a browser where I run authentication.
  133. 13:30So just like pick some uh pick some account.
  134. 13:36So now uh the MCPC is is is logged in and basically it's it securely save the credentials into your local OS keychain.
  135. 13:44So we can now use them like uh to connect securely to to different resources.
  136. 13:48So uh let me connect to Appify MCP server.
  137. 13:54I hope this works.
  138. 13:56All right.
  139. 13:56So now I get like the basic information about the server including instructions.
  140. 14:00You know actually MCP protocol has instructions where server kind of explains what it does but most clients still don't support this basic primitive right which is kind of crazy.
  141. 14:10MCPC are supported of course then it can list the tools available commands and so on.
  142. 14:16So now when I run MCPC I see I have like three MCP sessions.
  143. 14:21Actually MCPC purses those sessions right?
  144. 14:23So basically if I go away it keeps those sessions alive and I can come back to them later right?
  145. 14:28So basically it keeps a state for you and actually you can just connect or set up once and then like let your code cloud code or codex use it without you sort of having to worry about it and sharing the configuration between these different agents.
  146. 14:42Basically the agent just just just use the same setup.
  147. 14:46And uh I was mentioning the progressive tool discovery, right?
  148. 14:49Uh so MCPC has this command called grap and I can for example like look for all tools or servers that contain the word find, right?
  149. 14:59And I see there is like the the the FS the fast system MCP server has like three tools that match this this uh this the search string and API has four right.
  150. 15:12So I can you know try another command for example I can try to run a tool called ampify regular browser which is like one of our tools to search web
  151. 15:23and actually MCP protocol has like this new feature called asynchronous task again most clients don't support it but here I just like add task and I run this task asynchronously that means like it starts on the server
  152. 15:35and 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 So we can see it's running
  153. 15:44in the background and then eventually I can get the results or I can actually detach you know and do something else.
  154. 15:49So again like MCPC is one of the few clients that supports uh it supports uh asynchronous task which is pretty cool and you can get it right away in your
  155. 15:58in your uh browser.
  156. 16:00Okay, I'll detach and for example okay I'm running out of time a little bit so I'll continue with the presentation there.
  157. 16:10So we did some demos here and actually you can use the the d-JSON command to uh return everything in JSON and then pipe these together to create like basically like like shell scripts that run MCB servers in the background without wasting your your your context tokens.
  158. 16:29By the way, recently we added support also for X4 X42 because it turns out uh there are not too many like tools to manage your local wallets.
  159. 16:37U so we added it to to MCPC as well.
  160. 16:39So because like we want we are we are supporting X42 now.
  161. 16:42So uh it's actually one of the coolest tools like you can use for X42 now.
  162. 16:47uh there are like 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
  163. 16:59MCPC and versus like native CLI right so we will we build this like new uh framework called connector evals and like typically like evals or you know this like benchmarks
  164. 17:10uh compare like different agents like hey for example like terminal bench is comparing whether codeex is better than cloud code and so But we sort of like flipped it and we built a framework to to compare like how different connectors
  165. 17:23compare with each other, right?
  166. 17:24Is it is it more effective to UCLI or MCP or MCPC or whatever tool.
  167. 17:30So here are a few results actually and you can see that like the this is I think uh these all these tests are using cloud code with sonet 5
  168. 17:39and you can see that for example this is this chart the x x is is the time how long did it take to finish the task and y chart is the cost of tokens right and you can see that like mcpc
  169. 17:51and cli are actually performing pretty similarly while row mcp finish faster for whatever reason but actually consume more tokens.
  170. 18:00It's like another test.
  171. 18:01Again, MCPC and CLI are fairly comparable.
  172. 18:04Raw MCP like performs wars.
  173. 18:08And there's another one again similar result, right?
  174. 18:10So, actually these tests are still like fairly early.
  175. 18:13Uh but like uh yeah, be happy if you come and check it out and um contribute.
  176. 18:18So, please stop saying CLA is better than MCP because MCP plus CLI is the best.
  177. 18:22Thank you very much for your attention.