Stop LLMs guessing Go types.
gopls-mcp replaces expensive text search with compiler-backed precision, saving tokens, cutting latency, and preserving your agent’s critical attention span.
MCP Provides Accurate Context to LLM
Section titled “MCP Provides Accurate Context to LLM”gopls-mcp offers fast and semantic accurate codebase analysis, perserves LLM attention and save your tokens.
main.go
Ln 4 4 x := 42 // unused
MCP PROTOCOL TRACE
>> OUT (Request)
call_tool: go_build_check
<< IN (Response)
diagnostics: [
{ file: "main.go:4", "message: "declared and not used: x" }
]
user.go
Ln 18 18 func (u *User) Save() error
MCP PROTOCOL TRACE
>> OUT (Request)
call_tool: go_symbol_references
locator: { symbol_name: "Save", context_file: "user.go" }
locator: { symbol_name: "Save", context_file: "user.go" }
<< IN (Response)
references: [
"login.go:42", "handler.go:15", "service.go:78"
]
main.go
Ln 12 12 sum := Add(1, 2)
MCP PROTOCOL TRACE
>> OUT (Request)
call_tool: go_definition
locator: { symbol_name: "Add", context_file: "main.go" }
locator: { symbol_name: "Add", context_file: "main.go" }
<< IN (Response)
{ signature: "func Add(a, b int) int", file: "math.go:15" }
main.go
Ln 5 5 func main() {
MCP PROTOCOL TRACE
>> OUT (Request)
call_tool: go_get_call_hierarchy
locator: { symbol_name: "main" }, direction: "outgoing"
locator: { symbol_name: "main" }, direction: "outgoing"
<< IN (Response)
outgoing_calls: [
"helperA() @ main.go:10",
"helperB() @ main.go:14"
]
"helperB() @ main.go:14"