Show HN: mcp-golang – Build custom tools for LLMs in go (github.com)

5 points by cbatt ↗ HN
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 ] thread
Something that I don’t get about MCP servers is how will this work in Production when the MCP server is used by many clients. It does not have auth built in. Does this mean that users will have to host their own MCP Servers locally? It’s just not very practical.

I know it’s not related to your Go SDK, it’s just something that I have been wondering.

(comment deleted)