-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Describe the feature or problem you'd like to solve
There's currently no way for AI agents to manage repository collaborator access through the MCP server. The GitHub REST API supports adding collaborators via PUT /repos/{owner}/{repo}/collaborators/{username}, but this capability isn't exposed as a tool.
This makes it impossible for agents to help with common repository administration tasks like granting access to contractors, onboarding team members to private repos, or managing permissions for open source contributors.
Proposed solution
Add a new add_repository_collaborator tool to the repos toolset that wraps the Add a repository collaborator API.
Parameters:
owner(required): Repository ownerrepo(required): Repository nameusername(required): Username of the collaborator to addpermission(optional): Permission level to grant -pull,triage,push,maintain, oradmin(defaults topush)
Returns: Confirmation message indicating whether an invitation was sent or if the user already has access.
This complements existing repo management tools like create_repository, fork_repository, and create_branch.
Example prompts or workflows (for tools/toolsets only)
- "Add @contractor-jane to my private repo
acme/secret-projectwith read-only access" - "Grant @New-Hire push access to
myorg/backend-service" - "Give @security-auditor maintain permissions on
myorg/infrastructure" - "Add the following users to my repo with triage access: @alice, @bob, @charlie"
- "Onboard @intern-2025 to all my private repos with pull access"
Additional context
I have an implementation ready that follows existing patterns in the codebase, including comprehensive tests. Happy to submit a PR if this feature is accepted.