Skip to content

Add list_members tool to gitlab server #1663

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

shams858
Copy link

@shams858 shams858 commented May 4, 2025

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

  • Server: gitlab
  • Changes to: tools

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

  • Bug fix (non-breaking change which fixes an issue)
  • [ x] New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • [ x] I have read the MCP Protocol Documentation
  • [ x] My changes follows MCP security best practices
  • [ x] I have updated the server's README accordingly
  • [ x] I have tested this with an LLM client
  • [ x] My code follows the repository's style guidelines
  • [ x] New and existing tests pass locally
  • [ x] I have added appropriate error handling
  • [ x] I have documented all environment variables and configuration options

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.

@shams858 shams858 changed the title feat: gitlab server list members of a project Add list_members tool to gitlab server May 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant