Hacker News new | ask | show | jobs
by mlenhard 434 days ago
I was in the same boat in regards to trying to find the actual JSON that was going over the wire. I ended up using Charles to capture all the network requests. I haven't finished the post yet, but if you want to see the actual JSON I have all of the request and responses here https://www.catiemcp.com/blog/mcp-transport-layer/
3 comments

itd be nice if you prettified your json in the blogpost

fwiw i thought the message structure was pretty clear on the docs https://modelcontextprotocol.io/docs/concepts/architecture#m...

Yeah, I plan on improving the formatting and adding a few more examples. There were even still some typos in the piece. To be honest, I didn't plan on sharing it yet; I just figured it might be helpful for the OP, so I shared it early.

I also think the docs are pretty good. There's just something about seeing the actual network requests that helps clarify things for me.

Some (many?) people learn better from concrete examples and generalize from them.
Not just that, but it's also useful to have examples to validate a) your understanding of the spec, and b) product's actual adherence to the spec.
Oh, that's really nice. Did you capture the responses from the LLM. Presumably it has some kind of special syntax in it to initiate a tool call, described in the prompt? Like TOOL_CALL<mcp=github,command=list> or something…
I had never heard of charles ... (https://www.charlesproxy.com/) I basically wrote a simple version of it 20 years ago (https://github.com/kristopolous/proxy) that I use because back then, this didn't exist ... I need to remember to toss my old tools aside
Well, Charles launched almost 20 years ago, so I'd say there's a good chance that it did exist.
Well hopefully my current thing, a streaming markdown renderer for the terminal (https://github.com/kristopolous/Streamdown) hasn't also been a waste of time
Why would anything be a waste of time?
I build things I cannot find.

Every project I do is an assertion that I don't believe the thing I make exists.

I have been unable to find a streaming forward only markdown renderer for the terminal nor have I been able to find any suitable library that I could build one with.

So I've taken on the ambitious effort of building my own parser and renderer and go through all the grueling testing that entails

the answers to that question are hugely variable and depend on the objective and defining waste. if one values learning intrinsically, like most of us here probably do, it is pretty hard to come up with a waste of time, even taking the rare break from learning.

But it seems self-evident where constraints like markets or material conditions might demarcate usefulness and waste.

Even the learners who are as happy to hear about linguistics as they are material science I presume do some opportunity cost analysis as they learn. Personally speaking, I rarely, if ever, feel like I'm wasting time per se but I always recognize and am conscious of the other things I could be doing to better maximize alternative objectives. That omnipresent consciousness may just be anxiety though I guess...

either that or "waste of time" is a meaningless phrase
Yeah, at its core it's just a proxy, so there are a lot of other tools out there that would do the job. It does have a nice UI and I try to support projects like it when I can.

I'll check out your proxy as well, I enjoy looking at anything built around networking.

even the approach that charles takes for intercepting TLS traffic is a bit old school (proxies, fake root certs etc.) - cool kids use eBPF https://mitmproxy.org/posts/local-capture/linux/
I can see how you don't need a proxy any more, but I don't see how you can bypass TLS without fake root certs, even with eBPF.
new to this program as well but looks really nice.

i think it is still a proxy though unless I’m missing something (beyond the name lol).

[here's a section on macos dealing with certs](https://mitmproxy.org/posts/local-capture/macos/)

here is one example: https://github.com/gojue/ecapture

in short, you can hook calls within SSL libraries (like OpenSSL)

Sure, but that very much depends on the application, no? What if it's statically linked its SSL lib?
you wanted to know how people are bypassing the need for a certificate with eBPF, that is how