Gemini CLI Gopls

v1.0.0Developer Toolsstable

This extension integrates the official MCP of the Go language server (gopls) with Gemini CLI.

gemini-cligemini-cli-extensionsgolanggoplsmcp
Share:
13
Stars
0
Downloads
0
Weekly
0/5

What is Gemini CLI Gopls?

Gemini CLI Gopls is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to this extension integrates the official mcp of the go language server (gopls) with gemini cli.

This extension integrates the official MCP of the Go language server (gopls) with Gemini CLI.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • This extension integrates the official MCP of the Go languag

Use Cases

Integrate Go language server capabilities with Gemini CLI for code analysis.
Enable Go development assistance through AI-powered language server features.
Menghuan1918

Maintainer

LicenseMIT
Languagetypescript
Versionv1.0.0
UpdatedMay 11, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx gemini-cli-gopls

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Gemini CLI Gopls

The Gemini CLI Gopls extension integrates gopls, the official Go language server, into the Gemini CLI via the Model Context Protocol, giving Gemini conversational access to six Go-specific language intelligence tools. It auto-downloads a compatible version of gopls if one is not found on the system PATH, and activates its tools only when a Go project with a go.mod file is detected in the workspace. Go developers using Gemini CLI can leverage it to find symbols, trace references, inspect package APIs, and get diagnostic errors across their entire codebase without switching to a separate IDE.

Prerequisites

  • Gemini CLI installed (https://github.com/google-gemini/gemini-cli)
  • Go toolchain installed — a Go project with a go.mod file in the workspace
  • gopls v0.20.0 or later (the extension auto-downloads it to ~/go/bin if not found)
  • Internet access for the initial gopls download if not already installed
1

Install the extension into Gemini CLI

Use the Gemini CLI extensions install command with the GitHub URL of the gopls extension repository.

gemini extensions install https://github.com/Menghuan1918/gemini-cli-gopls
2

Verify gopls version (optional)

The extension requires gopls v0.20.0 or later for MCP support. Check your installed version. If it is older or missing, the extension will download a compatible version automatically.

gopls version
3

Open a Go project

Navigate to a directory containing a go.mod file. The extension detects the project context and automatically loads the six Go language tools when a workspace is recognized.

cd /path/to/your/go-project
4

Launch Gemini CLI in the project directory

Start the Gemini CLI from your Go project root. The extension's gopls tools will be available automatically since the workspace contains a go.mod file.

gemini
5

Verify the tools are loaded

Ask Gemini to list available tools or try a simple diagnostic query to confirm gopls is connected and the six Go tools are active.

Gemini CLI Gopls Examples

Client configuration

The extension installs itself via the Gemini CLI extensions system — no manual JSON config is needed. The install command registers it automatically.

{
  "extensions": [
    {
      "name": "gemini-cli-gopls",
      "source": "https://github.com/Menghuan1918/gemini-cli-gopls"
    }
  ]
}

Prompts to try

Example Go development prompts to use after the extension is installed and a Go project is open.

- "Run diagnostics on my Go workspace and list all syntax errors"
- "Find all references to the HandleRequest function in this project"
- "What does the http package API look like in this workspace?"
- "Search for the UserService symbol across all Go files"
- "Summarize the cross-file dependencies for the auth package"
- "Show the current Go workspace configuration"

Troubleshooting Gemini CLI Gopls

Tools do not appear — extension loaded but no Go tools available

The tools only activate when Gemini CLI is launched from a directory containing a go.mod file. Ensure you are running `gemini` from the root of a Go module, not a parent directory.

gopls download fails during first launch

The extension downloads gopls to ~/go/bin. Verify you have write permissions to that directory and a working internet connection. Alternatively, install gopls manually: `go install golang.org/x/tools/gopls@latest`.

Diagnostics return no results on a large project

gopls may need time to index the workspace on first run. Wait for the initial analysis to complete before running diagnostics. On very large monorepos, set GOFLAGS=-mod=mod to help gopls resolve dependencies.

Frequently Asked Questions about Gemini CLI Gopls

What is Gemini CLI Gopls?

Gemini CLI Gopls is a Model Context Protocol (MCP) server that this extension integrates the official mcp of the go language server (gopls) with gemini cli. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Gemini CLI Gopls?

Follow the installation instructions on the Gemini CLI Gopls GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Gemini CLI Gopls?

Gemini CLI Gopls works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Gemini CLI Gopls free to use?

Yes, Gemini CLI Gopls is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "gemini-cli-gopls": { "command": "npx", "args": ["-y", "gemini-cli-gopls"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Gemini CLI Gopls?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides