mcp-oauth-triage
하는 일
이 스킬은 AI 어시스턴트와 OAuth 로그인을 쓰는 온라인 서비스 사이의 끊긴 연결을 진단하도록 돕습니다. 커넥터가 갑자기 로그인 오류를 내거나 다른 계정의 데이터를 보여 주는 개발자에게 맞습니다.
사용하는 경우
- ✓어제까지 잘 작동하던 커넥터가 아무것도 바뀌지 않았는데 로그인 오류로 실패할 때.
- ✓커넥터가 로그인은 올바르게 했지만 토큰을 갱신한 뒤 첫 요청에서 실패할 때.
- ✓커넥터가 다른 계정의 데이터를 보여 줄 때.
스킬 링크
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/skills/mcp-oauth-triage/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“청구 서비스용 AI 커넥터가 토큰을 갱신한 뒤 401 오류를 내기 시작했습니다. 원인을 찾도록 도와주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
스킬은 실패에 관한 세 가지 정보를 모은 뒤, 분류 스크립트를 실행해 문제를 가능성 높은 원인으로 나눕니다. 그래서 수정이 실제 문제를 겨냥하게 됩니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 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
자주 묻는 질문
그냥 다시 로그인하면 안 되나요?
다시 로그인하면 잠시 문제가 가려질 수 있고, 토큰이 만료되면 실패가 다시 나타나는 경우가 많습니다.
문제를 대신 고쳐 주나요?
고장의 유형을 알려 주므로 올바른 부분을 고칠 수 있습니다. 실제 수정은 여러분이 합니다.
한 서비스에만 쓸 수 있나요?
아니요. OAuth 로그인과 MCP 서버를 쓰는 모든 커넥터에 적용됩니다.
상세 정보
작성자의 원본 설명
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.
인기도
- GitHub 스타
- 29k
- 순위
- #9590
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
agent-launcher-orchestrator
29k하나의 명확한 목표에서 시작해 내 계정의 Claude 관리형 에이전트를 계획하고, 만들고, 테스트하고, 예약하도록 돕습니다.
grade-iterate
29k에이전트가 채점 기준표에 따라 관리형 AI 에이전트의 결과물을 평가하고, 정해진 횟수 안에서 개선하도록 돕습니다. 끝없이 반복하지 않습니다.
interview
29kAI 에이전트 아이디어에 대해 질문하고, 답변을 간단한 빌드 계획으로 바꿔 어떤 것도 출시하기 전에 정리하도록 돕습니다.
run-without-you
29k에이전트가 관리형 AI 에이전트를 예약 또는 이벤트에 따라 실행되도록 설정하고, 출시 전에 cron 시간을 확인하도록 돕습니다.
비슷한 스킬
mcporter
394k에이전트가 HTTP나 stdio로 MCP 서버와 그 도구를 목록화하고, 호출하고, 점검하며, 로그인 설정을 관리하도록 돕습니다.
fastmcp
260kAPI, 데이터베이스, 파일에 AI 어시스턴트가 도구로 접근할 수 있도록 Python MCP 서버를 만들고 테스트하고 배포하도록 돕습니다.
mcp-oauth-remote-gateway
260kHermes가 서버에서 실행될 때 일반 브라우저 로그인이 닿지 않는 경우를 위해, 원격 MCP 서버의 OAuth 로그인을 단계별로 안내합니다.