TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 230 subscribers
Post #25451 11
Project TSAR-MCP: A Zero-Dependency Orthodox C++ Framework for Edge AI. Because I write DB drivers for a living and AI was getting away from me.

Hi everyone,

Out of Minnesota 26 years ago IBM sent me to Germany, into a basement (truly) on-site at SAP in Walldorf to port kernels to run on IBM hardware (mostly on IBM i, the predecessor AS/400; but also database drivers for SAP application servers on everything else).

That's the background, the consequence is everything I do is written in C++ — mostly because I know and love it, but also because anything we ship needs to be self-contained. Intrigued by giving AI hands, I WANTED to make MCP servers I could use on-site and ship; therefore, I NEEDED to do it in C.

A true story before I sign off: In January I opened up Gemini and said, "I want to build a helloWorld MCP server in C."

The AI replied: "That will be somewhat difficult, there are easier ways."

I asked, "Why is it difficult??" (the second '?' was a bit of my ego).

Gemini replied: "Well, you'll need to parse JSON, handle raw I/O, and return strict JSON-RPC back to the client."

I told it, "One moment, let me show you something." (again my ego), I attached my JSON parser engine file (JSONParser.h) and said, "We have a JSON parser." (I typically talk to an LLM as a colleague working on the same project—for a reason, but that's a different story). This BNF parsing engine, by the way, is based on the same bedrock that powers our database driver (with SQL grammar, of course) built almost 2 decades ago.

Amusingly, the AI read the code and completely shifted its tone: "Oh, well then it's not so difficult."

My helloWorld became serious when I realized, with stdio over ssh, I could deliver an mcp endpoint in the SAP kernel to have it available on every database or remote application server running SAP. MCPServer_sapControl is my vision; approval is a different matter, but nevermind. Being enterprise-ready, TSAR-MCP-based servers are self-diagnosing — verbose operational traces are exposed to the client LLM, meaning even remote servers show the client what goes right and what goes wrong.

Enough details to bore you, the rest of the history is visible in the repository which I tagged with three teaching versions: the first is a simplistic sequential helloWorld MCP server that works out of the box; the second, an aspect server which does the same; the third tag is the version it is today — a fully asynchronous sampling MCP engine. The head version includes a full set of boilerplates.

I hope someone finds it useful, and I'm here for discussion if anyone wishes to.

Repository: https://github.com/IBM/tsar-mcp

Project Pages: https://ibm.github.io/tsar-mcp/

Cheers,

... Eric

https://redd.it/1u98a2y
@r_cpp
GitHub GitHub - IBM/tsar-mcp: A zero-dependency native C/C++ SDK for building Model Context Protocol (MCP) servers on edge and enterprise… A zero-dependency native C/C++ SDK for building Model Context Protocol (MCP) servers on edge and enterprise systems. TSAR-MCP servers are designed to be designed by AI. - IBM/tsar-mcp
More from @r_cpp
  1. Sep 29, 2026Boost.Graph 1.95 will be C++17 Dear Boost.Graph community, In two release cycles (Boost re…
  2. Sep 26, 2026Token Sequence Injection & Modern Macros: The Most Game-Changing Compile-Time Feature in C…
  3. Sep 25, 2026myStringStream.str("") Considered Harmful Under C++20 I was recently looking at some (rath…
  4. Sep 20, 2026A clever branch free optimization I'm the developer of memlz which is an extremely fast co…
  5. Sep 15, 2026Inside Boost.PolyCollection https://bannalia.blogspot.com/2026/09/inside-boostpolycollecti…
  6. Sep 11, 2026C++26: Standard Library Hardening Experiments https://www.cppstories.com/2026/hardening-ex…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →