go-zero
Model Context Protocol (MCP) server for go-zero framework - Generate APIs, RPC services, and models with AI assistance.
What is go-zero?
go-zero is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol (mcp) server for go-zero framework - generate apis, rpc services, and models with ai assistance.
Model Context Protocol (MCP) server for go-zero framework - Generate APIs, RPC services, and models with AI assistance.
This server falls under the Coding Agents category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Model Context Protocol (MCP) server for go-zero framework -
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-zeroConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use go-zero
The mcp-zero MCP server brings AI-powered scaffolding to the go-zero microservices framework, letting Claude and other LLMs generate REST API services, gRPC RPC services, database models, and configuration files through natural language instructions. It wraps go-zero's goctl CLI tool with a suite of 10 MCP tool endpoints covering creation, generation, analysis, and validation of go-zero projects. Developers building Go microservices can use it to bootstrap new services, understand existing project structure, and generate boilerplate without memorizing goctl syntax.
Prerequisites
- Go 1.19 or later installed
- go-zero CLI (goctl) installed: go install github.com/zeromicro/go-zero/tools/goctl@latest
- The mcp-zero binary built from source (see steps below)
- Claude Desktop or another MCP-compatible client
Install goctl, the go-zero code generator
The mcp-zero server delegates all code generation to goctl. Install it globally with the go install command.
go install github.com/zeromicro/go-zero/tools/goctl@latestClone the mcp-zero repository
Clone the repository and enter the project directory to prepare for building the server binary.
git clone https://github.com/zeromicro/mcp-zero.git
cd mcp-zeroBuild the MCP server binary
Compile the Go source into an executable binary that Claude Desktop will launch.
go build -o mcp-zero main.goNote the absolute path to the binary
Record the absolute path to the compiled binary — you will need it in the MCP client configuration. Use pwd to confirm your current directory.
pwd
# Example output: /Users/yourname/projects/mcp-zeroConfigure Claude Desktop
Add the server to your Claude Desktop MCP configuration, setting the GOCTL_PATH environment variable so the server can find goctl.
Test with a code generation request
Open Claude Desktop and ask it to create a new go-zero API service to confirm the server is working.
go-zero Examples
Client configuration
Add this block to your claude_desktop_config.json (macOS path shown). Replace the command path and GOCTL_PATH with your actual values.
{
"mcpServers": {
"mcp-zero": {
"command": "/Users/yourname/projects/mcp-zero/mcp-zero",
"env": {
"GOCTL_PATH": "/Users/yourname/go/bin/goctl"
}
}
}
}Prompts to try
Use these prompts in Claude Desktop after the server is configured to scaffold go-zero projects with AI assistance.
- "Create a new go-zero REST API service called user-service running on port 8080."
- "Generate a gRPC RPC service called order-service from this protobuf definition: [paste proto here]."
- "Generate Go database models from this MySQL DDL: [paste DDL here]."
- "Analyze my existing go-zero project at /Users/me/projects/myapp and explain its structure."
- "How do I implement JWT authentication in go-zero?"
- "Validate this API spec file at /Users/me/service.api with strict mode enabled."Troubleshooting go-zero
goctl command not found when running the server
Ensure goctl is installed and accessible. Run goctl --version to verify. If the binary is not in the default PATH, set the GOCTL_PATH environment variable in the MCP config to the absolute path of the goctl binary (e.g., /Users/yourname/go/bin/goctl).
Permission denied when Claude tries to execute the mcp-zero binary
Make the binary executable: run chmod +x /path/to/mcp-zero. Also confirm that the path in the MCP configuration matches the exact location of the compiled binary.
Code generation fails with database connection errors
When generating models from a live database, ensure the database is running and accessible from your machine. For DDL-based generation, provide the DDL content directly rather than a live connection string to avoid network dependencies.
Frequently Asked Questions about go-zero
What is go-zero?
go-zero is a Model Context Protocol (MCP) server that model context protocol (mcp) server for go-zero framework - generate apis, rpc services, and models with ai assistance. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install go-zero?
Follow the installation instructions on the go-zero GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with go-zero?
go-zero works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is go-zero free to use?
Yes, go-zero is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
go-zero Alternatives — Similar Coding Agents Servers
Looking for alternatives to go-zero? Here are other popular coding agents servers you can use with Claude, Cursor, and VS Code.
Dify
★ 142.2kProduction-ready platform for agentic workflow development.
Ruflo
★ 54.0k🌊 The leading agent orchestration platform for Claude. Deploy intelligent multi-agent swarms, coordinate autonomous workflows, and build conversational AI systems. Features enterprise-grade architecture, self-learning swarm intelligence, RAG integrat
Goose
★ 45.7kan open source, extensible AI agent that goes beyond code suggestions - install, execute, edit, and test with any LLM
Antigravity Awesome Skills
★ 38.3kInstallable GitHub library of 1,400+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.
AgentScope
★ 25.5kBuild and run agents you can see, understand and trust.
Serena
★ 24.5kA coding agent toolkit that provides IDE-like semantic code retrieval and editing tools, enabling LLMs to efficiently navigate and modify codebases using symbol-level operations instead of basic file reading and string replacements.
Browse More Coding Agents MCP Servers
Explore all coding agents servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up go-zero in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use go-zero?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.