go-zero

v1.0.0Coding Agentsstable

Model Context Protocol (MCP) server for go-zero framework - Generate APIs, RPC services, and models with AI assistance.

ai-toolscode-generationgo-zerogolanggrpc
Share:
42
Stars
0
Downloads
0
Weekly
0/5

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

Generate APIs and RPC services with AI assistance.
Create models and microservices using go-zero framework.
zeromicro

Maintainer

LicenseMIT
Languagego
Versionv1.0.0
UpdatedMay 13, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-zero

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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@latest
2

Clone 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-zero
3

Build the MCP server binary

Compile the Go source into an executable binary that Claude Desktop will launch.

go build -o mcp-zero main.go
4

Note 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-zero
5

Configure Claude Desktop

Add the server to your Claude Desktop MCP configuration, setting the GOCTL_PATH environment variable so the server can find goctl.

6

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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-zero": { "command": "npx", "args": ["-y", "mcp-zero"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides