5 ms·
How did you get started writing your own and hooking it up? Were you just working off the spec, or are there any guides or docs you'd recommend?
by lolinder 2y ago
How did you get started writing your own and hooking it up? Were you just working off the spec, or are there any guides or docs you'd recommend?
- wetpaws 2y ago[dead]
- mindcrime 2y agoNot 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 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/examples https://github.com/modelcontextprotocol/python-sdk/tree/main... [2]: https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/server/lowlevel/server.py https://github.com/modelcontextprotocol/python-sdk/blob/main... [3]: https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/server/sse.py https://github.com/modelcontextprotocol/python-sdk/blob/main...
- kiitos 2y ago> 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.
- BeetleB 2y agoJust used FastMCP and the sample code on the official MCP site.
- MattSayar 2y agoI set up a Project in Claude, used the Github integration to point to the Python example code [0], threw in my API docs, and told it to go forth and create. It was a workable start. Very much just a prototype, but it worked out of the box. [0] https://github.com/modelcontextprotocol/python-sdk https://github.com/modelcontextprotocol/python-sdk
- kordlessagain 2y agoIf you have Windows, I'm working on this: https://github.com/kordless/evolveMCP/ https://github.com/kordless/evolveMCP/
- voxic11 2y agoIts trivial to write your own server with one of the MCP server SDKs. I used https://github.com/modelcontextprotocol/typescript-sdk https://github.com/modelcontextprotocol/typescript-sdk