MCP LSP ゴー
Claude のような AI アシスタントが Go の Language Server Protocol (LSP) と対話し、高度な Go コード分析機能のメリットを享受できるようにする Model Context Protocol (MCP) サーバー。
概要
この MCP サーバーは、AI アシスタントが次のことを実行できるように支援します。
- LSPを使ってGoコードを分析する
- 定義に移動して参照を見つける
- コード診断をチェックする
- シンボルのホバー情報を取得する
- 補完候補を取得する
建築
このプロジェクトでは、mark3labs/mcp-goライブラリを使用してモデルコンテキストプロトコル(MCP)を実装しています。MCPとの統合により、AIアシスタントとGoツール間のシームレスな通信が可能になります。
サーバーは、言語サーバー プロトコル (LSP) を介して、Go の公式言語サーバーであるgoplsと通信します。
特徴
- LSP 統合: コード分析のための Go の言語サーバー プロトコルへの接続
- コードナビゲーション: コード内の定義と参照を見つける
- コード品質: 診断とエラーの取得
- 詳細情報: ホバー情報と補完候補
プロジェクト構造
インストール
カーソルに追加
MCPツール
MCP サーバーは次のツールを提供します。
道具 | 説明 |
---|---|
go_to_definition | シンボルの定義に移動する |
find_references | シンボルへのすべての参照を検索する |
check_diagnostics | ファイルの診断情報を取得する |
get_hover_info | シンボルの詳細情報を取得する |
get_completion | 位置の完了候補を取得する |
analyze_coverage | Goコードのテストカバレッジを分析する |
使用例
MCP をサポートする AI アシスタントでサーバーを使用する:
発達
前提条件
- Go 1.24以上
- gopls がインストールされていること (
go install golang.org/x/tools/gopls@latest
)
ライセンス
Apacheライセンス2.0
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Claude のような AI アシスタントが Go の Language Server Protocol (LSP) と対話し、高度な Go コード分析機能のメリットを享受できるようにする Model Context Protocol (MCP) サーバー。
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP (Model Context Protocol) server that integrates with the ArgoCD API, enabling AI assistants and large language models to manage ArgoCD applications and resources through natural language interactions.Last updated -1010PythonMIT License
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server that allows AI agents like Claude to interact with the Aligo SMS API to send text messages and retrieve related information.Last updated -1JavaScriptMIT License
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server for LeetCode that enables AI assistants to access LeetCode problems, user information, and contest data.Last updated -73621TypeScriptMIT License
- AsecurityAlicenseAqualityA foundation for building custom local Model Context Protocol (MCP) servers that provide tools accessible to AI assistants like Cursor or Claude Desktop.Last updated -126TypeScriptMIT License