Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate a complete Go MCP server project with proper structure, dependencies, and implementation using the official github.com/modelcontextprotocol/go-sdk.
.claude/skills/go-mcp-server-generator/SKILL.md| Model | Eval pass | Runs |
|---|---|---|
| gemini-3.6-flash | 100% | 12 |
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-13 | ✗→✓ | ▲ Improved | — | — |
| case-05 | ✗→✓ | ▲ Improved | — | — |
| case-17 | ✗→✓ | ▲ Improved | — | — |
| case-07 | ✗→✓ | ▲ Improved | — | — |
| case-02 | ✗→✓ | ▲ Improved | — | — |
Generate a complete, production-ready Model Context Protocol (MCP) server project in Go.
You will create a Go MCP server with:
myserver/
├── go.mod
├── go.sum
├── main.go
├── tools/
│ ├── tool1.go
│ └── tool2.go
├── resources/
│ └── resource1.go
├── config/
│ └── config.go
├── README.md
└── main_test.gogomodule github.com/yourusername/{{PROJECT_NAME}} go 1.23 require ( github.com/modelcontextprotocol/go-sdk v1.0.0 )
gopackage main import ( "context" "log" "os" "os/signal" "syscall" "github.com/modelcontextprotocol/go-sdk/mcp" "github.com/yourusername/{{PROJECT_NAME}}/config" "github.com/yourusername/{{PROJECT_NAME}}/tools" ) func main() { cfg := config.Load() ctx, cancel := context.WithCancel(context.Background()) defer cancel() // Handle graceful shutdown sigCh := make(chan os.Signal, 1) signal.Notify(sigCh, os.Interrupt, syscall.SIGTERM) go func() { <-sigCh log.Println("Shutting down...") cancel() }() // Create server server := mcp.NewServer( &mcp.Implementation{ Name: cfg.ServerName, Version: cfg.Version, }, &mcp.Options{ Capabilities: &mcp.ServerCapabilities{ Tools: &mcp.ToolsCapability{}, Resources: &mcp.ResourcesCapability{}, Prompts: &mcp.PromptsCapability{}, }, }, ) // Register tools tools.RegisterTools(server) // Run server transport := &mcp.StdioTransport{} if err := server.Run(ctx, transport); err != nil { log.Fatalf("Server error: %v", err) } }
gopackage tools import ( "context" "fmt" "github.com/modelcontextprotocol/go-sdk/mcp" ) type Tool1Input struct { Param1 string `json:"param1" jsonschema:"required,description=First parameter"` Param2 int `json:"param2,omitempty" jsonschema:"description=Optional second parameter"` } type Tool1Output struct { Result string `json:"result" jsonschema:"description=The result of the operation"` Status string `json:"status" jsonschema:"description=Operation status"` } func Tool1Handler(ctx context.Context, req *mcp.CallToolRequest, input Tool1Input) ( *mcp.CallToolResult, Tool1Output, error, ) { // Validate input if input.Param1 == "" { return nil, Tool1Output{}, fmt.Errorf("param1 is required") } // Check context if ctx.Err() != nil { return nil, Tool1Output{}, ctx.Err() } // Perform operation result := fmt.Sprintf("Processed: %s", input.Param1) return nil, Tool1Output{ Result: result, Status: "success", }, nil } func RegisterTool1(server *mcp.Server) { mcp.AddTool(server, &mcp.Tool{ Name: "tool1", Description: "Description of what tool1 does", }, Tool1Handler, ) }
gopackage tools import "github.com/modelcontextprotocol/go-sdk/mcp" func RegisterTools(server *mcp.Server) { RegisterTool1(server) RegisterTool2(server) // Register additional tools here }
gopackage config import "os" type Config struct { ServerName string Version string LogLevel string } func Load() *Config { return &Config{ ServerName: getEnv("SERVER_NAME", "{{PROJECT_NAME}}"), Version: getEnv("VERSION", "v1.0.0"), LogLevel: getEnv("LOG_LEVEL", "info"), } } func getEnv(key, defaultValue string) string { if value := os.Getenv(key); value != "" { return value } return defaultValue }
gopackage main import ( "context" "testing" "github.com/yourusername/{{PROJECT_NAME}}/tools" ) func TestTool1Handler(t *testing.T) { ctx := context.Background() input := tools.Tool1Input{ Param1: "test", Param2: 42, } result, output, err := tools.Tool1Handler(ctx, nil, input) if err != nil { t.Fatalf("Tool1Handler failed: %v", err) } if output.Status != "success" { t.Errorf("Expected status 'success', got '%s'", output.Status) } if result != nil { t.Error("Expected result to be nil") } }
markdown# {{PROJECT_NAME}} A Model Context Protocol (MCP) server built with Go. ## Description {{PROJECT_DESCRIPTION}} ## Installation \`\`\`bash go mod download go build -o {{PROJECT_NAME}} \`\`\` ## Usage Run the server with stdio transport: \`\`\`bash ./{{PROJECT_NAME}} \`\`\` ## Configuration Configure via environment variables: - `SERVER_NAME`: Server name (default: "{{PROJECT_NAME}}") - `VERSION`: Server version (default: "v1.0.0") - `LOG_LEVEL`: Logging level (default: "info") ## Available Tools ### tool1 {{TOOL1_DESCRIPTION}} **Input:** - `param1` (string, required): First parameter - `param2` (int, optional): Second parameter **Output:** - `result` (string): Operation result - `status` (string): Status of the operation ## Development Run tests: \`\`\`bash go test ./... \`\`\` Build: \`\`\`bash go build -o {{PROJECT_NAME}} \`\`\` ## License MIT
When generating a Go MCP server:
go.mod with proper module path| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-13 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-14 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +77 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.