MCP OAuth: DCR sends client_name "copilot-cli", rejected with 403 by Figma's allowlist (expects "GitHub Copilot CLI")
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 76/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- shell
- Bereich
- api, authentication
Rechercherichtung
Lokalisieren Sie die Konstruktion der MCP OAuth Dynamic Client Registration-Anfrage und prüfen Sie, wo der Wert client_name gesetzt wird. Stellen Sie die Authentifizierung mit dem Figma remote MCP server nach und überprüfen Sie anschließend, dass die Registrierung erfolgreich ist und der browserbasierte OAuth-Flow ohne den 403-Fehler fortgesetzt wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
The CLI registers its OAuth client via Dynamic Client Registration with client_name: "copilot-cli". Figma's registration endpoint runs an allowlist on that field and rejects the value with 403 Forbidden. The transport dies before any browser opens, so the failure surfaces as a generic error with no indication that registration was the problem.
The string Figma expects — GitHub Copilot CLI — is already on their allowlist. This is a one-value mismatch, not a protocol incompatibility.
Reproduction
// ~/.copilot/mcp-config.json
{
"mcpServers": {
"figma": { "url": "https://mcp.figma.com/mcp" }
}
}
Trigger authentication for the figma server. No browser opens. Logs show:
worker quit with fatal: Transport channel closed, when Client(OAuthChallenge { ... })
Or, surfaced to the user:
figma: RPC error -32603: Request session.mcp.oauth.login failed
Evidence
Captured by pointing figma.url at a local mock server and logging the registration request body verbatim:
{
"client_name": "copilot-cli",
"redirect_uris": ["http://127.0.0.1:55973/"],
"token_endpoint_auth_method": "none",
"grant_types": ["authorization_code", "refresh_token"],
"response_types": ["code"]
}
Every field is valid. Probing Figma's registration endpoint directly (POST https://api.figma.com/v1/oauth/mcp/register) with only client_name varied:
client_name |
Status |
|---|---|
GitHub Copilot CLI |
200 |
GitHub Copilot |
200 |
Claude Code |
200 |
Codex |
200 |
copilot-cli |
403 |
github-copilot |
403 |
GitHub Copilot Chat |
403 |
Cursor |
403 |
Figma's status codes are diagnostic here: 403 means the name was rejected, while a malformed redirect URI returns 400 invalid_redirect_uri. Only the name varies across the table above.
Suggested fix
Send GitHub Copilot CLI as client_name during DCR. Figma already accepts it, and it is a more accurate display name for the consent screen that users see on any provider.
Workaround
A loopback proxy that rewrites client_name and forwards everything else unchanged. Confirmed working end-to-end against Figma, including tool calls.
Two non-obvious details for anyone attempting the same, both of which produce errors that look unrelated to the root cause:
-
RFC 8414 §3.3 — the CLI uses path-insertion discovery, requesting
/.well-known/oauth-authorization-server/mcp. Theissuerin the returned metadata must exactly equal that full URL including the path suffix, not the bare origin. Returning the origin yieldsIncompatible authorization server: authorization server advertised an issuer that does not match the URL its metadata was discovered from. -
The 401 challenge — Figma's
WWW-Authenticateheader points discovery back atfigma.com. Forwarded verbatim, the client routes around the proxy, re-registers ascopilot-cli, and hits the original 403 again.
Notes
Figma has moved to remote-first; the local Dev Mode server on port 3845 is being retired and the desktop app no longer opens that port. There is no local fallback. The remote server is available on all plans including free, so this is not a seat or licensing issue — every Figma user on the CLI hits this.
Possibly related but distinct: #4870 describes a -32601 on server/discover against the same Figma endpoint, which occurs after authentication succeeds. The issue reported here occurs before any auth flow starts.
Environment
- macOS
- Figma remote MCP server (
https://mcp.figma.com/mcp)
- Vorherrschende Sprache
- Shell
- Sterne
- 11.2k
- Forks
- 1.9k
- Ø Merge
- 14 Std. 16 Min.
- Gemergte PRs (30 T.)
- 6
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus github/copilot-cli
-
triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
github/copilot-cli#4932 ·
-
triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
github/copilot-cli#4909 ·
-
triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
github/copilot-cli#4848 ·
-
area:agents area:mcp
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
github/copilot-cli#4729 ·
-
area:sessions
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
github/copilot-cli#4712 ·
Alle Issues in github/copilot-cli
Ähnliche Issues
-
area: harness bug status: needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Human-Agent-Society/reef#625 ·
-
module: core
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
bigbluebutton/bigbluebutton#25849 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
vercel-labs/just-bash#464 ·
-
area:sandbox documentation enhancement platform:linux
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
anthropics/claude-code#96664 ·
-
cost:cheap severity:medium
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
fairagro/m4.2_sql_to_arc#227 ·