
helping you figure out what's wrong with your MCP @posthog
Belo Horizonte, Brazil
Joined January 2017
- Tweets400
- Following146
- Followers519
- Likes671
when agents use your MCP, you don't have session replay. so you do the next best thing. you start tracking events for:
- tool calls
- why the agent made the call (by adding a new mandatory `context` parameter to it)
- what happened next
- and treat each failure as a bug report from the agent
then, you start monitoring those! you see which tool calls have the biggest error rate, which ones are too long, and you start grouping errors together.
for that, you'll also have to implement good error codes (like any good traditional API) so you can have proper alerts and monitoring.
most of that you can do by asking your agent to help you setup proper o11y and having proper APM (i recommend @posthog of course)
and then, you setup a new agent to take a look at all of that every day! and make sure you tell the agent to monitor that.
it's a small "loop" that allows your MCP to keep improving even if you don't have the time to look at the events all the time.
so the biggest question that remains is now: you need to figure out how to ask agents WHY ARE YOU DOING this call?
we did that by using the `context ` paramater on all tool calls.
you can check out how it works by wrapping your MCP server in the MCP analytics SDK - we support TypeScript, Python, Go, Rust and Ruby out of the box (let me know if yours is not supported).
just run npx -y @posthog/wizard@latest mcp-analytics on your server and see the magic ✨
in my next tweet (maybe i need to write an article on this) I'll highlight some of the most impactful PRs we were able to ship because of this!
agents are the new users that everybody is building for. we have two decades of experience to shipping things to users via UI/UX.
they might become the most popular users long term. in PostHog, they already are!
however, Agent Experience (AX) is a brand new field. and most of us are still learning.
while we are, it's important that we all share with each other what we learn along the way.
I'm building MCP analytics for that, and I plan to highlight every bit of information that I learn while doing that.
1
114
we're seeing this pattern on @posthog where more and more people are using our app via the MCP.
however, as most saas, we learn a lot about our users by seeing session replay (via replay vision™) and also seeing how they use our app!
but, when they just skip the UI and go straight to the system (via MCP), traditional (let's say 2010s analytics) doesn't work.
so, because more people are using the MCP, we decided to build MCP analytics! a way for us so see how users are interacting with it from their agents.
we are now able to:
- see what intent they have when making tool calls
- build out sessions so we can understand if users were successfully able to achieve their goal
- track similar sessions to see what common patterns are emerging
- and shipping PRs and changes based on that
this space is so new, and we're learning so much on building it.
but, after productizing it, we're seeing even more customers get value from this (our first success story is gonna be published soon!).
we're now tracking ~100 million monthly tool calls across the 2k orgs using it (not counting us), and it's been growing well.
if you wanna learn more, i'd recomment you watch the video by my friend @dennisivy11 which just got released.
youtube.com/watch?v=O88eFPSE…
plus, you don't really have to use MCP analytics if you don't want. i think if you setup the standard OTel stack (though you can use PostHog APM for that!) to start tracking which tools are being called, their latency, you can already get a sense from the eng side.
however, the session grouping + intent is what is now allowing us to dive more into the product/business metrics too.
all our SDKs are open source if you wanna use something similar, but your own solution.
but I do encourage you to try us out! the free tier is very generous (1M free events per month).
1
18
2,899
katelynlesse.com/blog/new-pr… @katelynresse head of platform eng at Anthropic sharing the new set of eng problems for us to solve (in a world where 2010s software engineering is “solved”). my (human-written!) summary:
all these problems are caused by now having multiple agents working together on harder problems, and it’s on us engineers to build good systems to address it. the problems:
- infra needs to evolve. we scaled with k8s which is designed for stateless/replicated apps. but now we have agents, which are stateful, can stop at any point and kick off again
- identity. auth is hard, and when you consider other agents need to auth too, it becomes even more obscure. how do you identify which agent approved something? was it the agent alone? or the human? what if agents need to talk with themselves, how do you guarantee their identity too?
- security. we just hit a record (i think) with CVEs last couple of months. but when you also have agents who are running on top of software, this can be even scarier. so thinking how to harden the basic platforms becomes even more important
- monitoring (the one i'm most excited working on posthog). with multiagent systems working, how do we make sure they are moving the systems in the right direction?
1
4
388
whenever i do a salary post on Brazil, i get lots of people saying that they don’t consider bonuses/RSUs as a part of the compensation because it can vary so much
while we do have great engineering talent imo, we also have people fixed on the employee status that cares only about the salary. since they don’t really see themselves as a part of the company too
at least that’s my impression
but in the US, at least in tech and in senior+ levels, more and more of the comp comes in the shape of RSU, which really means owning the company so maybe that creates more incentive too to make the company go well
i wonder what the would it take to change this perception?
1
197
Just heard @mattpocockuk say in the podcast that models/harnesses don’t matter much to him. He uses Claude Code + Opus these days and doesn’t really try new models much
Instead, he focuses on making sure all his agents have the best context and tools available to move fast and get better results
In a way I really agree with him too, since last Christmas models are already good enough. Next steps is figuring out how to provide good context + making them work for long term goals
Im a bit behind in this now (still managing agents myself, usually 10+ sessions at a time)
But my attention is the bottleneck
So next couple of weeks will try to see if I can get my agents to manage more agents too, like how @poteto and @bcherny do it
I’m tired of being the bottleneck 😭 plus it has a very heavy tax in my mental energy too
So much reading
1
1
173
everything is sales in the end
tips on becoming a sales engineer please? just picked up Stripe new book, might be a good start
77
most advice from 2010s to software engineers (career-wise) is now useless
though i think the doom spreaders on X are also wrong. the job was never about tech anyway, so it doesn't really matter if software gets automated!
figuring out what to build, how to sell, is still hard
have an MCP server? go try it out! posthog.com/docs/mcp-analyti… I promise it's gonna help you
MCP Analytics by @posthog is so good! Literally love it.
Testing MCP tools is one thing, but making sure that your MCP actually works as intended takes a bit of effort as user queries are in natural language.
With the help of MCP analytics, i was able to fix most issues and bring down error rate by ~90%.
PS: This might look like a sponsored post, but i am genuinely impressed by how well it works, and wanted to share here.
6
155
Every model that gets released lately feels less exciting
Now we’re all in for harnesses I guess
1
94
A trend I keep seeing on Brazilian tech companies; promoting their best senior engineers to lead/staff position and leading to burn out
Those folks are highly motivated people who you can throw any hard problem at them and they get it done. They talk to whoever need to clarify, keep owners informed and find out unknowns. Then they get it done, fast and with high quality
Leadership notices to us, and thinks: we need this person to train other people to do the same! So everyone can be a great engineer like them
And so they are promoted. And now, instead of doing the high quality work that got them promoted, they are now sad because they can’t own anything anymore
They are the to “provide support to their team and make sure they are growing”
However they didn’t become engineers for this. And now they get sad, unmotivated, even if they are making more money
Managers, I ask you: have you asked if your report is happy? If the work you assume they need to do actually motivates them?
Not everyone desires to transition to “leadership roles”!
Otherwise you might be burning out the folks who actually do high quality work, they stop caring and your product gets worse
1
99


