MCP LSP Go
Claude와 같은 AI 어시스턴트가 Go의 LSP(언어 서버 프로토콜)와 상호 작용하고 고급 Go 코드 분석 기능의 이점을 누릴 수 있게 해주는 MCP(모델 컨텍스트 프로토콜) 서버입니다.
개요
이 MCP 서버는 AI 도우미가 다음을 수행하는 데 도움을 줍니다.
LSP를 사용하여 Go 코드 분석
정의로 이동하고 참조를 찾으세요
코드 진단 확인
심볼에 대한 호버 정보 가져오기
완료 제안 받기
Related MCP server: mcp-server-leetcode
건축학
이 프로젝트는 mark3labs/mcp-go 라이브러리를 사용하여 모델 컨텍스트 프로토콜(MCP)을 구현합니다. MCP 통합을 통해 AI 어시스턴트와 Go 도구 간의 원활한 통신이 가능합니다.
서버는 언어 서버 프로토콜(LSP)을 통해 Go의 공식 언어 서버인 gopls 와 통신합니다.
특징
LSP 통합 : 코드 분석을 위한 Go 언어 서버 프로토콜 연결
코드 탐색 : 코드에서 정의 및 참조 찾기
코드 품질 : 진단 및 오류 얻기
고급 정보 : 호버 정보 및 완성 제안
프로젝트 구조
지엑스피1
설치
go install github.com/hloiseaufcms/mcp-gopls/cmd/mcp-gopls@latest커서에 추가
{
"mcpServers": {
"mcp-gopls": {
"command": "mcp-gopls"
}
}
} MCP 도구
MCP 서버는 다음과 같은 도구를 제공합니다.
도구 | 설명 |
| 기호 정의로 이동 |
| 기호에 대한 모든 참조 찾기 |
| 파일 진단 받기 |
| 심볼에 대한 자세한 정보를 얻으세요 |
| 직위별 완료 제안 받기 |
| Go 코드에 대한 테스트 커버리지 분석 |
사용 예
MCP를 지원하는 AI 어시스턴트와 함께 서버 사용:
# Ask the AI to get information about the code
Can you find the definition of the `ServeStdio` function in this project?
# Ask for diagnostics
Are there any errors in my main.go file?
# Ask for information about a symbol
What does the Context.WithTimeout function do in Go?개발
git clone https://github.com/hloiseaufcms/mcp-gopls.git
cd mcp-gopls
go mod tidy
go build -o mcp-gopls cmd/mcp-gopls/main.go
./mcp-gopls필수 조건
1.24 이상으로 가세요
gopls 설치됨 (
go install golang.org/x/tools/gopls@latest)
특허
아파치 라이선스 2.0
This server cannot be installed
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.