Remote MCP (mcp.socket.dev) rejects freshly-issued OAuth access tokens with 401 invalid_token
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- typescript
- Bereich
- api, authentication, backend
Rechercherichtung
Starte am Remote-MCP-Endpunkt https://mcp.socket.dev/ und verfolge, wie dessen OAuth-Bearer-Tokens validiert werden, und vergleiche diesen Pfad mit der funktionierenden api.socket.dev-Anfrage. Reproduziere das Problem mit den bereitgestellten curl-Befehlen und prüfe die Remote-Socket-MCP-Dokumentation sowie die OAuth-Metadaten der geschützten Ressource. Die Aufgabe ist abgeschlossen, wenn ein neu ausgestelltes Token MCP erfolgreich initialisieren kann und das Authentifizierungsverhalten sowie die Dokumentation aufeinander abgestimmt sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
The remote Socket MCP server at https://mcp.socket.dev/ rejects access tokens that its own OAuth flow just issued. The token is valid and unexpired — the same token authenticates successfully against api.socket.dev — but every MCP request returns 401 invalid_token. This makes the remote MCP server unusable with OAuth-capable MCP clients (tested with Claude Code).
Environment
- Client: Claude Code (streamable HTTP MCP client with OAuth + dynamic client registration)
- Server:
https://mcp.socket.dev/ - Account: Socket org
clivi(team plan), reproduced consistently across 2 days (2026-06-09 and 2026-06-10)
Steps to reproduce
- Add the remote server per the docs:
claude mcp add --transport http socket-mcp https://mcp.socket.dev/ - Complete the OAuth flow (DCR client, e.g.
client_id=dcr-f8TfK-9JQzUGucp7lDJCymIp, scopepackages:list,resource=https://mcp.socket.dev/). The browser flow finishes with "Authentication successful". - Client receives and stores an access token (
sktsec_…, 55 chars, ~15-minute TTL) plus a refresh token. - Immediately (>10 minutes before expiry) call the MCP endpoint with the token:
curl -X POST https://mcp.socket.dev/ \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"diag","version":"1.0"}}}'
Expected
200 with an initialize result.
Actual
HTTP/2 401
www-authenticate: Bearer error="invalid_token", error_description="Invalid or expired token", resource_metadata="https://mcp.socket.dev/.well-known/oauth-protected-resource"
{"error":"invalid_token","error_description":"Invalid or expired token"}
Evidence the token itself is valid
The exact same token, at the same moment, works against the regular API:
curl https://api.socket.dev/v0/organizations -H "Authorization: Bearer $ACCESS_TOKEN"
# 200 — returns the org as expected
So issuance, scope (packages:list, which matches the resource metadata's scopes_supported), audience/resource binding, and storage are all fine — only the MCP resource server's token validation fails.
Additional observations
- The Remote Socket MCP docs say "No API key or authentication required!" — but unauthenticated requests get
401witherror_description="Missing Authorization header". If auth is now required, the docs are stale; if it isn't, the 401s are the bug. https://mcp.socket.dev/mcp(referenced in the Windsurf section of those docs) returns404.- Workaround that works fine: local stdio server (
@socketsecurity/mcp) with a static API key of the samepackages:listscope. (Side note: itsenginesfield requires npm ≥ 11.16, which no current Node release bundles —npxfails out of the box;pnpm dlxworks.)
- Vorherrschende Sprache
- TypeScript
- Sterne
- 139
- Forks
- 45
- Ø Merge
- 12 T. 16 Std.
- Gemergte PRs (30 T.)
- 5
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
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 SocketDev/socket-mcp
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
SocketDev/socket-mcp#227 ·
-
Remote MCP (mcp.socket.dev) fails OAuth Dynamic Client Registration in Claude Desktop connectorsOffen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 22/100
SocketDev/socket-mcp#223 · 1 Kommentar ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
SocketDev/socket-mcp#186 · 1 Kommentar ·
Alle Issues in SocketDev/socket-mcp
Ähnliche Issues
-
[Bug]: Device screenshot fails with 500 on iPhone Duo (Xcode 27.2): serve-sim calls simctl without --displayEvtl. vergeben Ein verknüpfter Pull Request ist offen oder bereits gemergt. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
pingdotgg/t3code#24900 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
inu-appcenter/UNIDorm-web#411 ·
Maintainer antworten meist innerhalb von 1 Tag
-
🐛 bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
ranxianglei/billion-context#4720 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:arcade game p3-medium ready-for-agent type:bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
fderuiter/deruiter.dev#2840 ·
Maintainer antworten meist innerhalb von 1 Tag