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 BrainWeb/payload-mcp-oauth --skill installgit clone --depth 1 https://github.com/BrainWeb/payload-mcp-oauthWrote 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/brainweb/payload-mcp-oauth/install)<a href="https://agentmods.dev/skills/brainweb/payload-mcp-oauth/install"><img src="https://agentmods.dev/badge/skills/brainweb/payload-mcp-oauth/install/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/brainweb/payload-mcp-oauth/install"><img src="https://agentmods.dev/badge/skills/brainweb/payload-mcp-oauth/install.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.00122 | $0.01239 |
| Opus 5.5 | $0.00049 | $0.00496 |
| Sonnet 5.5 | $0.00024 | $0.00248 |
| Haiku 4.5 | $0.00012 | $0.00124 |
Grade A, and why
install scanned grade A with 1 finding 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 1mo 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- `curl <issuer>/.well-known/oauth-authorization-server` returns JSON metadata. How it starts
The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Install @brainwebuk/payload-plugin-mcp-oauth
Adds OAuth 2.1 + PKCE + Dynamic Client Registration to an existing
@payloadcms/plugin-mcp MCP server. Additive — the API-key flow keeps
working. Always prefer the latest version (the install path has had several
fixes; use >= 0.3.3).
Prerequisites
- A Payload v3 app with
@payloadcms/plugin-mcpalready installed and working. - Next.js 14 / 15 / 16 (for the exported proxy/middleware).
Steps
-
Install:
pnpm add @brainwebuk/payload-plugin-mcp-oauth -
Register it AFTER
mcpPlugin(), sharing ONE options object (most common footgun):const mcpOptions = { collections: { posts: { enabled: { find: true, create: true, update: true } } }, } plugins: [ mcpPlugin(mcpOptions), payloadMcpOAuth({ issuer: process.env.NEXT_PUBLIC_SERVER_URL!, mcpPluginOptions: mcpOptions, // ← the SAME reference, never a copy/spread }), ]A copy/spread silently breaks OAuth token auth (API keys keep working, so it's easy to miss). Registering it before
mcpPlugin()throws on boot. -
Add the proxy — Next 16:
src/proxy.ts; Next 14/15:src/middleware.ts. Re-export the handler but declareconfigas a local literal (never re-exportconfig— it 500s every route on Next 16):export { mcpOAuthMiddleware as proxy } from '@brainwebuk/payload-plugin-mcp-oauth/middleware' export const config = { matcher: ['/', '/.well-known/oauth-authorization-server', '/.well-known/oauth-protected-resource'], } -
Env: set
NEXT_PUBLIC_SERVER_URL(public HTTPS origin; used as the OAuth issuer) andPMOAUTH_TOKEN_PEPPER(openssl rand -hex 32; required ≥ 32 chars in production). Ensure Payload'sserverURLequalsNEXT_PUBLIC_SERVER_URL— the consent flow relies on a first-party session cookie matching that origin. -
Apply the schema — pick ONE workflow, don't mix:
- Dev push (SQLite/Postgres in dev): just start the app.
- Migrations (production):
pnpm payload migrate:createthenpnpm payload migrate. If you already booted the app once before installing, on SQLite either upgrade to>= 0.3.2or reset the dev DB (rm your.db*) so the schema is created fresh.
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.
- 1mo ago First seen · 97 lines · 122 tokens per session scan A 38ab7846468d
install is a skill published in the GitHub repository BrainWeb/payload-mcp-oauth (8 stars, last pushed 2d ago), licensed MIT. It adds 122 tokens to every session and 1,239 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
oauth-state-parameter-abuse
Identify and exploit logic flaws in OAuth implementations, focusing specifically on the absence or improper validation of the state parameter, which leads to Cross-Site Request Forgery (CSRF) and account takeover (ATO).
design-mcp-server
Design the tool surface, resources, and service layer for a new MCP server. Use when starting a new server, planning a major feature expansion, or when the user describes a domain/API they want to expose via MCP. Produces a design doc at docs/design.md that drives implementation.
api-telemetry
Catalog of OpenTelemetry instrumentation built into framework @cyanheads/mcp-ts-core — spans, metrics, completion logs, env config, runtime caveats, custom instrumentation patterns, and cardinality rules. Use when enabling OTel export, adding custom spans or metrics in services, debugging missing telemetry, looking up…
api-connector-builder
Use when writing a client for someone else's REST or GraphQL API: auth flow choice and token refresh, pagination to exhaustion, retry-with-jitter on transient failures only, rate-limit-aware throttling. NOT inbound callbacks (that is webhooks), NOT chaining services (that is automation-flows), NOT designing your own…
api-services
API reference for built-in service providers (LLM, Speech, Graph). Use when looking up service interfaces, provider capabilities, or integration patterns.
cmdb-patterns
Create ServiceNow CIs and cmdbrelci relationships, walk upstream/downstream impact, detect orphan/stale CIs, and align discovered CIs with the proper sysclassname hierarchy.