mcp-gopls

mcp-gopls

3.5

If you are the rightful owner of mcp-gopls 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.

A Model Context Protocol (MCP) server that allows AI assistants like Claude to interact with Go's Language Server Protocol (LSP) and benefit from advanced Go code analysis features.

The MCP LSP Go server is designed to facilitate the interaction between AI assistants and Go's Language Server Protocol (LSP). By leveraging the capabilities of the LSP, this server enables AI assistants to perform advanced code analysis on Go projects. It allows for navigation to definitions, finding references, checking code diagnostics, and obtaining hover information and completion suggestions. The server is built using the mark3labs/mcp-go library, ensuring seamless communication between AI assistants and Go tools. It communicates with gopls, the official language server for Go, to provide these features. This integration enhances the ability of AI assistants to understand and interact with Go codebases effectively.

Features

  • LSP Integration: Connection to Go's Language Server Protocol for code analysis
  • Code Navigation: Finding definitions and references in the code
  • Code Quality: Getting diagnostics and errors
  • Advanced Information: Hover information and completion suggestions

Tools

  1. go_to_definition

    Navigate to the definition of a symbol

  2. find_references

    Find all references to a symbol

  3. check_diagnostics

    Get diagnostics for a file

  4. get_hover_info

    Get detailed information about a symbol

  5. get_completion

    Get completion suggestions at a position

  6. analyze_coverage

    Analyze test coverage for Go code