▲ | mindcrime 7 days ago | |
Not the person you asked, but I've gone down this rabbit hole recently and can maybe add something. First, let me say that I don't find much value in the stdio transport stuff and really only care about the http/sse side. Given that, I found that the docs at modelcontextprotocol.org are somewhat lacking. They seem to assume that you want to use stdio and don't have much meat on setting up sse. The good news is, the official Python SDK repo has examples of both scenarios. Between the actual "example servers" in the examples/ dir[1], and comments sprinkled around some of the various module files[2][3] themselves, everything you need to write an sse based server/client pair (in Python at least) is there. Note that most of what I just said is true mainly if you want to use the lowlevel / "vanilla" SDK. Using FastMCP makes things a lot simpler and faster. If you're interested, I keep a repo with some of my experiments and samples as I'm learning this stuff. Feel free to poke around there and see if any of those examples help: https://github.com/mindcrime/MCPSandbox I've got FastMCP and "vanilla SDK" examples of sse server/client pairs, and a stdio based example mostly cribbed from the "quickstart guide". My next step is going to be to start working with the Java SDK, so some Java samples will probably show up there soon'ish. [1]: https://github.com/modelcontextprotocol/python-sdk/tree/main... [2]: https://github.com/modelcontextprotocol/python-sdk/blob/main... [3]: https://github.com/modelcontextprotocol/python-sdk/blob/main... | ||
▲ | kiitos 7 days ago | parent [-] | |
> I don't find much value in the stdio transport stuff and really only care about the http/sse side ... I found that the docs at modelcontextprotocol.org are somewhat lacking. They seem to assume that you want to use stdio and don't have much meat on setting up sse. Yeah, it's expected that you'll use stdio by default, because it's expected that MCP servers run locally to the client that connects to them, and in that case stdio is both simpler and faster. |