Skip to content

Commit db43896

Browse files
rdimitrovclaude
andauthored
docs: document GitHub OIDC audience binding for self-hosters and CI users (#1230)
## Summary Follow-up to #1229. Three small doc additions so the new audience requirement is discoverable without reading the source: - `.env.example` lists `MCP_REGISTRY_GITHUB_OIDC_AUDIENCE` alongside the other registry env vars, with a note that the value must match the scheme+host that publishers pass via `--registry`. - The publisher CLI reference (`docs/reference/cli/commands.md`) explains that the CLI derives the audience from `--registry` and that self-hosters must set the matching env var on the registry side. - The GitHub Actions troubleshooting table (`docs/modelcontextprotocol-io/github-actions.mdx`) maps the new `invalid audience` error to the user-facing fix (upgrade `mcp-publisher`). No code changes — docs only. ## Test plan - [ ] CI green (markdown lint / link checks if any) - [ ] Eyeball-render the troubleshooting table on the modelcontextprotocol.io preview to confirm the new row formats correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3f89fc2 commit db43896

3 files changed

Lines changed: 16 additions & 0 deletions

File tree

.env.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ MCP_REGISTRY_JWT_PRIVATE_KEY=bb2c6b424005acd5df47a9e2c87f446def86dd740c888ea3efb
2727
# This should be disabled in prod
2828
MCP_REGISTRY_ENABLE_ANONYMOUS_AUTH=false
2929

30+
# GitHub OIDC token exchange (for `mcp-publisher login github-oidc`)
31+
# Expected `aud` claim on incoming GitHub Actions OIDC tokens. Must equal the
32+
# scheme + host that publishers pass via `--registry` (e.g. `https://registry.example.com`).
33+
# The publisher CLI derives the audience from `--registry` automatically; the server
34+
# rejects all OIDC exchanges if this is unset, so set it on every deployment that
35+
# accepts GitHub Actions publishes.
36+
MCP_REGISTRY_GITHUB_OIDC_AUDIENCE=
37+
3038
# Google Cloud Identity OIDC configuration for admin access
3139
# Enable OIDC authentication for @modelcontextprotocol.io admin accounts
3240
MCP_REGISTRY_OIDC_ENABLED=false

docs/modelcontextprotocol-io/github-actions.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ The workflow will run tests, build the package, publish the package to npm, and
220220
| Error Message | Action |
221221
| --- | --- |
222222
| "Authentication failed" | Ensure `id-token: write` permission is set for OIDC, or check secrets. |
223+
| "invalid audience" | Your `mcp-publisher` binary is too old for this registry deployment. Re-run the install step shown above so you pick up the latest release. |
223224
| "Package validation failed" | Verify your package successfully published to the package registry (e.g., npm, PyPI), and that your package has the [necessary verification information](./package-types). |
224225

225226
{/* prettier-ignore-end */}

docs/reference/cli/commands.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,13 @@ mcp-publisher login github-oidc [--registry=URL]
7272
- Requires `id-token: write` permission in workflow
7373
- No browser interaction needed
7474

75+
The CLI derives the OIDC `aud` claim from `--registry` (scheme + host, e.g.
76+
`https://registry.modelcontextprotocol.io`) so tokens are bound to the specific
77+
deployment they were minted for. Self-hosters must set
78+
`MCP_REGISTRY_GITHUB_OIDC_AUDIENCE` on the registry to the matching value;
79+
publishers running an older `mcp-publisher` will fail with `invalid audience`
80+
and need to upgrade.
81+
7582
Also see [the guide to publishing from GitHub Actions](../../modelcontextprotocol-io/github-actions.mdx).
7683

7784
#### DNS Verification

0 commit comments

Comments
 (0)