Claude Code Setup
Configure gopls-mcp with Claude Code.
Setup gopls-mcp for Your Project
Section titled “Setup gopls-mcp for Your Project”Ensure claude code is installed, and run command below to add mcp server into claude code.
claude mcp add gopls-mcp -- gopls-mcpYou will see the similar log below if succeed.
Added stdio MCP server gopls-mcp with command: gopls-mcp to local configFile modified: /home/xieyuschen/.claude.json[project: /home/xieyuschen/codespace/gopls-mcproot]Configure Project Instructions (CLAUDE.md)
Section titled “Configure Project Instructions (CLAUDE.md)”Claude needs specific instructions to know when to use the semantic tools. Run this command in your project root to add the rules (safe for both new and existing projects): The script creates the file if it doesn’t exist; preserves content if it does)
curl -sL https://gopls-mcp.org/gopls-mcp.prompt >> CLAUDE.mdVerify gopls-mcp
Section titled “Verify gopls-mcp”Inside claude code, run /mcp command to verify gopls-mcp is availble.
(claude)> /mcpIf the tool is successfully added, you will see similiar output below:
Manage MCP servers 1 server
Local MCPs (/home/xieyuschen/.claude.json [project: /home/xieyuschen/codespace/gopls-mcproot]) ❯ gopls-mcp · ✔ connected
https://code.claude.com/docs/en/mcp for help