I find the idea of highly optimised MCP kind of funny. The protocol is so far from finished - the update for stateless MCP (which is our only hope at properly scaling it) isn't even released yet in the core protocol.
And even then - the LLMs are going to be so much slower than the MCP server, I've never quite understood the point of trying to optimise it. Even FastMCP is pretty good because everything is async.
But even given all that - this is very impressive :)
If they really cared about performance (which I think is the case since they're using C++ for this) - they should use something else than nholmann-json. It's simple to use, but has one of the most atrocious performance for a C++ JSON library. (The safest choice would probably be RapidJSON)
8 comments
[ 2.7 ms ] story [ 29.6 ms ] threadAnd even then - the LLMs are going to be so much slower than the MCP server, I've never quite understood the point of trying to optimise it. Even FastMCP is pretty good because everything is async.
But even given all that - this is very impressive :)
unless you're working on 10 features in parallel with smaller models in best-of-4 groups
Then with C++ implementation, you get more portability than Python or other interpreted languages.
I also ported the Claude Agent SDK to C++, so fastmcpp is needed for that: https://github.com/0xeb/claude-agent-sdk-cpp
RapidJSON is a good suggestion, maybe I will switch to it at one point.