MCP Catalogs
首页

mcp-zero

by zeromicro·42·综合分 44

用于 go-zero 框架的 MCP 服务器,可生成 API、RPC 服务和模型。

developer-toolsai-llmproductivity
12
Forks
2
活跃 Issue
4 个月前
最近提交
2 天前
收录于

概述

mcp-zero 是一个专门为 Go 的 go-zero 框架设计的全面 Model Context Protocol 服务器。它使开发人员能够通过 AI 辅助快速搭建和生成完整的 go-zero 项目。该服务器提供 10 种专用工具,用于创建 API 服务、RPC 服务、模型、API 规范、配置、模板等。它与 Claude Desktop 集成,并利用 go-zero 的 goctl CLI 工具生成生产就绪的代码。

试试问 AI

装完之后,这里有 5 个你可以让 AI 做的事:

:快速生成新的 go-zero API 和 RPC 服务,只需最少的设置
:从现有架构或 DDL 文件自动创建数据库模型
:在生成之前验证 API 规范和 protobuf 定义
:使用 mcp-zero 需要什么先决条件?
:mcp-zero 能否从不同的数据库生成模型?

什么时候选它

当您使用 go-zero 框架并希望通过 AI 辅助代码生成加速开发时选择此工具。

什么时候不要选它

如果您不使用 go-zero 框架或偏好没有 AI 辅助的手动编码,请不要选择此工具。

此 server 暴露的工具

从 README 抽取出 10 个工具
  • create_api_service

    Creates a new go-zero API service.

  • create_rpc_service

    Creates a new go-zero RPC service from protobuf definition.

  • generate_api_from_spec

    Generates go-zero API code from an API specification file.

  • generate_model

    Generates database model code from database schema.

  • create_api_spec

    Creates a sample API specification file.

  • analyze_project

    Analyzes an existing go-zero project structure and dependencies.

  • generate_config

    Generates configuration files for go-zero services.

  • generate_template

    Generates common code templates for go-zero services.

  • query_docs

    Queries go-zero documentation and migration guides.

  • validate_input

    Validates API specs, protobuf definitions, or configuration files.

可对比工具

goctl-clizero-mvc-generator

安装

安装

  1. 为您的 MCP 工具创建新目录:

``bash mkdir go-zero-mcp && cd go-zero-mcp ``

  1. 初始化 Go 模块:

``bash go mod init go-zero-mcp ``

  1. 安装依赖项:

``bash go get github.com/modelcontextprotocol/go-sdk go get gopkg.in/yaml.v3 ``

  1. 将主工具代码保存为 main.go
  1. 构建工具:

``bash go build -o mcp-zero main.go ``

  1. 配置 Claude Desktop:

将此配置添加到您的 Claude Desktop MCP 设置中: ``json { "mcpServers": { "mcp-zero": { "command": "/path/to/your/mcp-zero", "env": { "GOCTL_PATH": "/path/to/goctl" } } } } ``

FAQ

使用 mcp-zero 需要什么先决条件?
您需要 Go(1.19 或更高版本)、go-zero CLI(goctl)和 Claude Desktop(或其他兼容的 MCP 客户端)。
mcp-zero 能否从不同的数据库生成模型?
是的,它支持从 MySQL、PostgreSQL、MongoDB 和 DDL 文件生成模型。

mcp-zero 对比

GitHub →

最后更新于 · 由 README + GitHub 公开数据自动生成。