Add MCP support for GitLab provided servers in Remote Execution flows in Agent platform

Problem

Locally executed Agent Platform flows and Agentic Chat have access to MCP (see https://gitlab.com/gitlab-org/gitlab/-/issues/519938) but remotely executed ones don't since they use the Go-Based executor.

Desired Outcome

Add MCP support for remotely executed workflows.

In-Scope:

  1. Local MCP servers (e.g. Playwright, upcoming Knowledge Graph MCP)
  2. MCP server are configured / injected by GitLab into the remote execution environment, not configurable by end users right now.

Out of scope:

  1. Remote MCP servers
  2. End-user configuration of MCP servers

Implementation plan

In this issue, we can focus on the executor implementation, so let's just imagine that mcp.json is already passed via args. The implementation details would be:

  • Accept an mcp.json via args
  • Initialize MCP tools/clients based on the configuration (basically this logic from gitlab-lsp)
  • Pass the MCP tools on StartRequest (gitlab-lsp, agent-platform)
  • Handle RunMCPTool action. We already have a noop handler, but we need to replace it with the implementation that calls a client (gitlab-lsp: call and handler)
Edited by Sebastian Rehm