Series Context: Part 4 of 10 in GitLab Core Engineering: Architecture, MCP & CI/CD Deep Dives .
Featured MR: gitlab-org/gitlab!264856 · Work Item: #635913
Turning Existing REST Endpoints into MCP Tools Without Duplicating Business Logic
Not every GitLab Model Context Protocol (MCP) tool needs a custom GraphQL service class under app/services/mcp/tools/ . When a Battle-Tested Grape REST endpoint already enforces rate limits, authorization ( authorize! ), pagination, and entity serialization, GitLab lets you expose it declaratively via Mcp::Tools::Base::ApiTool and API::Concerns::McpAccess .
In !264856 , we exposed GET /projects/:id/pipeline_schedules ( lib/api/ci/pipeline_schedules.rb ) as the read-only list_pipeline_schedules tool inside the :ci toolset. On paper, that takes 11 lines of Ruby.…