mcp-token-expired

mcp-token-expired is a skill for Claude Code, Codex from tpierrain/kenjaku. It costs 85 tokens per session (769 once invoked), scanned A, original, Apache-2.0.

A procedure for recovering access when a connected service such as Slack, Gmail, Calendar, Notion, or Google Drive rejects an expired login token. A token is the credential that lets the add-on call that service.

In plain words
What is it for?
Use it after an authentication error from a connected service to show the required alert, reconnect the account, or proceed when reconnection is not appropriate.
Why use it?
It distinguishes expired credentials from services blocked by an organisation or provider, then guides reconnection or continues with a fallback.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md.

Good fit Use it after an authentication error from a connected service to show the required alert, reconnect the account, or proceed when reconnection is not appropriate.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tpierrain/kenjaku/mcp-token-expired
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add tpierrain/kenjaku --skill mcp-token-expired
Clone the repo
git clone --depth 1 https://github.com/tpierrain/kenjaku

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-token-expired

README.md
[![agentmods](https://agentmods.dev/badge/skills/tpierrain/kenjaku/mcp-token-expired/github.svg)](https://agentmods.dev/skills/tpierrain/kenjaku/mcp-token-expired)
Your own site
<a href="https://agentmods.dev/skills/tpierrain/kenjaku/mcp-token-expired"><img src="https://agentmods.dev/badge/skills/tpierrain/kenjaku/mcp-token-expired/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcp-token-expired

Your own site · 80×15
<a href="https://agentmods.dev/skills/tpierrain/kenjaku/mcp-token-expired"><img src="https://agentmods.dev/badge/skills/tpierrain/kenjaku/mcp-token-expired.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 769 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00085 $0.00769
Opus 5 $0.00043 $0.00385
Sonnet 5 $0.00017 $0.00154
Haiku 4.5 $0.00009 $0.00077

Measured 12d ago against content hash becf4badc1bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

mcp-token-expired scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

engine-skills/mcp-token-expired/SKILL.md · 59 lines

How it starts

The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Expired MCP token — visual alert + reconnection

As soon as a tool of a native claude.ai connector (Slack, Gmail, Calendar, Notion, Google Drive) returns an authentication error (invalid_auth_token, not_authed, token_expired, auth_failed…), run the procedure below.

⚠️ Exception: a connector that is unavailable by design

Some connectors may be unavailable by design — not because of an expired token, but because an org policy or a provider restriction blocks them for this account. This is not a token to refresh: do NOT show the alert below and do NOT run the reconnection. Treat the connector as an unavailable source by default: use the fallback, briefly note " unavailable (org/provider restriction)", and continue without blocking.

Procedure (real authentication error)

  1. Immediately show this alert block (as-is, emojis included):

    🚨🚨🚨 MCP TOKEN EXPIRED 🚨🚨🚨
    ⚠️  Connector: <name> (mcp__claude_ai_<...>)
    ⚠️  Error: <error code>
    🔌 Impact: <what becomes unavailable> → fallback used.
    
    👉 TO RECONNECT: type  /mcp  → select <connector> → Re-authenticate
       (browser OAuth flow, ~20 s, and everything works again)
    
    🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨
    
  2. Push /mcp in the terminal as the first attempt. If the token is simply expired and /mcp offers a re-authentication, this is the fastest path.

  3. If /mcp shows connected but the call still fails with invalid_auth_token → the downstream token is stale despite the "connected" status; a /mcp will not regenerate it (it believes it is already connected). Real fix: Disconnect then Reconnect the connector on claude.ai (open "https://claude.ai/settings/connectors"). On reconnect, explicitly authorize the right account / workspace (the SSO or identity this connector expects) — otherwise the connector stays "connected" but on an invalid token.

  4. Continue with the fallback without blocking (e.g. an alternative MCP connector, or a channel/timestamp search for Slack — see the Sourcing rule in CLAUDE.md). Do not stop and wait for the reconnection.

Read the full file on GitHub · 59 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 59 lines · 85 tokens per session scan A becf4badc1bf

Subscribe to this mod's changes

mcp-token-expired is a skill published in the GitHub repository tpierrain/kenjaku (82 stars, last pushed today), licensed Apache-2.0. It adds 85 tokens to every session and 769 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories