MCP Go logo

MCP Go

by mark3labs

MCP Go is a Go implementation of the Model Context Protocol (MCP). It enables seamless integration between LLM applications and external data sources and tools.

View on GitHub

Last updated: N/A

What is MCP Go?

MCP Go is a Go SDK for building MCP servers, which expose data and functionality to LLM applications in a secure, standardized way. It allows you to create servers that can expose data through Resources, provide functionality through Tools, and define interaction patterns through Prompts.

How to use MCP Go?

To use MCP Go, you need to install the package using go get github.com/mark3labs/mcp-go. Then, you can create an MCP server using server.NewMCPServer, add resources, tools, and prompts to it, and start the server using server.ServeStdio. The README provides detailed examples and code snippets for each of these steps.

Key features of MCP Go

  • Fast development with a high-level interface

  • Simple server creation with minimal boilerplate

  • Complete implementation of the core MCP specification (aims)

  • Support for Resources, Tools, and Prompts

Use cases of MCP Go

  • Exposing data from databases to LLMs

  • Allowing LLMs to interact with external APIs

  • Enabling LLMs to perform calculations and other computations

  • Creating custom interaction patterns for LLMs

FAQ from MCP Go

What is MCP?

The Model Context Protocol (MCP) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way.

What are Resources?

Resources are how you expose data to LLMs. They can be anything - files, API responses, database queries, system information, etc.

What are Tools?

Tools let LLMs take actions through your server. Unlike resources, tools are expected to perform computation and have side effects.

What are Prompts?

Prompts are reusable templates that help LLMs interact with your server effectively. They're like 'best practices' encoded into your server.

How do I contribute to MCP Go?

Fork the repository, create a new branch, make your changes, and submit a pull request. Make sure to test any new functionality.