Add list_members tool to gitlab server #1663
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Added a new list_members tool to the GitLab MCP server that allows users to retrieve member information from GitLab projects. The tool supports pagination and can optionally include members inherited from parent groups.
Server Details
Motivation and Context
GitLab projects often involve collaboration among team members with different access levels. This tool enables LLMs to list project members, understand team composition, and access permission levels, facilitating better collaboration awareness during conversations about GitLab projects.
How Has This Been Tested?
Tested with Claude using both direct project members and inherited members scenarios. Verified proper pagination works and that the proper GitLab API endpoints are called depending on whether inheritance is requested.
Breaking Changes
No breaking changes. This is an additive feature that doesn't modify existing functionality.
Types of changes
Checklist
Additional context
The implementation handles both direct project members (/members) and inherited members (/members/all) through the GitLab API. The response is typed using a Zod schema to ensure type safety and consistent response structure. Error handling includes appropriate HTTP error codes with status text for better debugging.