Show HN: mcp-golang – Build custom tools for LLMs in go (github.com)
Anthropic released the Model Context Protocol a couple weeks ago - https://www.anthropic.com/news/model-context-protocol. They have official sdks for python and typescript but nothing for go, so I wrote one!
The main goal is to provide a low boilerplate sdk to write MCP servers, you can spin up a server which can give an LLM access to weather forecasts like this: https://github.com/metoro-io/mcp-golang/blob/main/examples/g... . Using it here: https://youtu.be/xaMkMl_R-0A
The library handles generating all the MCP endpoints and input schemas for the model by introspecting the types of the structs + annotations for the handlers.
I'm currently working on filling out the rest of the optional server features in the protocol and hope to move on to a client implementation soon. If any folks find this interesting, help is always appreciated!
3 comments
[ 3.7 ms ] story [ 19.5 ms ] threadI know it’s not related to your Go SDK, it’s just something that I have been wondering.
And there's a concrete PR open at https://github.com/modelcontextprotocol/specification/pull/1... which suggests that there will be an auth capability with both oauth and credential (api keys etc) which seems like it will make it's way into the next release of the spec