duddn2012/go-mcp-server
3.2
If you are the rightful owner of go-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Go MCP Server is designed to manage and synchronize MCP Tools using a database-driven approach, leveraging a structured architecture and modern technologies.
Go MCP Server
MCP(Model Context Protocol) 서버 구현을 위한 Go 기반 프로젝트입니다.
아키텍처
Handler → Service → Repository → Model
디렉토리 구조
go_mcp_server/
├── cmd/server/ # 애플리케이션 진입점
├── internal/ # 비공개 애플리케이션 코드
│ ├── model/ # 데이터 모델
│ ├── repository/ # 데이터 접근 계층
│ ├── service/ # 비즈니스 로직 계층
│ ├── handler/ # HTTP 핸들러 계층
│ ├── router/ # 라우팅
│ ├── mcp/ # MCP 서버 로직
│ └── infrastructure/ # 인프라 (Config, DB)
├── pkg/ # 공용 라이브러리
└── test/ # 테스트 유틸리티
빌드 및 실행
# 빌드
go build -o mcp-server ./cmd/server
# 실행
./mcp-server
API 엔드포인트
POST /mcp/tools/sync- Tool 동기화GET /mcp- MCP SSE 연결POST /mcp- MCP 요청 처리
개발
테스트
go test ./...
새 기능 추가
internal/model/- 모델 정의internal/repository/- 데이터 접근 인터페이스internal/service/- 비즈니스 로직internal/handler/- HTTP 핸들러internal/router/- 라우트 등록