Official Python SDK for building Model Context Protocol servers and clients that connect LLM applications to tools, data and prompts.
mark3labs/mcp-go
A Go implementation of the Model Context Protocol for building MCP servers that expose tools, resources and prompts to LLM applications.
- Stars
- 9,181
- Forks
- 910
- Open issues
- 23
- Last commit
- 2 hours ago
What is it?
mcp-go is a Go library for building servers that follow the Model Context Protocol, a standard for connecting LLM applications to external data sources and tools. It handles protocol details and server management so developers can register tools, resources and prompts with handler functions and start a server.
The library supports stdio, SSE and streamable-HTTP transports. It includes typed tool handlers, task-augmented tools for long-running work, session management with per-session tools and filters, middleware for tool and prompt handlers, and auto-completion providers. It also covers OAuth protected resource metadata, CORS for browser clients and DNS rebinding protection for local HTTP servers.
The project implements MCP specification version 2025-11-25 and maintains backward compatibility with several earlier protocol versions. The README notes that the implementation is still under active development, with some advanced capabilities in progress.
Key features
- 01Register tools, resources, resource templates and prompts with simple handler functions.
- 02Supports stdio, SSE and streamable-HTTP transports.
- 03Task-augmented tools for asynchronous, long-running operations with polling.
- 04Per-session tools, tool filtering and session-scoped notifications.
- 05Middleware for tool and prompt handlers, plus panic recovery.
- 06Built-in OAuth protected resource metadata and CORS configuration for HTTP transports.
Use cases
- Exposing internal APIs or database queries as tools that an LLM agent can call.
- Building an MCP server in Go to give an AI assistant access to files or system information.
- Serving per-user tools and data to multiple connected clients over HTTP.
- Adding MCP support to an existing Go service through its net/http router or other frameworks.
Quick start
- 1
Install the library with go get
go get github.com/mark3labs/mcp-go - 2
Create a server file with the Quickstart code (for example a main.go that calls server.ServeStdio)
Things to know
- The project states it is under active development and some advanced MCP capabilities are still in progress.
Topics
FAQ
- What is mcp-go?
- A Go implementation of the Model Context Protocol for building MCP servers that expose tools, resources and prompts to LLM applications. mcp-go is a Go library for building servers that follow the Model Context Protocol, a standard for connecting LLM applications to external data sources and tools. It handles protocol details and server management so developers can register tools, resources and prompts with handler functions and start a server.
- Is mcp-go free to use? What license does it have?
- mcp-go is open source under the MIT license. Check the license terms before using it in commercial products.
- Is mcp-go still maintained?
- Actively maintained. The last commit to mcp-go was on Oct 22, 2026.
- What can I use mcp-go for?
- Exposing internal APIs or database queries as tools that an LLM agent can call. Building an MCP server in Go to give an AI assistant access to files or system information. Serving per-user tools and data to multiple connected clients over HTTP. Adding MCP support to an existing Go service through its net/http router or other frameworks.
- How do I install mcp-go?
- Install the library with go get: go get github.com/mark3labs/mcp-go Create a server file with the Quickstart code (for example a main.go that calls server.ServeStdio)
- Where can I get mcp-go?
- The source code and installation instructions are on GitHub: https://github.com/mark3labs/mcp-go
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
The official TypeScript SDK for building Model Context Protocol servers and clients that give LLM applications standardized context.
An open source MCP server that connects AI agents, IDEs and apps to databases with prebuilt tools or custom tool definitions.
A curated list of developer tools, SDKs, libraries, and testing utilities for building Model Context Protocol (MCP) servers.
TypeScript and Python SDK giving AI agents 1000+ pre-authenticated app toolkits, per-user sessions, and a sandbox to take actions.
A git-native AI agent framework where an agent's identity, rules, memory, tools and skills live as version-controlled files in a repo.