Skip to content

Commit 7d1919f

Browse files
tadasantclaude
andcommitted
Use org membership check instead of hardcoded maintainer list
Replace the hardcoded maintainer list with a dynamic GitHub API check for modelcontextprotocol org membership. This allows any org member to trigger @claude without needing to update the workflow file. Requires adding an ORG_MEMBERSHIP_TOKEN secret with read:org scope. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 107113a commit 7d1919f

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

.github/workflows/claude.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,18 @@ jobs:
2525
id-token: write
2626
actions: read
2727
steps:
28-
# Only allow registry maintainers to trigger @claude
29-
# This enables @claude to work on external fork PRs when triggered by maintainers
30-
# To update this list, see: docs/administration/maintainer-onboarding.md
31-
- name: Check if maintainer
28+
# Only allow modelcontextprotocol org members to trigger @claude
29+
# This enables @claude to work on external fork PRs when triggered by org members
30+
# Requires ORG_MEMBERSHIP_TOKEN secret with read:org scope
31+
- name: Check if org member
32+
env:
33+
GH_TOKEN: ${{ secrets.ORG_MEMBERSHIP_TOKEN }}
3234
run: |
33-
MAINTAINERS="domdomegg tadasant toby rdimitrov"
3435
ACTOR="${{ github.triggering_actor }}"
35-
if [[ " $MAINTAINERS " =~ " $ACTOR " ]]; then
36-
echo "User $ACTOR is a maintainer"
36+
if gh api orgs/modelcontextprotocol/members/"$ACTOR" --silent 2>/dev/null; then
37+
echo "User $ACTOR is a member of modelcontextprotocol org"
3738
else
38-
echo "::error::User $ACTOR is not a registry maintainer. Only maintainers can trigger @claude."
39+
echo "::error::User $ACTOR is not a member of the modelcontextprotocol org. Only org members can trigger @claude."
3940
exit 1
4041
fi
4142

docs/administration/maintainer-onboarding.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ When onboarding a new maintainer, complete the following steps:
2121

2222
### 4. Claude GitHub App
2323

24-
- [ ] Add their GitHub username to the `MAINTAINERS` list in [`.github/workflows/claude.yml`](../../.github/workflows/claude.yml)
25-
26-
This allows them to trigger the @claude bot on issues and PRs, including PRs from external forks.
24+
The `@claude` bot is automatically available to all modelcontextprotocol org members (no manual step required). The workflow checks org membership dynamically via the GitHub API.
2725

2826
### 5. Google Workspace
2927

@@ -43,6 +41,7 @@ When a maintainer steps down:
4341
1. Remove them from the GitHub organization (or adjust permissions)
4442
2. Remove them from `MAINTAINERS.md`
4543
3. Remove them from the README.md maintainers list
46-
4. Remove their username from the Claude workflow in `.github/workflows/claude.yml`
47-
5. Disable or remove their @modelcontextprotocol.io account
48-
6. Remove Discord moderator role (if applicable)
44+
4. Disable or remove their @modelcontextprotocol.io account
45+
5. Remove Discord moderator role (if applicable)
46+
47+
Note: The `@claude` bot access is automatically revoked when they are removed from the GitHub organization.

0 commit comments

Comments
 (0)