Add list_projects MCP tool
What does this MR do and why?
The GitLab MCP server has no primitive for listing projects. Agents building a
project picker, or trying to resolve which project a user means, have to either
hard code IDs and paths or fall back to the generic search tool, which requires
a search term and cannot filter by group, visibility, or archived state.
This adds a GraphQL-backed list_projects tool, built on Query.projects
(Resolvers::ProjectsResolver), supporting optional group scoping (group_id,
accepting either a numeric ID or a full path), search, visibility, and
archived filters, with cursor pagination (first/after).
References
How to set up and validate locally
- Restart
rails-websoMcp::Tools::Managerpicks up the new registration. - Call
tools/listonPOST /api/v4/mcpwith a personal access token that has themcpscope, and confirmlist_projectsis advertised. - Call
tools/callwith{ "name": "list_projects", "arguments": { "group_id": "gitlab-org", "first": 5 } }and confirm it returns projects under that group.
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.