gopls-mcp
Semantic Go code navigation and analysis tool using the Language Server Protocol (LSP) for accurate, high-performance project intelligence.
Introduction
gopls-mcp is a specialized agent skill designed for high-precision Go code analysis. By integrating the Go Language Server Protocol (gopls), it allows AI agents to perform deep semantic navigation through complex Go codebases. Unlike standard text-based tools like grep or simple read_file, this tool understands the structure, type system, and references of Go code, making it the required standard for any Go-related engineering task. It enables developers and automated agents to bypass the noise of simple pattern matching to gain direct access to symbols, definitions, and call hierarchies.
-
Precise symbol navigation using go_definition and go_symbols to locate functions, structs, types, and variables instantly.
-
Reliable call-chain tracing through go_references to understand the impact of code changes and dependencies.
-
In-depth inspection via go_hover, which retrieves type signatures, documentation, and metadata directly from the language server.
-
Significant efficiency improvements in token usage by providing structured, relevant code snippets rather than entire file contents.
-
Seamless integration into existing developer workflows as an MCP (Model Context Protocol) server for LLM-based coding assistants.
-
Mandatory usage for all Go (.go) files to ensure accuracy and reduce redundant file reading operations.
-
Requires local installation of the gopls binary in the system PATH and a running gopls-mcp server instance.
-
Operates on a 0-based indexing system for file positions (line and character), which must be strictly followed for accurate navigation.
-
Use go_symbols for project-wide discovery and go_references for impact analysis before performing any refactoring.
-
Designed for software engineers, automation agents, and automated refactoring pipelines requiring structural code awareness rather than surface-level text search.
Repository Stats
- Stars
- 3
- Forks
- 1
- Open Issues
- 1
- Language
- Python
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- May 3, 2026, 08:26 PM