mcp-oauth-triage
Ce qu’il fait
Cette compétence aide à diagnostiquer les connexions cassées entre un assistant IA et un service en ligne qui utilise une connexion OAuth. Elle s'adresse aux développeurs dont un connecteur renvoie soudain des erreurs de connexion ou affiche les données d'un autre compte.
Quand l’utiliser
- ✓Quand un connecteur qui fonctionnait hier échoue avec des erreurs de connexion alors que rien n'a changé.
- ✓Quand un connecteur obtient la bonne connexion, mais échoue à la première requête après un renouvellement.
- ✓Quand un connecteur affiche des données qui appartiennent à un autre compte.
Lien du skill
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/mcp-oauth-triage/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Mon connecteur d'IA vers notre service de facturation renvoie des erreurs 401 depuis qu'il renouvelle la connexion. Aide-moi à trouver pourquoi.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
Elle recueille trois informations sur la panne et lance un script de classement qui range le problème dans une cause probable, pour que la correction vise le vrai problème.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis GitHub.
MCP OAuth Triage
Tier: POWERFUL · Category: Engineering · Domain: AI / Auth / Connectors
Overview
An OAuth-backed MCP connector rarely fails at the exchange. It fails somewhere between storing what the exchange returned and reading it back on the next call, so the visible symptom is a wall of 401s while every dashboard says the connection is healthy.
The cost of guessing is high because five common faults share one symptom and need opposite fixes. Rotating a client secret does nothing when the real fault is a writer and a reader disagreeing about which key holds the token. Re-authenticating cures a poisoned auth cache for a day and hides the actual defect. This skill exists to stop that guessing: collect three artifacts, run one classifier, fix the class you actually have.
Use it before touching code, and again before declaring the fix done.
When to Use
- A connector that authenticated yesterday returns 401 or 403 today with no configuration change.
- The token endpoint returns 200, but the first tool call after a refresh fails.
- Re-authenticating fixes the symptom, and the failure returns within one token lifetime.
- A multi-account install returns data belonging to the wrong account.
- A "needs auth" state persists after a successful login.
- A refresh loop hammers the token endpoint (429s, rotation churn) while the connector stays down.
Do not use this skill for first-time setup that never worked. That is a scopes, redirect URI, or client
registration problem, and it belongs with mcp-server-builder. This skill assumes a working state
existed and was lost.
Features
One classifier covers five fault classes. Each row names the discriminator that separates it from its neighbours, because the fixes are destructive to each other.
| Detector | Fires on | Confirmed by |
|---|---|---|
| Envelope check | token stored one level below where the reader looks | reader key list vs record key list |
| Expiry check | fractional TTL, zero sentinel, seconds/milliseconds confusion | failure gap equals token lifetime |
| Rotation check | more than one exchange per credential per window | stored refresh token vs last exchange result |
| Binding check | audience, issuer, or account-key mismatch | claims vs the surface's protected-resource metadata |
| Cache check | auth marker that survives a successful login | clearing the marker alone restores service |
The classifier also reports what it could not check, so a clean exit is read as "not proven broken" rather than "proven working".
Usage
# Classify from a record and a log
python3 scripts/oauth_triage.py --token-file ./token.json --log ./connector.jsonl
# Machine-readable verdict for a ticket or CI
python3 scripts/oauth_triage.py --token-file ./token.json --log ./connector.jsonl --json
# Redact a record before it goes into a ticket or a chat
python3 scripts/oauth_triage.py --token-file ./token.json --redact
# Assert the reader's expectations explicitly
python3 scripts/oauth_triage.py --token-file ./token.json --expect-flat --expect-absolute-expiry
| Exit | Meaning |
|---|---|
| 0 | No defect signals found in the supplied artifacts |
| 1 | Suspect findings only, worth a second probe |
| 2 | A defect class is confirmed by the artifacts |
Exit 0 is not a health check. If the symptom is live and the classifier is clean, the artifacts are wrong, and Step 1 of the workflow is where to go back to.
Workflow
Step 1: Collect three artifacts
| Artifact | What it is | Why |
|---|---|---|
| Token record | the stored JSON the connector reads back, exactly as written | reveals envelope, field types, sentinels |
| Connector log | ordered events with timestamps: exchange, store, load, call, error | reveals order, races, which side failed |
| Timing | how long after a successful call the failure appears | separates expiry semantics from binding faults |
Redact secrets. The classifier needs key names, value types, and timestamps, never the token value.
Step 2: Run the classifier
python3 scripts/oauth_triage.py --token-file ./token.json --log ./connector.jsonl --json
Step 3: Match the class to its fix
Each class has one cheap confirmation and one fix. Apply the confirmation before the fix, because the fixes are destructive to each other: rotating credentials while the real fault is a shape mismatch produces a second, harder incident.
Class A: Envelope mismatch
The exchange returns a nested payload
Questions fréquentes
Pourquoi ne pas simplement se reconnecter ?
Se reconnecter peut masquer le problème pendant un moment, et la panne revient souvent quand le jeton expire.
Corrige-t-elle le problème à ma place ?
Elle identifie le type de défaut pour que vous corrigiez le bon élément. La correction elle-même vous revient.
Ne concerne-t-elle qu'un seul service ?
Non, elle s'applique à tout connecteur qui utilise une connexion OAuth et un serveur MCP.
Détails
Description originale de l’auteur
Use when an MCP connector that used to authenticate now fails (tool calls 401 after a good token exchange, breaks after refresh, returns another account's data), before changing code. Classifies the fault with oauth_triage.py.
Popularité
- Étoiles GitHub
- 29k
- Position au classement
- #9590
- Licence
- MIT
- Mis à jour
- 02/11/2026
Commentaires
- …
Autres skills de ce dépôt
agent-launcher-orchestrator
29kAide votre agent à planifier, construire, tester et programmer un agent géré Claude dans votre propre compte, étape par étape, à partir d'un objectif clair.
grade-iterate
29kPermet à votre agent d'évaluer le travail d'un agent IA géré selon une grille et de l'améliorer en un nombre fixe de tours, pour qu'il ne boucle jamais.
interview
29kPermet à votre agent de vous interroger sur une idée d'agent IA et de transformer vos réponses en un plan de construction simple avant tout lancement.
run-without-you
29kAide votre agent à configurer un agent géré IA pour qu'il s'exécute selon un planning ou lorsqu'un événement se produit, avec le calendrier vérifié avant le lancement.
Skills similaires
mcporter
394kAide votre agent à lister, appeler et inspecter des serveurs MCP et leurs outils en HTTP ou stdio, et à gérer leurs réglages de connexion.
fastmcp
260kAide votre agent à construire, tester et déployer un serveur MCP en Python, qui donne accès à votre API, base de données ou fichiers grâce à des outils.
mcp-oauth-remote-gateway
260kVous guide pour la connexion OAuth d'un serveur MCP distant lorsque Hermes tourne sur un serveur, où la connexion navigateur classique ne fonctionne pas.