Set up your first mcp-golang server
First, add mcp-golang to your project:
Here’s a simple example of creating an MCP server with a basic tool, a prompt and two resources.
Create a file in ~/Library/Application Support/Claude/claude_desktop_config.json with the following contents:
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:
To connect to an HTTP-based MCP server:
Set up your first mcp-golang server
First, add mcp-golang to your project:
Here’s a simple example of creating an MCP server with a basic tool, a prompt and two resources.
Create a file in ~/Library/Application Support/Claude/claude_desktop_config.json with the following contents:
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:
To connect to an HTTP-based MCP server: