From genAI to the world
Adventures in MCP
You likely know the interface of ChatGPT and other generative AI tools. You ask something the tool does something. I liked to use ChatGPT for dictation while driving, which was a very helpful application.
But when I said "send me an email with the text" or "create a pdf", ChatGPT replied: I can't do that. The model can only do what the makers of the model enabled it to do and unless OpenAI gets the idea to provide an outbound email service, the model will never be able to send emails (which is overall a positive thing when it comes to mail).
But.
But would it not be useful if the model you use could do stuff its makers did not enable it to do?
That's where the "model context protocol" (MCP) comes into play.
The MCP claims to be "USB-C for large language models", enabling any application that is able to provide its services using the MCP to be used by a large language model.
This means that if you provide your email server with a MCP "interface", you will be able to use it from a Large Language Model that can talk MCP.
If you equip your robot with a MCP "interface", a large language model can interact with your robot.
Let's try it out!
My test case for MCP was to connect a ticketing system to claude.ai. My all time favorite ticketing system (bestpracticals Request Tracker) is well equipped with REST-based APIs and I have just installed the latest (6.0) version from scratch - a blank canvas to play with.
I created a project in Claude and gave some instructions on what I want to do and let Claude do the magic.
To make things short: In the end, it worked.
Zapier works
Claude proposed first to use the claude desktop app (did not want to do that) and then to use Zapier. Zapier is a versatile middleware to tie various applications together. They provide both a MCP interface and a RT integration.
Configuring Zapier for RT and MCP took a short amount of time, but somewhere between Claude, MCP, Zapier and RT something was very, very slow.
So slow, that my task "create 100 test tickets" was abandoned by Claude after creating 10, asking me if I was really serious about the 100.
Bear in mind that you would normally create test tickets on the command line and not waste genAI resources, but for the sake of science I wanted to try.
The combination Claude - Zapier - RT worked but I wondered if I needed Zapier at all - because the MCP promises to talk directly between the LLM (Claude) and my application (RT).
Creating a MCP bridge
Why do I not ask Claude to solve the problem? I explained Claude what I wanted to do and asked it to write a MCP bridge for me.
Claude took the task very serious and delivered many things at a very high quality. Some sloppy coding needed a discussion between us and Claude did not consider the existing SDK. It did not code the OpenAuth part well neither and the nginx configuration came never out correctly until the end (it claimed it had added both SSL and http w/o SSL but the config only contained http).
But - given that I don't need AI to configure nginx but that my knowledge in python is very limited, Claude did an amazing job in designing a service architecture and coding it.
We needed a few interactions, in which I pasted error messages and asked some architecture questions, but at the end of the day, I had
- A systemd service running the bridge
- A mcp bridge written in python which interacts for all known REST interfaces with RT, with OAuth and security
- No credits left on Claude for today (but it was totally worth it ;))
I used Sonnet 4 and then Opus 4 (which took all my credits). After switching to Opus 4 I added a lot of context and my learnings into the instructions, leading me two a working MCP bridge after 3 or 4 iterations.
Waiting for tomorrow
As my credits are consumed, I will wait until tomorrow to play with claude and RT, but for now I can summarize:
- Coding with Claude is faster than doing it myself, even if many iterations are involved
- I would need fewer iterations if I instructed better
- Claude proposes a solid architecture within the defined task - it helps to have some background knowledge and instruct claude to develop working and better integrated code
- MCP works - and it's a very straight forward protocol
Stay tuned!