Fs mcp retry
Retry a request against a configured MCP alias after refreshing OAuth tokens from ~/.mcp-auth. Supports Gemini CLI (~/.gemini/settings.json), Claude Code, and Codex (~/.codex/config.toml). Use when an MCP tool call fails with an auth or expired token error.From its SKILL.md
npx -y skills add lakamsani/ai-plugins --skill fs-mcp-retryAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
3.0 KB, as published. Nobody here has run it
FS MCP Retry
Retry MCP requests after automatically refreshing expired OAuth tokens. Works across multiple AI agent hosts.
When to Use
Activate when:
- An MCP tool call fails with an authentication or expired token error
- The user asks to refresh OAuth tokens for an MCP alias
- The user asks to retry a failed MCP request
Supported Hosts
| Host | Config location | Format |
|---|---|---|
| Claude Code | ~/.claude.json | JSON — mcpServers |
| Cursor | ~/.cursor/mcp.json | JSON — mcpServers |
| Gemini CLI | ~/.gemini/settings.json | JSON — mcpServers |
| Codex | ~/.codex/config.toml | TOML — mcp_servers |
The script auto-detects by checking configs in the order above (first match wins). Pass --config to override.
Workflow
- Parse the first token as the MCP alias.
- Treat the remaining text as the query.
- Resolve the alias from the local MCP config (auto-detected or specified).
- Infer the tool namespace as
mcp__<alias with '-' replaced by '_'>__*. - Execute the request once.
- If the request fails because of authentication or expired tokens, run:
python3 skills/fs-mcp-retry/scripts/refresh_mcp_oauth.py <alias> --force
- Retry the original request once.
- Report whether a refresh was needed.
Usage Examples
Auto-detect config (tries ~/.claude.json, ~/.cursor/mcp.json, ~/.gemini/settings.json, ~/.codex/config.toml)
python3 skills/fs-mcp-retry/scripts/refresh_mcp_oauth.py vamsee-fs-mcp-remote --force
Gemini CLI (explicit)
python3 skills/fs-mcp-retry/scripts/refresh_mcp_oauth.py fs-remote --force \
--config ~/.gemini/settings.json
Codex (explicit)
python3 skills/fs-mcp-retry/scripts/refresh_mcp_oauth.py vamsee-fs-remote --force \
--config ~/.codex/config.toml
Claude Code
Claude Code users install this as a plugin:
claude plugin marketplace add lakamsani/ai-plugins
claude plugin install fs-mcp-retry@ai-plugins
Once installed, the skill activates automatically when an MCP tool call fails with an auth error. Claude Code will run the refresh script and retry the request.
To manually trigger from within a Claude Code session, describe the MCP alias and the failed request — the skill instructions guide the agent through the retry workflow.
Rules
- Do not guess an alias that is not configured locally.
- If the alias is missing, ask for it.
- If the query is empty, ask what to do with that alias.
- Retry at most once.
- Surface refresh failures directly.
Config Override
python3 skills/fs-mcp-retry/scripts/refresh_mcp_oauth.py <alias> --force \
--config /path/to/config.json \
--auth-root /path/to/.mcp-auth