go-mcp-server-generator

Solid

Generate a complete Go MCP server project with proper structure, dependencies, and implementation using the official github.com/modelcontextprotocol/go-sdk.

AI & Automation 34,233 stars 4188 forks Updated today MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 ``` myserver/ ├── go.mod ├── go.sum ├── main.go ├── tools/ │ ├── tool1.go │ └── tool2.go ├── resources/ │ └── resource1.go ├── config/ │ └── config.go ├── README.md └── main_test.go ``` ## go.mod Template ```go module github.com/yourusername/{{PROJECT_NAME}} go 1.23 require ( github.com/modelcontextprotocol/go-sdk v1.0.0 ) ``` ## main.go Template ```go package 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() { ...

Details

Author
github
Repository
github/awesome-copilot
Created
11 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category