Codex Gopls
БесплатноНе проверенIntegrates the Go language server (gopls) into Codex, exposing hover, definitions, references, symbols, and diagnostics.
Описание
Integrates the Go language server (gopls) into Codex, exposing hover, definitions, references, symbols, and diagnostics.
README
MCP server for Codex with gopls-backed Go code navigation.
This repository started from a macOS workstation setup where Go, gopls, Node.js, and optionally GVM are already installed. The Go path is the primary target. Solidity support is still present, but it is secondary.
What It Exposes
lsp_hoverlsp_definitionlsp_referenceslsp_document_symbolslsp_workspace_symbolslsp_diagnostics
Assumptions
- OS: macOS
- Shell:
zsh - Codex is already installed and usable
nodeis already installedgois already installedgoplsis already installed- GVM is optional, but this repo is friendliest to GVM-based Go setups
This repository does not provision the runtime for you. It expects the machine to already have the required tooling.
Support Status
Current support should be read conservatively:
- macOS: primary development target
- Linux: core server path validated in CI
- Windows native: core server path validated in CI, but helper scripts are still Unix-oriented
- WSL: more realistic than native Windows today because the helper scripts are Unix-oriented
Important limitation:
- Docker on macOS or Linux is not a real substitute for native Windows validation. For Windows-specific behavior, use a real Windows VM or a Windows CI runner.
CI policy:
- smoke CI tracks the latest stable Go release
- smoke CI installs
gopls@latest - a scheduled workflow reruns the same matrix so upstream Go or
goplschanges are noticed early - older Go versions are not a compatibility target for this repository unless documented otherwise
Install Prerequisites
1. Install Go
Official docs:
On macOS, the simplest path is usually the official installer package from the Go downloads page. After installation, confirm:
go version
which go
2. Install gopls
Official docs:
Install with:
go install golang.org/x/tools/gopls@latest
Then confirm:
gopls version
which gopls
3. Install Node.js
Official docs:
Install Node.js with the official macOS installer or your preferred Node version manager. Then confirm:
node -v
which node
4. Install GVM (Optional)
Official project:
If you want version-aware Go switching through GVM, read the upstream requirements first. The project README documents extra macOS prerequisites such as Xcode Command Line Tools and Mercurial.
Typical macOS prep from the upstream README:
xcode-select --install
brew update
brew install mercurial
Install GVM:
zsh < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
Then reload your shell and confirm:
gvm version
If you want GVM to manage a newer Go version, follow the version bootstrap notes in the upstream README. Those steps change over time and are better taken directly from the source:
How Go Resolution Works
For Go repositories, the server tries to match the repository's toolchain instead of forcing one global version.
It looks for version hints in the nearest repo root, in this order:
go.workgo.mod.go-version.tool-versions
If a matching GVM toolchain exists, it prefers that GOROOT and GOPATH. If not, it falls back to the Go environment already available on the machine.
Writable build state is isolated under /tmp, while the module cache prefers the matching GVM pkg/mod when available so gopls can reuse dependencies that are already present.
Quick Start
Register the MCP server in stdio mode:
codex mcp add lsp \
-- node /absolute/path/to/codex-gopls-mcp/server.js
Daemon Mode
HTTP entry point:
node ./server.js --http
Helper scripts:
- start:
./start-daemon.sh - stop:
./stop-daemon.sh - status:
./status-daemon.sh - config snippet:
./lsp-daemon-config.toml
Example Codex config:
[mcp_servers.lsp]
url = "http://127.0.0.1:3245/mcp"
Optional Solidity Support
Solidity support is optional.
If you want it, install nomicfoundation-solidity-language-server on PATH or pass SOLIDITY_LS_BIN.
Notes
- The helper scripts resolve their own directory, so the repository can be cloned anywhere.
activate-global-lsp.shinstalls the bundled skill from./skills/use-lsp-when-coding/SKILL.mdby default. You can override that withSKILL_SOURCE.- The defaults in this repository reflect one macOS workstation setup. If your machine differs, prefer overriding environment variables instead of patching the server.
- If a required Go version is not installed locally, results depend on the fallback environment that
goplscan reach on that machine. - This repository follows current
goplsreleases rather than pinning an older long-livedgoplsbuild for CI.
Bundled Skill
This repository includes a Codex skill for Go and Solidity code navigation:
./skills/use-lsp-when-coding/SKILL.md
If you run ./activate-global-lsp.sh, that skill is copied into:
$HOME/.codex/skills/use-lsp-when-coding/SKILL.md
Sources
- Go install docs: https://go.dev/doc/install
- Go downloads: https://go.dev/dl/
goplsdocs: https://pkg.go.dev/golang.org/x/tools/goplsgoplssite: https://go.dev/gopls/- Node.js downloads: https://nodejs.org/en/download
- GVM upstream README: https://github.com/moovweb/gvm
- GitHub Actions docs: https://docs.github.com/github/automating-your-workflow-with-github-actions
- Docker docs: https://docs.docker.com/
Установка Codex Gopls
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/bchh-s/codex-gopls-mcpFAQ
Codex Gopls MCP бесплатный?
Да, Codex Gopls MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Codex Gopls?
Нет, Codex Gopls работает без API-ключей и переменных окружения.
Codex Gopls — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Codex Gopls в Claude Desktop, Claude Code или Cursor?
Открой Codex Gopls на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare Codex Gopls with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
