5 ms·
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.
by mlenhard 1y 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/ https://www.catiemcp.com/blog/mcp-transport-layer/
- kristopolous 1y agoI had never heard of charles ... (https://www.charlesproxy.com/ https://www.charlesproxy.com/) I basically wrote a simple version of it 20 years ago (https://github.com/kristopolous/proxy 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
- stavros 1y agoWell, Charles launched almost 20 years ago, so I'd say there's a good chance that it did exist.
- deleted 1y ago[deleted]
- kristopolous 1y agoWell hopefully my current thing, a streaming markdown renderer for the terminal (https://github.com/kristopolous/Streamdown https://github.com/kristopolous/Streamdown) hasn't also been a waste of time
- stavros 1y agoWhy would anything be a waste of time?
- mptest 1y agothe 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...
- kristopolous 1y agoI 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
- nsonha 1y agoeither that or "waste of time" is a meaningless phrase
- mlenhard 1y agoYeah, 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.
- Maxious 1y agoeven 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/ https://mitmproxy.org/posts/local-capture/linux/
- stavros 1y agoI 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.
- Tokumei-no-hito 1y agonew 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/ https://mitmproxy.org/posts/local-capture/macos/)
- beaugunderson 1y agohere is one example: https://github.com/gojue/ecapture https://github.com/gojue/ecapture in short, you can hook calls within SSL libraries (like OpenSSL)
- stavros 1y agoSure, but that very much depends on the application, no? What if it's statically linked its SSL lib?
- beaugunderson 1y agoyou wanted to know how people are bypassing the need for a certificate with eBPF, that is how
- zellyn 1y agoOh, 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…
- swyx 1y agoitd 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#message-types https://modelcontextprotocol.io/docs/concepts/architecture#m...
- nl 1y agoSome (many?) people learn better from concrete examples and generalize from them.
- TeMPOraL 1y agoNot 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.
- mlenhard 1y agoYeah, 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.