
hloiseau/mcp-gopls
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
hloiseau/mcp-gopls는 [[T0]에서 가져온 MCP 서버 후보입니다.
개요
hloiseau/mcp-gopls는 [[T0]에서 가져온 MCP 서버 후보입니다.
개요(AI 번역)
모델 컨텍스트 프로토콜(MCP) 서버로, AI 어시스턴트가 내비게이션, 진단, 테스트, 커버리지 등 Go의 LSP(gopls)를 사용할 수 있게 합니다.
TL; 요약: Claude / 커서 / 부조종사를 Go와 함께 사용하면,
mcp-gopls는 AI에게 완전한 LSP 권한을 부여합니다: 정의, 참조, 호버, 완료,go test, 커버리지,go mod tidy,govulncheck등.
개요
이 MCP 서버는 AI 어시스턴트가 다음을 지원합니다:
- LSP를 사용해 Go 작업 공간을 분석하는 방법
- 정의, 참조, 작업 공간 기호로 탐색
- MCP를 벗어나지 않고 코드 액션을 포맷, 이름 변경, 검사
- Go 테스트, 커버리지,
go mod tidy,govulncheck, 모듈 그래프 명령어를 구조화된 결과로 실행합니다 - 작업 공간 자료(개요 + go.mod) 읽기, 엄선된 프롬프트 소비
상태: 적극적으로 개발 중이며 실제 프로젝트에 사용됨.
Go 1.25.x와gopls@latest로 테스트했습니다.
건축
이 프로젝트는 mark3labs/mcp-go 라이브러리를 사용하여 모델 컨텍스트 프로토콜을 구현합니다. MCP 통합은 AI 어시스턴트와 바둑 도구 간의 원활한 소통을 가능하게 합니다.
서버는 Go의 공식 언어 서버인 gopls와 언어 서버 프로토콜(LSP)을 통해 통신합니다.
특징
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
mcp-gopls – MCP server for Go (gopls)
A Model Context Protocol (MCP) server that lets AI assistants use Go’s LSP (gopls) for navigation, diagnostics, testing, coverage, and more.
TL;DR: If you use Claude / Cursor / Copilot with Go,
mcp-goplsgives the AI full LSP powers: go-to-definition, references, hover, completion,go test, coverage,go mod tidy,govulncheck, etc.
Overview
This MCP server helps AI assistants to:
- Use LSP to analyze Go workspaces
- Navigate to definitions, references, and workspace symbols
- Format, rename, and inspect code actions without leaving MCP
- Run Go tests, coverage,
go mod tidy,govulncheck, and module graph commands with structured results - Read workspace resources (overview + go.mod) and consume curated prompts
Status: Actively developed – used in real projects.
Tested with Go 1.25.x andgopls@latest.
Architecture
This project uses the mark3labs/mcp-go library to implement the Model Context Protocol. The MCP integration enables seamless communication between AI assistants and Go tools.
The server communicates with gopls, the official language server for Go, via the Language Server Protocol (LSP).
Features
- Configurable runtime:
--workspace,--gopls-path,--log-level,--rpc-timeout, and--shutdown-timeoutflags + env vars (MCP_GOPLS_*) - Structured logging: Text/JSON logging with slog and optional file output
- Extended LSP surface: navigation, diagnostics, formatting, rename, code actions, hover, completion, workspace symbols
- Test & tooling helpers: coverage analysis,
go test,go mod tidy,govulncheck,go mod graph - MCP extras: resources (
resource://workspace/overview,resource://workspace/go.mod) and prompts (summarize_diagnostics,refactor_plan) - Progress streaming: long-running commands emit
notifications/progressevents so clients can surface status updates
Feature comparison: mcp-gopls vs built-in gopls MCP
As of gopls v0.20.0, the built-in MCP server exposes these tools:
go_context, go_diagnostics, go_file_context, go_file_diagnostics,
go_file_metadata, go_package_api, go_references, go_rename_symbol,
go_search, go_symbol_references, go_workspace, go_vulncheck.
| Feature / capability | mcp-gopls (this project) | Built-in gopls MCP |
설치
docker run --rm -i \설정
{
"mcpServers": {
"mcp-gopls": {
"command": "mcp-gopls",
"args": ["--workspace", "/absolute/path/to/your/go/project"],
"env": {
"MCP_GOPLS_LOG_LEVEL": "info"
}
}
}
}