Draft: Remove experimental glab mcp serve command

Summary

Removes the experimental glab mcp serve command and all related infrastructure. This command duplicates the GitLab MCP Server, which is the dedicated, supported solution for MCP integration with GitLab.

Users should use the GitLab MCP Server instead.

Changes

Deleted files:

  • internal/commands/mcp/mcp.go - MCP parent command
  • internal/commands/mcp/serve/serve.go - glab mcp serve cobra command
  • internal/commands/mcp/serve/server.go - MCP server implementation
  • internal/commands/mcp/serve/server_test.go - Tests for the server
  • internal/mcpannotations/annotations.go - MCP annotation constants package
  • internal/mcpannotations/annotations_test.go - Tests for annotations
  • docs/source/mcp/_index.md - MCP command docs
  • docs/source/mcp/serve.md - glab mcp serve docs

Modified files:

  • internal/commands/root.go - Remove mcpCmd import and registration
  • go.mod - Remove github.com/modelcontextprotocol/go-sdk dependency
  • internal/commands/api/api.go - Remove mcpannotations import and annotation
  • internal/commands/ci/ci.go - Remove mcpannotations import and annotation
  • internal/commands/ci/get/get.go - Remove mcpannotations import and annotation
  • internal/commands/ci/run/run.go - Remove mcpannotations import and annotation
  • internal/commands/ci/view/view.go - Remove mcpannotations import and annotation
  • internal/commands/changelog/generate/changelog_generate.go - Remove mcpannotations import and annotation
  • internal/commands/duo/ask/ask.go - Remove mcpannotations import and annotation
  • internal/commands/token/rotate/rotate.go - Remove mcpannotations import and annotation

Testing

After merging, run go build ./... to confirm no compilation errors, and make test to verify tests pass.

Note: go mod tidy should also be run to clean up the go.sum file for the removed github.com/modelcontextprotocol/go-sdk dependency and its transitive deps.

Closes https://gitlab.com/gitlab-org/gitlab/-/work_items/588956

Merge request reports

Loading
Loading