What is mcp-golang?

mcp-golang is an unofficial implementation of the Model Context Protocol in Go. It provides a robust framework for building servers that can interact with AI models through a standardized protocol.

Key Features

Batteries Included

Set up an MCP server with support for tools, resources, and prompts in just a few lines of code.

Type Safety

Full Go type safety with automatic JSON schema generation from go structs.

Composable

Just take the components you need: transport, protocol or server.

Bring your own transport

mcp-golang has implemented the default transports: stdio and sse. If you need to implement your own transport, no problem! Use the rest of the library

Design Philosophy

The library is designed with the following principles in mind:

  • Simple API: Easy to use for basic cases while supporting complex production use cases
  • Sane Defaults: Provides reasonable defaults while allowing customization
  • Server First: Primary focus on server implementation with future plans for client support
  • Production Ready: Built for reliability and performance in production environments

Getting Started

To start using mcp-golang in your project, head over to our Quickstart guide. For more detailed information about development and contribution, check out our Development guide.