# modelcontextprotocol/go-sdk

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/modelcontextprotocol-go-sdk).**

4,716 stars · 456 forks · Go · NOASSERTION

## Links

- GitHub: https://github.com/modelcontextprotocol/go-sdk
- Homepage: https://modelcontextprotocol.io
- awesome-repositories: https://awesome-repositories.com/repository/modelcontextprotocol-go-sdk.md

## Topics

`go` `mcp`

## Description

This is a software development kit and framework for implementing the Model Context Protocol in Go. It provides a standardized system for building servers and clients that exchange external resources, proprietary data, and executable tools to provide context for large language models.

The SDK includes a JSON-RPC communication library and an integration framework to expose local data, prompt templates, and typed functions to AI models. It enables the development of both protocol servers that provide external context and clients that consume these remote tools and resources.

The project covers connection lifecycle management and protocol version negotiation to ensure interoperability. It provides transport abstractions for message exchange via standard input/output or HTTP, alongside capabilities for resource mapping and session management.

Security and observability features include OAuth identity integration, directory access restrictions for servers, and tools for traffic inspection and capability verification.

## Tags

### Artificial Intelligence & ML

- [Model Context Protocol Clients](https://awesome-repositories.com/f/artificial-intelligence-ml/model-context-protocol-clients.md) — Provides the client-side integration layers that allow Go applications to connect to MCP servers and consume tools.
- [Model Context Protocol Servers](https://awesome-repositories.com/f/artificial-intelligence-ml/model-context-protocol-servers.md) — Provides the core framework for implementing servers that expose tools, resources, and prompts to AI applications. ([source](https://cdn.jsdelivr.net/gh/modelcontextprotocol/go-sdk@main/README.md))
- [Client Connection Lifecycles](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/model-integration-serving/model-integration-interfaces/model-context-protocol/mcp-server-management/mcp-server-connections/client-connection-lifecycles.md) — Manages the complete session lifecycle, including initialization, capability negotiation, and termination between clients and servers. ([source](https://modelcontextprotocol.io/docs/learn/architecture))
- [AI Tool and Resource Provisioning](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-tool-and-resource-provisioning.md) — Enables the creation of executable functions and read-only data interfaces for AI agents to interact with local files and services.
- [API Client Connectivity](https://awesome-repositories.com/f/artificial-intelligence-ml/artificial-intelligence-tooling/agent-and-tool-integrations/api-servers/api-client-connectivity.md) — Provides the mechanisms for linking AI clients to local or remote servers. ([source](https://modelcontextprotocol.io/docs/develop/build-with-agent-skills))
- [Client Development](https://awesome-repositories.com/f/artificial-intelligence-ml/artificial-intelligence-tooling/agent-and-tool-integrations/api-servers/api-client-connectivity/client-development.md) — Provides the development framework for building client applications that consume AI tools and data via a standardized interface. ([source](https://cdn.jsdelivr.net/gh/modelcontextprotocol/go-sdk@main/README.md))
- [LLM Tooling Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/artificial-intelligence-tooling/language-model-integrations/llm-tooling-integrations.md) — Provides a system for exposing local data, executable tools, and prompt templates to LLMs via a standardized protocol.
- [Executable Tool Definitions](https://awesome-repositories.com/f/artificial-intelligence-ml/executable-tool-definitions.md) — Provides standardized definitions for executable tools, including metadata and logic for LLM invocation. ([source](https://modelcontextprotocol.io/docs/develop/build-server))
- [External Server Connectivity](https://awesome-repositories.com/f/artificial-intelligence-ml/external-server-connectivity.md) — Implements connectivity to external servers for the discovery and aggregation of AI tools. ([source](https://modelcontextprotocol.io/docs))
- [Prompt Templates](https://awesome-repositories.com/f/artificial-intelligence-ml/instructional-prompting/prompt-templates.md) — Provides tools for defining prompt templates that guide AI models on the use of specific tools and resources. ([source](https://modelcontextprotocol.io/docs/learn/server-concepts))
- [Resource Exposure](https://awesome-repositories.com/f/artificial-intelligence-ml/mcp-servers/resource-exposure.md) — Exposes read-only data resources, such as file contents or API responses, to be used as AI model context. ([source](https://modelcontextprotocol.io/docs/develop/build-server))
- [AI Context Interfaces](https://awesome-repositories.com/f/artificial-intelligence-ml/model-capability-extensions/ai-provider-interfaces/ai-context-interfaces.md) — Provides a standardized architecture for delivering external resources and proprietary data as context to AI models.
- [Model Context Protocol Implementations](https://awesome-repositories.com/f/artificial-intelligence-ml/model-context-protocol-implementations.md) — Provides a comprehensive Go SDK for building interoperable servers and clients that implement the Model Context Protocol.
- [Prompt Templates](https://awesome-repositories.com/f/artificial-intelligence-ml/prompt-templates.md) — Implements systems for defining reusable prompt structures that guide users through tasks within a client application. ([source](https://modelcontextprotocol.io/docs/develop/build-server))
- [User Information Collection](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/agent-protocols-interoperability/user-interaction-protocols/user-input-elicitation/user-information-collection.md) — Implements mechanisms for pausing AI operations to collect structured data from users via prompts. ([source](https://modelcontextprotocol.io/docs/learn/client-concepts))
- [Local Server Launchers](https://awesome-repositories.com/f/artificial-intelligence-ml/external-server-connectivity/server-connection-managers/custom-server-connections/local-ai-endpoint-connections/local-server-launchers.md) — Configures host applications to launch and communicate with local server instances for tool and resource access. ([source](https://modelcontextprotocol.io/docs/tools/debugging))
- [LLM Completion Requests](https://awesome-repositories.com/f/artificial-intelligence-ml/generative-ai-resources/decoding-generation-controls/ai-completion-services/model-completion-requests/llm-completion-requests.md) — Supports requesting text completions from a language model through a client while enforcing permission controls. ([source](https://modelcontextprotocol.io/docs/learn/client-concepts))

### Data & Databases

- [AI Context Resource Management](https://awesome-repositories.com/f/data-databases/data-resource-management/ai-context-resource-management.md) — Manages data resources accessed via unique URIs to provide grounding and context for LLM responses.
- [Local Tool Exposure](https://awesome-repositories.com/f/data-databases/graph-data-models/model-context-protocol-servers/local-tool-exposure.md) — Enables providing local data and tools to AI models through a standardized communication protocol. ([source](https://modelcontextprotocol.io/docs))
- [Context Data Sources](https://awesome-repositories.com/f/data-databases/read-only-data-reports/context-data-sources.md) — Provides structured, URI-addressable data sources that AI applications can retrieve and use as external context.
- [Read-Only Resource Exposure](https://awesome-repositories.com/f/data-databases/read-only-resource-exposure.md) — Provides mechanisms for sharing structured data from files or databases via unique identifiers. ([source](https://modelcontextprotocol.io/docs/learn/server-concepts))

### Networking & Communication

- [JSON-RPC Implementations](https://awesome-repositories.com/f/networking-communication/json-rpc-implementations.md) — Implements the JSON-RPC protocol to enable structured request and notification exchanges between clients and servers.
- [AI Protocol Server Integrations](https://awesome-repositories.com/f/networking-communication/protocol-server-communications/ai-protocol-server-integrations.md) — Model Context Protocol support for creating custom servers that integrate proprietary tools and services via a standardized communication protocol. ([source](https://modelcontextprotocol.io/docs/develop/connect-remote-servers))
- [MCP Transport Channels](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/communication-protocols-standards/transport-protocols/process-communication-transports/mcp-transport-channels.md) — Implements communication channels using standard input/output for local processes or HTTP for remote services. ([source](https://modelcontextprotocol.io/docs/learn/architecture))
- [Version Negotiation](https://awesome-repositories.com/f/networking-communication/http-2-support/protocol-negotiation/version-negotiation.md) — Handles version agreement between client and server during initialization to ensure protocol interoperability. ([source](https://modelcontextprotocol.io/docs/learn/versioning))
- [Session Lifecycle Management](https://awesome-repositories.com/f/networking-communication/network-reliability-diagnostics/connection-session-management/connection-management/connection-lifecycle-managers/session-lifecycle-management.md) — Coordinates the sequential states of an interactive session, from initialization handshakes to secure termination.
- [Custom Transport Implementations](https://awesome-repositories.com/f/networking-communication/network-transport-protocols/multi-protocol-transport-abstraction/mcp-transport-protocol-supports/custom-transport-implementations.md) — Allows replacing default transport layers with custom implementations like HTTP for web or container deployments. ([source](https://cdn.jsdelivr.net/gh/modelcontextprotocol/go-sdk@main/README.md))

### Programming Languages & Runtimes

- [Model Tool Schemas](https://awesome-repositories.com/f/programming-languages-runtimes/function-type-definitions/model-tool-schemas.md) — Maps executable functions to a standardized schema that allows large language models to discover and invoke tools.

### Education & Learning Resources

- [Capability Negotiation Protocols](https://awesome-repositories.com/f/education-learning-resources/educational-resources/systems-applied-computing/infrastructure-architecture/computer-networks/networking-protocols/negotiation-extension-frameworks/capability-negotiation-protocols.md) — Implements protocols that manage the exchange and agreement of functional capabilities between clients and servers during initialization.

### Software Engineering & Architecture

- [Transport Abstractions](https://awesome-repositories.com/f/software-engineering-architecture/transport-abstractions.md) — Provides unified interfaces that decouple protocol logic from the underlying communication backends like HTTP or standard I/O.
