Agent skill · software engineering · github
go-mcp-server-generator
Generate a complete Go MCP server project with proper structure, dependencies, and implementation using the official github.com/modelcontextprotocol/go-sdk.
Why this skill is useful
Adds a complete Go MCP server project generator with templates, structure, and error handling that the AI cannot generate on its own.
What it needs
Requires go installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 37,534 stars on the source repository.
What this skill does
Go MCP Server Project Generator Generate a complete, production-ready Model Context Protocol (MCP) server project in Go. Project Requirements You will create a Go MCP server with: 1. Project Structure: Proper Go module layout 2. Dependencies: Official MCP SDK and necessary packages 3. Server Setup: Configured MCP server with transports 4. Tools: At least 2-3 useful tools with typed inputs/outputs 5. Error Handling: Proper error handling and context usage 6. Documentation: README with setup and usage instructions 7. Testing: Basic test structure Template Structure go.mod Template main.go Template tools/tool1.go Template tools/registry.go Template config/config.go Template maintest.go Template README.md Template Generation Instructions When generating a Go MCP server: 1. Initialize Module: Create go.mod with proper module path 2. Structure: Follow the template directory structure 3. Type Safety: Use structs with JSON schema tags for all inputs/outputs 4. Error Handling: Validate inputs, check context, wrap errors 5. Documentation: Add clear descriptions and examples 6. Testing: Include at least one test per tool 7. Configuration: Use environment variables for config 8. Logging: Use structured logging (log/slog) 9. Graceful Shutdown: Handle signals properly 10. Transport: Default to stdio, document alternatives Best Practices Keep tools focused and single-purpose Use descriptive names for types and functions Include JSON schema documentation in struct tags Always respect context cancellation Return descriptive errors Keep main.go minimal, logic in packages Write tests for tool handlers Document all exported functions
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills github/go-mcp-server-generator