This is a high level tracking issue.

We want to experiment with exposing MCP server bindings in gopls, so that we can provide rich language features in AI-powered environments. To start, we should expose a narrow set of features, activated through a custom LSP command that starts an SSE transport MCP endpoint (similar to how we activate documentation serving).

CC @adonovan @h9jiang @madelinekalil @samthanawalla

Comment From: gopherbot

Change https://go.dev/cl/670397 mentions this issue: gopls/internal/lsprpc: start mcp server by passing -mcp-listen

Comment From: gopherbot

Change https://go.dev/cl/672056 mentions this issue: gopls/internal/test/marker: add mcp tools action marker

Comment From: gopherbot

Change https://go.dev/cl/674255 mentions this issue: gopls/internal/mcp: add location info to mcp tool input arg

Comment From: gopherbot

Change https://go.dev/cl/675738 mentions this issue: gopls/internal/mcp: add context mcp tool

Comment From: gopherbot

Change https://go.dev/cl/676796 mentions this issue: gopls/internal/mcp: add exported type spec and value spec to context

Comment From: gopherbot

Change https://go.dev/cl/677537 mentions this issue: gopls/internal/mcp: add all symbols from current package

Comment From: gopherbot

Change https://go.dev/cl/677537 mentions this issue: gopls/internal/mcp: add top level symbols from current package

Comment From: changkun

Is there any plans or what's the timeline to release golang.org/x/tools/internal/mcp to public?

Comment From: gopherbot

Change https://go.dev/cl/678155 mentions this issue: gopls/internal/test/marker: organize mcp tool context test

Comment From: h9jiang

Hi @changkun, thank you for your interest in the mcp package. Please refer to the discussion in MCP for the latest update.

Comment From: gopherbot

Change https://go.dev/cl/682515 mentions this issue: gopls/internal/mcp: add diagnostic tool

Comment From: gopherbot

Change https://go.dev/cl/682315 mentions this issue: gopls/internal/mcp: attach text edits to diagnostic if exist

Comment From: gopherbot

Change https://go.dev/cl/681555 mentions this issue: gopls/internal/mcp: add references mcp tool

Comment From: gopherbot

Change https://go.dev/cl/685935 mentions this issue: gopls/internal/mcp: add several tools and organize them by file

Comment From: gopherbot

Change https://go.dev/cl/686376 mentions this issue: gopls/internal/mcp: add a tool for workspace diagnostics

Comment From: gopherbot

Change https://go.dev/cl/686275 mentions this issue: gopls/internal/mcp: add a variant of the references tool

Comment From: gopherbot

Change https://go.dev/cl/686375 mentions this issue: gopls/internal/mcp: use fenced code blocks for context

Comment From: gopherbot

Change https://go.dev/cl/686535 mentions this issue: gopls/internal/mcp: add a symbol search tool

Comment From: gopherbot

Change https://go.dev/cl/686755 mentions this issue: gopls/internal/mcp: tune tools for editing

Comment From: gopherbot

Change https://go.dev/cl/686815 mentions this issue: gopls/internal/mcp: add -logfile and -rpc.trace to the headless server

Comment From: gopherbot

Change https://go.dev/cl/686836 mentions this issue: gopls/doc: more doc tweaks

Comment From: gopherbot

Change https://go.dev/cl/687295 mentions this issue: gopls/internal/mcp: include module paths in workspace summaries

Comment From: gopherbot

Change https://go.dev/cl/687355 mentions this issue: gopls/internal/mcp: more tuning of tools and prompts

Comment From: gopherbot

Change https://go.dev/cl/687435 mentions this issue: gopls/internal/mcp: document MCP for v0.20.0; some CLI improvements