SP

stablekernel/protoc-gen-go-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

37 stars 2 forks 품질 72 트렌드 26Apache-2.0

프로토콜 버퍼 사양에서 golang에서 mcp 서버를 생성하기위한 protoc 플러그인

개요

protoc gen 고 mcp - 한국어 이것은 프로토콜 버퍼 정의를 기반으로 모델-context-protocol(MCP) 서버를 생성하는 protoc 컴파일러의 Topeka 플러그인입니다. Conceptually, 이것은 AI 모델을 사용하여 기존의 GRPC 코베이스를 사용하여 자연 언어를 사용하여 프로토 타이핑 및 protobuf 기반 코베이스에 대한 LLM 기능의 사용. - 1.20 이상 - protoc 3.20 이상 - protoc-gen-go-grpc 1.71 이상 지정된 명령 사용을위한 Makefile을 체크 아웃. Create을 사용하여 프로토 파일에서 MCP 서버를 생성합니다. 포트 2345에 headless 모드에서 delve debugger를 시작합니다. 디버그의 밑에 파일은 $GOPATH/bin/protoc-gen-go-mcp일 것입니다. 다음과 같이 VSCode에 연결할 수 있습니다. launch.json 구성. mcp-vibe 서버를 mcp 서버에 추가하십시오. 플러그인은 프로토콜 버퍼와 gRPC 서버를 위한 기존의 코드 생성을 사용 하 고 필요한 부품 사용 하 여 그 기반에 구축.

개요(AI 번역)

protoc gen 고 mcp

이것은 프로토콜 버퍼 정의를 기반으로 모델-context-protocol(MCP) 서버를 생성하는 protoc 컴파일러의 Topeka 플러그인입니다. Conceptually, 이것은 AI 모델을 사용하여 기존의 GRPC 코베이스를 사용하여 자연 언어를 사용하여 프로토 타이핑 및 protobuf 기반 코베이스에 대한 LLM 기능의 사용.

# 필수품

  • 이동 1.25 이상 ( 생성 된 코드 가져 오기 필요한 공식 MCP SDK
  • protoc 29.3 (이 버전은 플러그인은 테스트; Makefile을 참조 AGENTS.md)
  • protoc-gen-go v1.36.6 과 protoc gen 고 grpc v1.5.1 (tool]] 지시어 go.mod)

플러그인 실행

지정된 명령 사용을위한 Makefile을 체크 아웃. make generate]을 사용하여 프로토 파일에서 MCP 서버를 생성합니다.

플러그인 디버깅

포트 2345에 headless 모드에서 delve debugger를 시작합니다. 아래 파일 디버그는 $GOPATH/bin/protoc-gen-go-mcp일 것입니다. VSCode에 연결할 수 있습니다. 다음으로 launch.json 구성.

예제 테스트

예제 설치 mcp-vibe 서버

mcp-vibe] 서버에서 mcp 서버로 추가:

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

protoc-gen-go-mcp

This is a Topeka plugin for the protoc compiler that generates a model-context-protocol(MCP) server based on a protocol buffer definition. Conceptually, this allows an AI model to use existing gRPC codebases with natural language, allowing for rapid prototyping and usage of LLM capabilities for protobuf based codebases.

Prerequisites

Running the plugin

Check out the Makefile for explicit command usage. Use make generate to generate the example MCP server from the proto file.

Debugging the plugin

make start-debugger

Will start the delve debugger in headless mode on port 2345. The file under debug will be $GOPATH/bin/protoc-gen-go-mcp. You can connect to that in VSCode with the following launch.json configuration.

{
  "name": "Connect to protoc-gen-go-mcp plugin",
  "type": "go",
  "request": "attach",
  "mode": "remote",
  "remotePath": "${workspaceFolder}",
  "port": 2345,
  "host": "127.0.0.1"
}

Testing the example

Install the example mcp-vibe server

go install ./cmd/mcp-vibe

Add the mcp-vibe server to your mcp servers:

{
  "mcpServers": {
    "vibe": {
      "command": "mcp-vibe"
    }
  }
}

What the plugin generates

A generated NewMCPServer wraps a gRPC client and an *mcp.Server from the official Go MCP SDK. Once you’ve called RegisterDefaultTools() (or registered individual tools, see below), serve that *mcp.Server the way any MCP server is served. The two most common transports:

// client is a examplev1.VibeServiceClient for the backend gRPC service, e.g.
// examplev1.NewVibeServiceClient(conn) for a grpc.ClientConn.

// Over stdio, for CLI-launched MCP clients (see cmd/mcp-vibe/main.go for the
// full, runnable version of this).
stdioServer := mcp.NewServer(&mcp.Implementation{Name: "vibe", Version: "0.0.1"}, nil)
examplev1.NewVibeServiceMCPServer(client, stdioServer).RegisterDefaultTools()
if err := stdioServer.Run(ctx, &mcp.StdioTransport{}); err != nil {
	panic(err)
}
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "vibe": { "command": "mcp-vibe" } } }