- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.9k
Description
Description
The GitHub MCP server is currently missing critical organization membership management capabilities that are available in the GitHub REST API. Specifically, there are no tools to list all members of an organization or to list outside collaborators, making it impossible for AI agents to perform basic organization administration tasks.
Problem Statement
Missing Functionality
The MCP server lacks tools for two fundamental organization management operations:
- List Organization Members - No equivalent to GET /orgs/{org}/members
- List Outside Collaborators - No equivalent to GET /orgs/{org}/outside_collaborators
Current Limitations
The only available member-related tool is get_team_members, which:
- ✅ Lists members of a specific team
- ❌ Cannot list all organization members
- ❌ Cannot list members not assigned to any team
- ❌ Cannot list outside collaborators
- ❌ Requires knowing team names in advance
This creates a significant gap for organization management workflows.
Use Cases
AI agents cannot currently handle these common requests:
User Questions That Fail:
❌ "How many total members are in our organization?"
❌ "List all members of organization X"
❌ "Show me all outside collaborators"
❌ "Who has access to our organization?"
❌ "Count total users with organization access"
Workaround Limitations:
The only current workaround is to:
- Call get_teamsto list all teams
- Call get_team_membersfor each team individually
- Manually deduplicate members across teams
Problems with this approach:
- Requires dozens to hundreds of API calls (our org: 29 teams)
- Misses members not assigned to any team
- Cannot identify outside collaborators at all
- Extremely slow (2-3+ minutes for large orgs)
- Hits rate limits quickly
API Evidence
Direct GitHub API (Works Perfectly)
Both endpoints exist, are well-documented, and work with standard read:org scope:
1. List Organization Members:
curl -H "Authorization: Bearer $TOKEN" \
  https://api.github.com/orgs/X/members
# Response: 30 members
[
  {"login": "xyz", ...},
  {"login": "pqr", ...},
  ...
]2. List Outside Collaborators:
curl -H "Authorization: Bearer $TOKEN" \
  https://api.github.com/orgs/X/outside_collaborators
# Response: 30 outside collaborators
[
  {"login": "abc", ...},
  {"login": "efg", ...},
  ...
]MCP Server (Missing Tools)
Current tools in /x/all endpoint (61 total):
✅ get_team_members      - Lists members of a specific team
✅ get_teams             - Lists teams in an org
✅ search_orgs           - Searches for organizations
✅ search_users          - Searches for users globally
❌ list_org_members      - MISSING
❌ list_outside_collaborators - MISSING
Proposed Solution
Tool 1: list_org_members
Description:
List all members of an organization.
API Endpoint:
GET /orgs/{org}/members
Input Schema:
{
  "org": {
    "type": "string",
    "description": "The organization name",
    "required": true
  },
  "role": {
    "type": "string",
    "description": "Filter by role: all, admin, member",
    "enum": ["all", "admin", "member"],
    "default": "all"
  },
  "per_page": {
    "type": "integer",
    "description": "Results per page (max 100)",
    "default": 30
  },
  "page": {
    "type": "integer",
    "description": "Page number for pagination",
    "default": 1
  }
}Output:
[
  {
    "login": "username",
    "id": 12345,
    "avatar_url": "https://...",
    "type": "User",
    "site_admin": false
  }
]Required Permissions:
- Token scope: read:org
- User must be a member of the organization
Read-only: ✅ Yes
Tool 2: list_outside_collaborators
Description:
List all outside collaborators of an organization (users with access to organization repositories but not members).
API Endpoint:
GET /orgs/{org}/outside_collaborators
Input Schema:
{
  "org": {
    "type": "string",
    "description": "The organization name",
    "required": true
  },
  "per_page": {
    "type": "integer",
    "description": "Results per page (max 100)",
    "default": 30
  },
  "page": {
    "type": "integer",
    "description": "Page number for pagination",
    "default": 1
  }
}Output:
[
  {
    "login": "external-user",
    "id": 67890,
    "avatar_url": "https://...",
    "type": "User",
    "site_admin": false
  }
]Required Permissions:
- Token scope: read:org
- User must be an organization owner
Read-only: ✅ Yes
Technical Details
Compatibility
- Both tools work with existing read:orgscope (already required for GitHub MCP)
- Both are read-only operations (safe for /x/all/readonlyendpoint)
- Both support pagination (handle large organizations)
- Both follow existing GitHub REST API conventions
Implementation Notes
- Similar to existing tools like get_teams,search_users
- No new permissions required
- Consistent with MCP tool naming patterns
- Can be included in default toolset or organizations toolset
Real-World Impact
Before (Current State):
User: "How many members in oodlestechnologies org?"
AI: "I don't have the ability to list all organization members.
     I can only list team members if you provide a team name."
After (With Proposed Tools):
User: "How many members in oodlestechnologies org?"
AI: [Calls list_org_members]
    "There are 30 members in the oodlestechnologies organization."
Additional Context
Environment
- GitHub MCP Server endpoint: https://api.githubcopilot.com/mcp/x/all/readonly
- Current tool count: 61 tools
- Token scopes tested: read:org, read:user, repo
Verified Working APIs
I've confirmed both APIs work correctly with standard organizational access:
- /orgs/{org}/members- Returns complete member list
- /orgs/{org}/outside_collaborators- Returns complete collaborator list
Related Tools
These tools would complement existing organizational tools:
- get_teams- Already exists
- get_team_members- Already exists
- list_org_members- MISSING (requested)
- list_outside_collaborators- MISSING (requested)
References
- GitHub REST API - Organization Members: https://docs.github.com/en/rest/orgs/members
- GitHub REST API - Outside Collaborators: https://docs.github.com/en/rest/orgs/outside-collaborators
- MCP Protocol Specification: https://modelcontextprotocol.io/
Summary
Adding list_org_members and list_outside_collaborators tools would:
✅ Enable basic organization administration via AI agents
✅ Eliminate the need for dozens of individual team member calls
✅ Provide access to outside collaborators (currently impossible)
✅ Use existing read-only APIs with no new permissions
✅ Follow MCP tool design patterns
✅ Improve AI agent capabilities for organization management
This is a high-impact, low-complexity addition that addresses a fundamental gap in organizational management capabilities.
Thank you for considering this feature request!