Pular para o conteúdo
Skillpedia
Conectores (MCP)29 mil · #9590

mcp-oauth-triage

O que ela faz

Esta skill ajuda a diagnosticar conexões quebradas entre um assistente de IA e um serviço online que usa login OAuth. Ela é para desenvolvedores cujo conector de repente retorna erros de login ou mostra dados de outra conta.

Quando usar

  • ✓Quando um conector que funcionava ontem agora falha com erros de login e nada mudou.
  • ✓Quando um conector recebe o login certo, mas falha na primeira requisição depois de uma renovação.
  • ✓Quando um conector mostra dados que pertencem a outra conta.

Link da skill

https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/mcp-oauth-triage/SKILL.md

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/mcp-oauth-triage/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Meu conector de IA para o nosso serviço de cobrança começou a dar erros 401 depois que renovou o login. Me ajude a descobrir o motivo.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

Ela reúne três informações sobre a falha e roda um script classificador que organiza o problema em uma causa provável, para que a correção vá direto ao problema real.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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

Perguntas frequentes

Por que não simplesmente fazer login de novo?

Fazer login de novo pode esconder o problema por um tempo, e a falha costuma voltar quando o token expira.

Ela corrige o problema para mim?

Ela identifica o tipo de falha para que você corrija a coisa certa. A correção em si fica com você.

Ela serve só para um serviço?

Não. Ela se aplica a qualquer conector que use login OAuth e um servidor MCP.

Detalhes

Descrição original do autor

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.

repo: alirezarezvani/claude-skills

Popularidade

Estrelas no GitHub
29 mil
Posição no ranking
#9590
Licença
MIT
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas