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.
npx skills add lucaperret/agent-skills --skill mcp-oauthgit clone --depth 1 https://github.com/lucaperret/agent-skillsWrote 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.
[](https://agentmods.dev/skills/lucaperret/agent-skills/mcp-oauth)<a href="https://agentmods.dev/skills/lucaperret/agent-skills/mcp-oauth"><img src="https://agentmods.dev/badge/skills/lucaperret/agent-skills/mcp-oauth/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.
<a href="https://agentmods.dev/skills/lucaperret/agent-skills/mcp-oauth"><img src="https://agentmods.dev/badge/skills/lucaperret/agent-skills/mcp-oauth.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00140 | $0.02849 |
| Opus 5.5 | $0.00056 | $0.01140 |
| Sonnet 5.5 | $0.00028 | $0.00570 |
| Haiku 4.5 | $0.00014 | $0.00285 |
Grade A, and why
mcp-oauth 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 332 lines — stays where its author put it; the contents beside it link to each section on GitHub.
OAuth 2.0 PKCE for MCP Servers
Add production-ready OAuth authentication to a remote MCP server. This implements the full MCP authorization spec — discovery, dynamic client registration, PKCE authorization, token exchange, and refresh.
When you need this
Your MCP server accesses user-specific data (their account, their files, their playlists). Without auth, anyone with your server URL could access anyone's data. OAuth lets each user authenticate with their own credentials and get their own token.
Architecture overview
Your MCP server plays two roles:
- OAuth server for MCP clients (Claude, Smithery) — issues your own tokens
- OAuth client to the upstream service (Tidal, GitHub, Slack, etc.) — exchanges for their tokens
MCP Client (Claude) → Your OAuth Server → Upstream Service (e.g., Tidal)
│ │ │
│ 1. Discover OAuth │ │
│ 2. Register client │ │
│ 3. Authorize │──→ 4. Redirect to │
│ │ upstream login ──→ │
│ │ ←── 5. Callback ──────│
│ ←── 6. Auth code │ │
│ 7. Exchange token │ │
│ 8. Call tools ─────→│──→ 9. API calls ──────→│
Required endpoints
1. OAuth Discovery
app/.well-known/oauth-authorization-server/route.ts:
import { NextResponse } from 'next/server';
const SITE_URL = process.env.NEXT_PUBLIC_SITE_URL || 'https://your-domain.com';
export async function GET() {
return NextResponse.json({
issuer: SITE_URL,
authorization_endpoint: `${SITE_URL}/api/authorize`,
token_endpoint: `${SITE_URL}/api/token`,
registration_endpoint: `${SITE_URL}/api/register`,
response_types_supported: ['code'],
grant_types_supported: ['authorization_code', 'refresh_token'],
code_challenge_methods_supported: ['S256'],
token_endpoint_auth_methods_supported: ['none'],
}, {
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, OPTIONS',
},
});
}
export async function OPTIONS() {
return new NextResponse(null, {
status: 204,
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, OPTIONS',
'Access-Control-Allow-Headers': 'Content-Type, Authorization',
},
});
}
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.
- 2mo ago First seen · 332 lines · 140 tokens per session scan A eb00bd0b1b01
mcp-oauth is a skill published in the GitHub repository lucaperret/agent-skills (7 stars, last pushed 7mo ago), licensed MIT. It adds 140 tokens to every session and 2,849 once invoked, about $0.0006 per session on Opus 5.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-31.
Other skills, from other repositories
nylas-api
Build email, calendar, and contacts integrations with the Nylas v3 API. Use when code imports nylas, @nylas/nylas, nylas-python, or user asks about Nylas API, email API integration, calendar API, contacts API, OAuth grants, agent accounts, webhooks, scheduler, notetaker, smart compose, or transactional send. DO NOT…
nylas-email-templates
Write, test, and deploy Nylas email templates and workflows with an API key. Use when user asks to create or edit a Nylas email template, set up a workflow for booking., event., grant., notetaker., or message. triggers, send email with a stored template through the Send API, translate or brand a Scheduler email, or…
project-architecture
Skill "project-architecture" from pjosols/pyfastmail-mcp, covering project architecture, package layout, key patterns and adding a new tool.
api-implementation
Skill "api-implementation" from pjosols/pyfastmail-mcp, covering api implementation, jmap (mail, masked email), dav protocols (contacts, calendars, files), carddav (rfc 6352) — contacts and caldav (rfc 4791) — calendars.
mem0-oss-to-platform
Plan, then execute, a migration of a project from the mem0 open-source / self-hosted SDK (local Memory class) to the mem0 Platform / hosted SDK (MemoryClient). TRIGGER when: the developer wants to move, switch, or migrate mem0 off OSS/self-hosted to the hosted API, e.g. "migrate my mem0 setup to the platform", "switch…
azure-mgmt-botservice-dotnet
Azure Resource Manager SDK for Bot Service in .NET. Management plane operations for creating and managing Azure Bot resources, channels (Teams, DirectLine, Slack), and connection settings. Triggers: "Bot Service", "BotResource", "Azure Bot", "DirectLine channel", "Teams channel", "bot management .NET", "create bot".