
zeromicro/mcp-zero
Database managementЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
zeromicro/mcp-zero - это кандидат на сервер MCP, импортированный из https://github.com/zeromicro/mcp-zero.
Обзор
zeromicro/mcp-zero - это кандидат на сервер MCP, импортированный из https://github.com/zeromicro/mcp-zero.
Обзор (машинный перевод)
Инструмент Model Context Protocol (MCP), который помогает разработчикам быстро смоделировать и с легкостью создавать проекты с нулевым разрешением.
Быстрый старт
Новый для mcp-zero? Ознакомьтесь с нашим руководством по быстрому запуску для пошагового руководства по началу работы!
Быстрый старт охватывает:
- Установка и настройка Создайте свой первый API-сервис
- Случаи общего использования и рабочие процессы Интеграция с Claude Desktop
Особенности
###Поколение сервисов
Создание API-сервисов: Создание новых сервисов REST API с настраиваемыми портами и стилями Создать сервис RPC: Создание служб GRPC из определений протобуфа Сгенерировать код API: конвертировать файлы спецификации API в код Go ** Генерировать модели**: Создание моделей баз данных из различных источников (MySQL, PostgreSQL, MongoDB, DDL) Создание спецификаций API: генерация типовых файлов спецификаций API
Расширенные возможности
** Анализ проектов**: Анализ существующих нулевых проектов для понимания структуры и зависимостей ** Управление конфигурацией**: Создание конфигурационных файлов с надлежащей проверкой структуры Generate Templates: Создание промежуточного ПО, обработчиков ошибок и шаблонов развертывания
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
Go-Zero MCP Tool
A Model Context Protocol (MCP) tool that helps developers quickly scaffold and generate go-zero projects with ease.
Quick Start
New to mcp-zero? Check out our Quick Start Guide for a step-by-step tutorial on getting started!
The quickstart covers:
- Installation and configuration
- Creating your first API service
- Common use cases and workflows
- Integration with Claude Desktop
Features
Core Service Generation
- Create API Services: Generate new REST API services with customizable ports and styles
- Create RPC Services: Generate gRPC services from protobuf definitions
- Generate API Code: Convert API specification files to Go code
- Generate Models: Create database models from various sources (MySQL, PostgreSQL, MongoDB, DDL)
- Create API Specs: Generate sample API specification files
Advanced Features
- Analyze Projects: Analyze existing go-zero projects to understand structure and dependencies
- Manage Configuration: Generate configuration files with proper structure validation
- Generate Templates: Create middleware, error handlers, and deployment templates
- Query Documentation: Access go-zero concepts and migration guides from other frameworks
- Validate Input: Comprehensive validation for API specs, protobuf definitions, and configurations
Prerequisites
-
Go (1.19 or later)
-
go-zero CLI (goctl): Install with
go install github.com/zeromicro/go-zero/tools/goctl@latest -
Claude Desktop (or other MCP-compatible client)
For detailed installation instructions, see the Quick Start Guide.
Installation
-
Create a new directory for your MCP tool:
mkdir go-zero-mcp && cd go-zero-mcp -
Initialize Go module:
go mod init go-zero-mcp -
Install dependencies:
go get github.com/modelcontextprotocol/go-sdk go get gopkg.in/yaml.v3 -
Save the main tool code as
main.go -
Build the tool:
go build -o go-zero-mcp main.go
Configuration for Claude Desktop
Add this configuration to your Claude Desktop MCP settings:
macOS
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"mcp-zero": {
"command": "/path/to/your/mcp-zero",
"env": {
"GOCTL_PATH": "/Users/yourname/go/bin/goctl"
}
}
}
}
Linux
Edit ~/.config/Claude/claude_desktop_config.json:
{
"mcpServers": {
"mcp-zero": {
"command": "/path/to/your/mcp-zero",
"env": {
"GOCTL_PATH": "/usr/local/bin/goctl"
}
}
}
}
Windows
Edit %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"mcp-zero": {
"command": "C:\\path\\to\\your\\mcp-zero.exe",
"env": {
"GOCTL_PATH": "C:\\Go\\bin\\goctl.exe"
}
}
}
}
Available Tools
1. create_api_service
Установка
This server does not publish a one-line install command.
Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →Конфигурация
{
"mcpServers": {
"mcp-zero": {
"command": "/path/to/your/mcp-zero",
"env": {
"GOCTL_PATH": "/Users/yourname/go/bin/goctl"
}
}
}
}