You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ebf61a3
Browse filesBrowse the repository at this point in the historyBrowse files
Resolve conflicts with #258, which removed the steering-committee grant
on servers. Keep it removed instead of re-adding it as triage; the teams
listed on servers stay at triage. Update the servers comment and the
README inheritance note to match, and keep main's auth-contributors
addition.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MqPQYSMU1JmTaeseASXFPL
Copy file name to clipboardExpand all lines: README.md
+21-9Lines changed: 21 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,8 +78,8 @@ The [contributor ladder](https://modelcontextprotocol.io/community/contributor-l
78
78
79
79
Things to know when reading the config against the ladder:
80
80
81
-
-**GitHub child teams inherit their parent's repository access.** WG, IG, and SDK teams nest under `steering-committee` (via `working-groups`, `interest-groups`, and `sdk-maintainers`). Their members therefore get `steering-committee`'s grants, which include `triage` on `modelcontextprotocol`, `.github`, `inspector`, `quickstart-resources`, and `servers`, and `push` on the archived `docs` repository. Write access on those repositories comes from the team that owns each one: `inspector-maintainers` on `inspector`, `reference-servers-maintainers` on `servers`, and `docs-maintainers` on `quickstart-resources`. This is independent of ladder rank. Roles that must not inherit these grants (`members`, `maintainers`, `security-team`) have no parent.
82
-
-**Some roles have no ladder counterpart.** These are functional or operational roles: `security-managers`, `security-team`, CODEOWNERS teams (`*-auth`, `conformance-auth`), collaborator teams (`registry-collaborators`, `typescript-sdk-collaborators`), `csharp-sdk-admin`, Discord-only `administrators` and `community-managers`, and Google email groups.
81
+
-**GitHub child teams inherit their parent's repository access.** WG, IG, and SDK teams nest under `steering-committee` (via `working-groups`, `interest-groups`, and `sdk-maintainers`). Their members therefore get `steering-committee`'s grants, which include `triage` on `modelcontextprotocol`, `.github`, `inspector`, and `quickstart-resources`, and `push` on the archived `docs` repository. `steering-committee` deliberately has no grant on `servers`, so the teams listed there each have their own `triage` grant. Write access on `inspector`, `servers`, and `quickstart-resources` comes from the team that owns each one: `inspector-maintainers` on `inspector`, `reference-servers-maintainers` on `servers`, and `docs-maintainers` on `quickstart-resources`. This is independent of ladder rank. Roles that must not inherit these grants (`members`, `maintainers`, `security-team`) have no parent.
82
+
-**Some roles have no ladder counterpart.** These are functional or operational roles: `security-managers`, `security-team`, CODEOWNERS teams (`*-auth`, `conformance-auth`), collaborator teams (`registry-collaborators`, `typescript-sdk-collaborators`), `auth-contributors` (`push` on `ext-auth` only, no parent team), `csharp-sdk-admin`, Discord-only `administrators` and `community-managers`, and Google email groups.
83
83
-**Per-user grants** in `repoAccess.ts` (the `users` lists) are not tied to any ladder role.
84
84
-**`security-ig` has `admin` on six repositories** (`docs`, `.github`, `inspector`, `modelcontextprotocol`, `quickstart-resources`, `servers`). This was carried over unchanged from `security-wg` in #170, and reviewing it is tracked as a separate workstream.
85
85
@@ -102,7 +102,8 @@ Channels listed in [`src/config/channels.ts`](src/config/channels.ts) are manage
102
102
},
103
103
```
104
104
105
-
-**Thread-only channels are a channel type, not a setting.** Discord has no "require threads" switch; thread-only behaviour exists only as `forum` and `media` channels, and the API cannot convert a text channel into one. To make an existing channel thread-only, declare a new `forum`/`media` channel (without `id`) and retire the old channel by hand. Declaring `type: 'forum'` on the `id` of a text channel fails the deploy with an error saying so.
105
+
-**Thread-only channels are a channel type or a permission policy, not a setting.** Discord has no "require threads" switch. `forum` and `media` channels are thread-only by type, but the API cannot convert a text channel into one: declaring `type: 'forum'` on the `id` of a text channel fails the deploy with an error saying so. To make an existing text channel thread-only in place, keeping its ID and history, adopt it by `id` and declare `permissionOverwrites` that deny `SEND_MESSAGES` to `DISCORD_EVERYONE_ROLE` and allow `CREATE_PUBLIC_THREADS` and `SEND_MESSAGES_IN_THREADS`; members can then only start threads and reply in them. Add an overwrite allowing `SEND_MESSAGES` for any role that should still post at the top level (`#general` does this for moderators and community managers).
106
+
-**Permission overwrites are managed per permission.** Each `permissionOverwrites` entry names a role from `roles.ts` (or `DISCORD_EVERYONE_ROLE`) and the permissions to `allow` and `deny`, limited to the allowlist in [`discordPermissions.ts`](src/config/discordPermissions.ts). Pulumi owns only the listed permissions: other permissions on the same overwrite, and overwrites for other roles or members, stay as they are on Discord. Removing a permission or an entry clears just those bits on the next deploy. The bot needs **Manage Roles** to write overwrites, and Discord only lets it allow or deny permissions it holds itself. Administrators bypass overwrites.
106
107
-**Channels are never deleted.** Removing an entry only drops the resource from Pulumi state; the channel and its history stay on Discord. Changing an entry's `id` or `type` likewise adopts/creates the new channel and leaves the old one alone.
107
108
- Only declared settings are managed. `name` is required when creating a channel and optional when adopting one by `id`; declare it only if you want it enforced. Validation (`npm run check`) rejects a missing name on a new channel, names outside 1-100 characters, topics over Discord's limit (1024 for text, 4096 for forum/media), malformed snowflakes, duplicate entries, more than 20 tags, `requireTag` with no tags to pick from, and forum/media settings on text channels (`defaultForumLayout` is forum-only). It prints a `WARNING:` without failing for names with uppercase letters or spaces (Discord normalizes those, so the declared name would never match) and for `requireTag` on an adopted channel that declares no `availableTags` (it relies on the tags already on Discord; the deploy fails if there are none).
108
109
-`position` is applied on creation only. Discord renumbers positions whenever channels move, so it is not checked or re-applied afterwards; reorder channels in Discord.
@@ -120,7 +121,7 @@ Channels listed in [`src/config/channels.ts`](src/config/channels.ts) are manage
120
121
### One-time setup
121
122
122
123
1. In the Cloudflare dashboard for the **MCP Domain Account**, create a token dedicated to Access policy role management. Give it a descriptive name so it does not read as a generic API token, e.g. `mcp-access: Access policy role management`, and scope it to only **Account → Access: Apps and Policies → Edit** on the MCP Domain Account. Do not reuse this token for anything else.
123
-
2. Add it as the GitHub Actions secret `CLOUDFLARE_ROLE_MANAGEMENT_TOKEN` in the `production`environment (repository settings → Environments → production). The deploy workflow passes it to Pulumi as `cloudflare:roleManagementToken`. Until the secret exists, the Cloudflare module logs "Cloudflare integration disabled: roleManagementToken not configured" and creates nothing, so previews stay green.
124
+
2. Add it as the GitHub Actions secret `CLOUDFLARE_ROLE_MANAGEMENT_TOKEN` in the `production`and `preview` environments (repository settings → Environments). The deploy workflow passes it to Pulumi as `cloudflare:roleManagementToken`. Until the secret exists, the Cloudflare module logs "Cloudflare integration disabled: roleManagementToken not configured" and creates nothing, so previews stay green.
124
125
3. The account ID and GitHub identity-provider ID are non-secret and live in [`Pulumi.prod.yaml`](Pulumi.prod.yaml).
125
126
4.**Adopting the existing policy.** Pulumi's `import` resource option only succeeds when the program's inputs match the live resource, so adoption is two deploys:
126
127
- With `cloudflare:importExistingPolicies: "true"` in `Pulumi.prod.yaml`, the first deploy imports the existing `Maintainers` policy (by its `cloudflarePolicyId`) as-is, ignoring its rule lists.
@@ -199,15 +200,26 @@ The private key is equivalent to organization admin. Store it as an environment
199
200
gh secret set DEPLOY_APP_PRIVATE_KEY --env production -R modelcontextprotocol/access < key.pem
200
201
```
201
202
203
+
Preview runs in the `preview` environment and reads `DEPLOY_APP_CLIENT_ID` and `DEPLOY_APP_PRIVATE_KEY` from there. That environment accepts pull request branches, so give it the credentials of a separate App that has only **Metadata: read** and **Custom organization roles: read**, not the deploy App's. The token Preview requests is limited to those two permissions, but the private key behind it is not.
204
+
202
205
Do not use a refresh (`make refresh`, `pulumi preview --refresh`) as a read-only check: the Discord member sync corrects role drift during `read()`, so any refresh can change live Discord roles.
203
206
204
207
### Required GitHub Secrets (for CI/CD)
205
208
206
-
The following secrets must be configured in GitHub Actions for automated deployments:
209
+
The workflows run in two GitHub environments (repository settings → Environments):
|`production`|[`deploy.yml`](.github/workflows/deploy.yml) on `main`|`main` only |
214
+
|`preview`|[`preview.yml`](.github/workflows/preview.yml) on pull requests | No restriction. Pull request runs use `refs/pull/<number>/merge`, which a `main`-only rule rejects. |
215
+
216
+
A secret or variable stored in an environment is visible only to jobs that declare that environment. One stored at repository level is visible to both. Anyone who can push a branch to this repository can run a workflow in `preview`, so keep the deploy App's private key out of it.
217
+
218
+
The following secrets must be configured in GitHub Actions for automated deployments. Both workflows read all of them. Apart from the App credentials, Preview needs the same values as Deploy: it fails without the billing email, and it shows the Discord and Cloudflare resources as deletes when their values are missing.
207
219
208
-
-**`DEPLOY_APP_PRIVATE_KEY`** (secret, `production`environment): private key of the deploy GitHub App
220
+
-**`DEPLOY_APP_PRIVATE_KEY`** (secret, set in each environment): private key of the deploy GitHub App in `production`, and of the read-only preview App in `preview`
209
221
210
-
-**`DEPLOY_APP_CLIENT_ID`** (a **variable**, not a secret, `production`environment): client ID of the deploy GitHub App
222
+
-**`DEPLOY_APP_CLIENT_ID`** (a **variable**, not a secret, set in each environment): client ID of the App whose private key that environment holds
211
223
212
224
-**`ORG_BILLING_EMAIL`**, **`DISCORD_BOT_TOKEN`**, **`DISCORD_GUILD_ID`**: passed to Pulumi config by the workflows
213
225
@@ -220,7 +232,7 @@ The following secrets must be configured in GitHub Actions for automated deploym
220
232
- Used to decrypt encrypted values in Pulumi stack configuration
221
233
- Keep this secure - if lost, you cannot decrypt your Pulumi state
222
234
223
-
-**`CLOUDFLARE_ROLE_MANAGEMENT_TOKEN`** (optional, `production`environment): Cloudflare token dedicated to Access policy role management, scoped only to **Account → Access: Apps and Policies → Edit** on the MCP Domain Account (not a general-purpose API token)
235
+
-**`CLOUDFLARE_ROLE_MANAGEMENT_TOKEN`** (optional, `production`and `preview` environments): Cloudflare token dedicated to Access policy role management, scoped only to **Account → Access: Apps and Policies → Edit** on the MCP Domain Account (not a general-purpose API token)
224
236
- Used to manage the Cloudflare Access policy for `securityroom.modelcontextprotocol.io` (see [Cloudflare Access (security-room)](#cloudflare-access-security-room))
225
237
226
238
## Initial Setup
@@ -284,4 +296,4 @@ Add the CI/CD secrets to GitHub Actions (repository settings → Secrets and var
284
296
285
297
-`GCP_PROD_SERVICE_ACCOUNT_KEY`: Content of `sa-key.json`
286
298
-`PULUMI_PROD_PASSPHRASE`: The passphrase you set above
287
-
-`DEPLOY_APP_CLIENT_ID` and `DEPLOY_APP_PRIVATE_KEY` (in the `production`environment, not at repository level): see [Deploy GitHub App](#deploy-github-app)
299
+
-`DEPLOY_APP_CLIENT_ID` and `DEPLOY_APP_PRIVATE_KEY` (in the `production`and `preview` environments, not at repository level): see [Deploy GitHub App](#deploy-github-app)
0 commit comments