This repository decides who has access to what in the MCP project: GitHub, Google Workspace, Discord and Cloudflare. Access is described in TypeScript, reviewed in pull requests, and applied with Pulumi when a change merges to main.
- Where things are
- Make a change
- Common tasks
- How GitHub access works
- Discord
- Security room sign-in
- GitHub sign-in for Google Workspace
- Package publishing
- Deployment, secrets and keys
| To change | Edit |
|---|---|
| Who is in which group | src/config/users.ts |
| Which groups exist | src/config/roles.ts |
| Who can access a repository | src/config/repoAccess.ts |
| Organization-wide GitHub roles | src/config/orgRoles.ts |
| GitHub organization settings | src/config/orgSettings.ts |
| Discord channels | src/config/channels.ts |
| Who can sign in to the security room | src/config/accessPolicies.ts |
| Who publishes to npm and PyPI | src/config/packageAccess.ts |
npm and PyPI are the exception to automatic deploys. Their expected access is recorded here, but a person applies it. See Package publishing.
- Edit the config and run
npm run check. - Open a pull request. A core maintainer has to approve it.
- Merge it. The Deploy workflow applies it, usually within 10 to 20 minutes.
Manual changes to anything managed here are usually undone by the next deploy. That includes people added to a team in GitHub's UI. The deploy removes anyone from a team that users.ts doesn't put them in, up to 20 at a time. A team that lacks someone declared there is skipped with a warning. To list who would be removed, run npm run sync-team-members.
Add the group's role to their memberOf in users.ts. If they aren't listed yet, add an entry in alphabetical order:
{
github: 'their-username',
discord: '123456789012345678', // optional, their Discord user ID
memberOf: [ROLE_IDS.TYPESCRIPT_SDK],
},Someone new to the organization gets an invitation by email and has no access until they accept it.
Add ROLE_IDS.REGISTRY_ADMINS to their memberOf, or remove it. The registry checks the registry-admins team each time an admin signs in, and admin tokens that were already issued last up to 5 minutes.
Maintainers, SDK maintainers and working group members can have one, and sign in to it with GitHub. Add these fields to your entry in users.ts, and add the sign-in role to your memberOf:
githubUserId: 12345678, // the "id" at https://api.github.com/users/your-username
firstName: 'Your',
lastName: 'Name',
googleEmailPrefix: 'yourname', // yourname@modelcontextprotocol.io
memberOf: [/* your roles, */ ROLE_IDS.WORKSPACE_SSO],After the deploy, enter your new address on the Google sign-in page and it sends you to GitHub. If you already have an account, add githubUserId and ROLE_IDS.WORKSPACE_SSO to use GitHub sign-in. Workspace admins keep their passwords. See GitHub sign-in for Google Workspace.
Organization members can't create repositories directly. Add an entry with settings to repoAccess.ts:
{
repository: 'ext-example',
settings: {
description: 'MCP Extension for Example. Maintained by the Example Working Group.',
},
teams: [
{ team: 'core-maintainers', permission: 'admin' },
{ team: 'moderators', permission: 'maintain' },
{ team: 'example-wg', permission: 'admin' },
],
},- Use lowercase names with hyphens. Extensions start with
ext-, orexperimental-ext-while they're experimental. - At least one team or person needs
admin. - Removing the entry archives the repository. Only an organization owner can delete it.
- An entry without
settingsmanages only who has access. Before addingsettingsto an existing repository, runpulumi import, or the deploy fails. - Don't rename an entry in place, because that archives the old repository and creates a new one.
repoAccess.tshas the steps. - A repository that was archived by hand stays archived.
People get access through teams. These rules explain most of what you'll see:
- Core and lead maintainers are admins of every repository, through an organization role.
- A child team gets everything its parent has. SDK teams are under
sdk-maintainers, which is understeering-committee, so they get itstriageonmodelcontextprotocol,.github,inspectorandquickstart-resources,pullonmaintainer-docs, andpushondocs. - Working and interest groups inherit nothing from
steering-committee. A group has its own grants and those of its group parent. - Some teams must not have a parent, so that they can't inherit access. Comments in
roles.tsmark them. - On
servers, grant teams one by one. Don't give it tosteering-committee, because that would reach every SDK team. - Grants to one person (
usersinrepoAccess.ts) are exceptions. Prefer a team.
npm run validate rejects a grant that is lower than what the team already has, a pull or triage grant that repeats it, and a team listed twice. Repeating push or higher is allowed, because CODEOWNERS only accepts teams with their own write access.
The contributor ladder defines project roles. Access here comes from teams, so a rank on the ladder doesn't grant anything by itself.
| Ladder role | Access here |
|---|---|
| Contributor | None. |
| Member | members team: push on modelcontextprotocol, triage on docs, .github, inspector, quickstart-resources and servers. |
| Maintainer | Their own team, such as an SDK team or docs-maintainers. The general maintainers team has push on modelcontextprotocol. |
| Core maintainer | Admin of every repository. |
| Lead maintainer | Admin of every repository. |
| Community moderator | moderators team: maintain on most community repositories. Discord moderator role. |
| WG lead or IG facilitator | wg-ig-facilitators on Discord. Some working groups also have a *-wg-leads team with admin on the group's repository. |
Members need push on modelcontextprotocol because it only accepts pull requests from people with write access. Their triage is granted per repository, because the organization-wide triage role would also cover private ones.
Some teams are outside the ladder: security-managers, security-team, workspace-sso, the *-auth and conformance-auth code owner teams, the *-collaborators teams, auth-contributors, access-maintainers, registry-admins and csharp-sdk-admin.
The deploy gives people the Discord roles of their groups, if their entry in users.ts has a Discord ID. It also manages the channels listed in channels.ts.
A refresh corrects Discord roles too, so don't run make refresh or pulumi preview --refresh only to look.
An entry with an id adopts an existing channel. An entry without one creates a channel.
// Adopt a channel and enforce only its slow mode
{ id: '1234567890123456789', type: 'text', rateLimitPerUser: 5 },
// Create a forum channel
{
name: 'sdk-help',
type: 'forum',
requireTag: true,
availableTags: [{ name: 'typescript' }, { name: 'python' }, { name: 'answered', moderated: true }],
defaultSortOrder: 'latest_activity',
},- Only the settings you declare are managed.
nameis required for a new channel and optional for an adopted one. - Changes made by hand to a declared setting are reverted by the next deploy.
- Channels are never deleted. Removing an entry, or changing its
idortype, leaves the old channel on Discord. positionis used only when the channel is created. Reorder channels in Discord.npm run checkrejects invalid settings. It warns about channel names with uppercase letters or spaces, and aboutrequireTagon an adopted channel with noavailableTags. The deploy fails if that channel has no tags on Discord.- Changes appear in Discord's audit log as
modelcontextprotocol/access deploy.
forum and media channels are always thread-only. Discord can't convert a text channel into one, so declaring type: 'forum' on a text channel's id fails the deploy.
To make a text channel thread-only, adopt it and set permissionOverwrites:
- For
DISCORD_EVERYONE_ROLE, denySEND_MESSAGESand allowCREATE_PUBLIC_THREADSandSEND_MESSAGES_IN_THREADS. - For each role that may still post in the channel itself, allow
SEND_MESSAGES.#generaldoes this for moderators and community managers.
Each entry names a role from roles.ts or DISCORD_EVERYONE_ROLE, and the permissions to allow and deny. Only permissions listed in discordPermissions.ts can be used.
Only the listed permissions are managed. Other permissions, and overwrites for other roles or members, stay as they are. Removing a permission clears it on the next deploy. Administrators bypass overwrites.
- Manage Channels in the server, and View Channel on private channels you adopt.
- Manage Roles to write overwrites. It can only allow or deny permissions that it has itself.
- The Community feature on the server, to create forum and media channels.
securityroom.modelcontextprotocol.io is behind Cloudflare Access, which signs people in with GitHub. accessPolicies.ts lists the roles that may sign in. Only that policy is managed here. The application's domain, identity providers and session settings are set in Cloudflare.
Add ROLE_IDS.SECURITY_TEAM to their memberOf in users.ts. That role grants no repository access.
To let in another team, add its role to the policy in accessPolicies.ts.
Cloudflare only counts direct members of a team. Someone in python-sdk doesn't match a rule for its parent, sdk-maintainers. That's why the security leads of the SDKs are added to security-team directly.
If Cloudflare turned someone away before they had access, they need to revoke Cloudflare Access in their GitHub settings (Applications, then Authorized OAuth Apps) and sign in again. Until then, Cloudflare uses the team list from their earlier sign-in.
In the MCP Domain Account on Cloudflare, create a token with only Account > Access: Apps and Policies > Edit. Save it as CLOUDFLARE_ROLE_MANAGEMENT_TOKEN in the production environment, and use it for nothing else. The deploy stops if it's missing.
People sign in to their @modelcontextprotocol.io account with GitHub. Cloudflare Access is the SAML identity provider.
In a reviewed pull request, change their entry in users.ts:
- Confirm their numeric GitHub ID with them and set
githubUserId. CI checks that it matches their login. - Add
ROLE_IDS.WORKSPACE_SSOto theirmemberOf. They also need a role that gives them a Workspace account.
The deploy moves their account into the /Model Context Protocol/GitHub SSO organizational unit, including accounts marked existingGWSUser. If an admin moves it out by hand, the next deploy moves it back. A refresh does too. Removing the role returns the account to the unit it came from.
Caution
Keep Workspace admin accounts out of this unit.
Use a modern SAML profile and keep legacy SSO off.
- Create the profile with the Cloudflare Access SSO URL, entity ID and signing certificate.
- Set
cloudflare:googleSamlEntityIdandcloudflare:googleSamlAcsUrltogether, with the values from that profile. If neither is set, the application uses placeholders that can't sign anyone in. - Have a Workspace admin assign the profile to the GitHub SSO unit. To roll back, remove the assignment.
- Check that post-SSO verification applies to the unit, 2-Step Verification is enforced, and every user is enrolled.
The Cloudflare token that edits Access applications can change which Workspace identity Cloudflare signs, so treat it as sensitive.
- Suspend the Workspace account, reset its sign-in cookies, and revoke OAuth grants and app passwords where they apply.
- Revoke their Cloudflare Access sessions.
- Remove the Workspace SSO role in
users.tsand deploy.
The Access application and policy sessions last one hour. Cloudflare can reuse stored GitHub membership until the global session ends, so check that setting. Google manages its own sessions.
packageAccess.ts records who should be able to publish to npm and PyPI. A maintainer applies the changes by hand, because neither registry lets automation do it: npm asks for an interactive 2FA challenge for every access change, and PyPI has no API for it.
npm can still be read automatically. The drift workflow compares it with the config every week and on demand. It needs NPM_READ_TOKEN, a read-only npm token with organization read access, and skips the check without it. Keep that token read-only, because npm tokens that can write expire after 90 days at most.
npm organization members come from the npm field in users.ts.
- Merge the change to
packageAccess.tsorusers.ts. - Run
NPM_TOKEN=<read-only token> npm run check-package-drift. It prints thenpmcommands that would fix the differences. - Read them, especially the removals.
- As an npm organization owner, log in with
npm loginand run the commands in one session. At the first 2FA prompt, choose Don't ask again for 5 minutes. Withsleep 2between commands, about 80 fit in that time. - Run the check again. It should find no differences.
- Add a maintainer: under Manage project > Collaborators, invite them by PyPI username. They have no access until they accept the email. Then record them in
packageAccess.tsand in thepypifield ofusers.ts. - Add a trusted publisher: under Manage project > Publishing, add the GitHub repository and workflow. Prefer this to API tokens.
Every merge to main runs the Deploy workflow. You can also start it by hand on main.
You need the Pulumi CLI, the Google Cloud SDK, and access to the GCP project and its bucket.
- Run
gcloud auth application-default login. - Get
passphrase.prod.txtfrom the maintainers. - Set
GITHUB_TOKENto a token with the permissions of the deploy App. The organization rejects classic personal access tokens. - Set the
discord:*,githubBillingEmailandcloudflare:roleManagementTokenconfig values the waydeploy.ymldoes. Without the Discord and Cloudflare values,make updeletes what they manage. - Run
make preview, thenmake up.
A refresh isn't read-only. make refresh and pulumi preview --refresh can change Discord roles and move Google Workspace accounts.
Secrets belong to a GitHub environment (Settings > Environments). Don't store them at repository level, where every branch can read them.
| Environment | Used by | Branches |
|---|---|---|
production |
deploy.yml |
main only |
preview |
preview.yml on pull requests |
No restriction |
Pull requests run on refs/pull/<number>/merge, so preview can't be limited to main. Anyone who can push a branch can use what's in it.
| Name | What it is |
|---|---|
DEPLOY_APP_CLIENT_ID (variable) |
Client ID of the environment's GitHub App |
DEPLOY_APP_PRIVATE_KEY |
Private key of that App |
GCP_PROD_SERVICE_ACCOUNT_KEY |
Service account key for the Pulumi state in Google Cloud Storage |
PULUMI_PROD_PASSPHRASE |
Passphrase that decrypts the Pulumi secrets. It can't be recovered. |
ORG_BILLING_EMAIL |
Billing email of the GitHub organization |
DISCORD_BOT_TOKEN |
Token of the Discord bot |
DISCORD_GUILD_ID |
ID of the Discord server |
CLOUDFLARE_ROLE_MANAGEMENT_TOKEN |
Cloudflare Access token |
All of them are set in production. The deploy stops before changing anything if a secret is missing.
preview has only its own App's two values, so the Pulumi preview is skipped on pull requests. To turn it on, first add required reviewers to preview, then the other secrets. It fails if only some of them are there.
The deploy signs in to GitHub as the mcp-access-deploy App, which is installed on all repositories. Each run gets a token that expires after an hour and is revoked when the job ends.
| Scope | Permission | Access |
|---|---|---|
| Repository | Administration | Read and write |
| Repository | Metadata | Read |
| Repository | Pages | Read |
| Organization | Administration | Read and write |
| Organization | Members | Read and write |
| Organization | Custom organization roles | Read |
The App has no access to repository contents on purpose. Because of that, repositories with settings may show the same merge settings as changed on every deploy, and creating a repository from a template doesn't work.
Its private key is as powerful as an organization admin. Keep it in production and nowhere else. preview uses a separate App with only Metadata: read and Custom organization roles: read.
To replace the key, generate a new one in the App settings and run this. Then delete the old key and the local file.
gh secret set DEPLOY_APP_PRIVATE_KEY --env production -R modelcontextprotocol/access < key.pem