Skip to main content

Installation

First, add mcp-golang to your project:

Basic Usage

Here’s a simple example of creating an MCP server with a basic tool, a prompt and two resources.

Using with Claude

Create a file in ~/Library/Application Support/Claude/claude_desktop_config.json with the following contents:

HTTP Server Example

You can also create an HTTP-based MCP server. Note that HTTP transport is stateless and doesn’t support bidirectional features like notifications - use stdio transport if you need those features.
Or using the Gin framework:

HTTP Client Example

To connect to an HTTP-based MCP server:

Next Steps