Przejdź do treści
Biblioteka skilli
Programowanie · Integracja z narzędziem

install

/install

Instaluje i konfiguruje wtyczkę @brainwebuk/payload-plugin-mcp-oauth z OAuth 2.1, PKCE i dynamiczną rejestracją klienta dla serwera MCP w Payload, by dodać go jako Custom Connector w Claude.ai.

Licencja
MIT
Ostatnia zmiana repozytorium
25.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 25.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Instaluje i konfiguruje wtyczkę @brainwebuk/payload-plugin-mcp-oauth z OAuth 2.1, PKCE i dynamiczną rejestracją klienta dla serwera MCP w Payload, by dodać go jako Custom Connector w Claude.ai.

Wyzwalacze z opisu

Authentication requiredno such column: oauth_clients_idmust be registered AFTER mcpPlugin
Oryginalny opis (EN)

Install and configure @brainwebuk/payload-plugin-mcp-oauth — OAuth 2.1 + PKCE + Dynamic Client Registration for a Payload @payloadcms/plugin-mcp server, so it can be added as a Custom Connector in Claude.ai. Use when adding OAuth to a Payload MCP app; wiring the plugin, proxy/middleware, or env; or debugging the install (consent 401 "Authentication required", SQLite push "no such column: oauth_clients_id", missing OAuth admin collections, "must be registered AFTER mcpPlugin", or OAuth tokens 401 while API keys work).

Jak działa

  1. Prerequisites
  2. Steps
  3. Verify
  4. Make it usable for AI agents (recommended)
  5. Common failures → fixes
Sekcje z nagłówków SKILL.md, w oryginale · 86 linii, 545 słów
Podgląd SKILL.md
---
name: install
description: >-
  Install and configure @brainwebuk/payload-plugin-mcp-oauth — OAuth 2.1 + PKCE +
  Dynamic Client Registration for a Payload @payloadcms/plugin-mcp server, so it
  can be added as a Custom Connector in Claude.ai. Use when adding OAuth to a
  Payload MCP app; wiring the plugin, proxy/middleware, or env; or debugging the
  install (consent 401 "Authentication required", SQLite push "no such column:
  oauth_clients_id", missing OAuth admin collections, "must be registered AFTER
  mcpPlugin", or OAuth tokens 401 while API keys work).
---

# 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-mcp` already installed and working.
- Next.js 14 / 15 / 16 (for the exported proxy/middleware).

## Steps

1. **Install:** `pnpm add @brainwebuk/payload-plugin-mcp-oauth`

2. **Register it AFTER `mcpPlugin()`, sharing ONE options object** (most common footgun):
   ```ts
   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.

3. **Add the proxy** — Next 16: `src/proxy.ts`; Next 14/15: `src/middleware.ts`.
   Re-export the handler but declare `config` as a **local literal** (never
   re-export `config` — it 500s every route on Next 16):
   ```ts
   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'],
   }
   ```

4. **Env:** set `NEXT_PUBLIC_SERVER_URL` (public HTTPS origin; used as the OAuth
   issuer) and `PMOAUTH_TOKEN_PEPPER` (`openssl rand -hex 32`; required ≥ 32 chars
   in production). Ensure Payload's `serverURL` equals `NEXT_PUBLIC_SERVER_URL` —
   the consent flow relies on a first-party session cookie matching that origin.

5. **Apply the schema** — pick ONE workflow, don't mix:
   - **Dev push** (SQLite/Postgres in dev): just start the app.
   - **Migrations** (production): `pnpm payload migrate:create` then `pnpm payload migrate`.
   If you already booted the app once **before** installing, on SQLite either
   upgrade to `>= 0.3.2` or reset the dev DB (`rm your.db*`) so the schema is
   created fresh.

## Verify
- `curl <issuer>/.well-known/oauth-authorization-server` returns JSON metadata.
- In the admin, the **MCP** nav group shows **OAuth Clients** and **OAuth Tokens**
  (when logged in as a user of your `userCollection`).

## Make it usable for AI agents (recommended)
Agents only know what the server tells them. On `mcpPlugin()` set
`serverOptions.instructions` (how to use the server + non-obvious field rules),
per-collection `description`, and field `admin.description` (these flow into the
generated tool schemas). For gnarly create flows, define an MCP `prompt`. A Claude *Skill*
cannot reach a connecting web agent — `instructions`/`prompts` are the
protocol-native bridge.

## Common failures → fixes
- **Consent Approve → `401 access_denied / "Authentication required"`** — upgrade
  to `>= 0.3.1` (a `Referrer-Policy: no-referrer` bug made the browser send
  `Origin: null`). If it persists, `serverURL`/`NEXT_PUBLIC_SERVER_URL` must
  exactly match the browser origin (scheme, host, no trailing slash).
- **`SQLITE_ERROR: no such column: oauth_clients_id`** (rebuilding
  `payload_locked_documents_rels`) — upgrade to `>= 0.3.2`, or reset the dev DB,
  or add the plugin before the first boot.
- **OAuth tokens 401 but API keys work** — `mcpPluginOptions` wasn't the *same*
  object reference passed to both plugins.
- **`must be registered AFTER mcpPlugin()`** — fix plugin order. (On `>= 0.3.3`
  it's fine to leave `payloadMcpOAuth` registered while the MCP plugin is
  `disabled` — it no-ops instead of crashing.)
- **A tool like `createPages` is missing** — enable that op in
  `collections.<slug>.enabled` (`create`/`update`/`delete`); `enabled: true`
  turns on all of them.

For the full reference see the package's `INSTALL_FOR_AGENTS.md` and README.

Wersje

RepozytoriumWynikLicencja
Ta strona · brainweb/payload-mcp-oauth100MIT
rossoctl/context-guru100Apache-2.0
jeremylongshore/tons-of-skills-marketplace100MIT
terrylica/cc-skills100MIT
x-cmd/x-cmd100Apache-2.0
florianbuetow/claude-code100MIT
felipefontoura/bento100MIT
Dragoon0x/dragoon-skills100MIT
rekal-dev/rekal-cli95Apache-2.0

Migawka bazy z 28.10.2026 · wersja paczki a4365ff8b4b7 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100mcp-client-dynamic-client-registration
    Wspiera dynamiczną rejestrację klienta OAuth 2.0 (Dynamic Client Registration) w klientach MCP, które łączą się z serwerami autoryzacji obsługującymi taką rejestrację.
  • 100mcp-oauth-setup
    Wdraża uwierzytelnianie serwerów MCP z OAuth Dynamic Client Registration (RFC 7591), wykrywaniem metadanych RFC 8414 i poświadczeniami per agent, w panelach administracyjnych łączących z zewnętrznymi serwerami MCP.
  • 100oauth-2-0-setup
    Wdraża przepływy uwierzytelniania OAuth 2.0: kod autoryzacji z PKCE, client credentials i device code dla bezpiecznej integracji z API.
  • 100payloadcms-ops
    Opisuje architekturę Payload CMS 3 w Next.js: kolekcje, globals, pola, kontrolę dostępu, hooki, Local API, adaptery storage i bazy (Postgres, MongoDB, SQLite).
  • 100shopify-install-auth
    Instaluje i konfiguruje uwierzytelnianie aplikacji Shopify z OAuth, tokenami sesji i SDK @shopify/shopify-api, dla dostępu do Admin lub Storefront API.
  • 100dynamic-client-registration
    Wspiera OAuth 2.0 Dynamic Client Registration w serwerach autoryzacji, przy budowie lub przeglądzie zarządzania klientami dla ekosystemów MCP.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.