Skip to main content
These are the built-in plugins exported from @redopjs/redop today. Each one returns a Redop instance, so you attach it with .use(...).

logger(opts?)

  • logs tool start, end, and error events
  • options:
    • level?: "debug" | "info" | "warn" | "error"
    • write?: (entry) => void
  • default level: info

apiKey(opts?)

  • validates an HTTP header on HTTP requests
  • options:
    • key?: string
    • keys?: string[]
    • headerName?: string
    • contextKey?: string
    • required?: boolean
    • validateKey?: (apiKey, event) => boolean | Promise<boolean>
    • legacy aliases still supported: secret, ctxKey, validate
  • default header: x-api-key
  • default context key: apiKey

jwt(opts)

  • validates bearer JWTs on HTTP requests
  • supports shared-secret verification or JWKS
  • options:
    • secret?: string
    • jwksUri?: string
    • issuer?: string
    • audience?: string | string[]
    • requiredScopes?: string[]
    • optional?: boolean

oauth(opts)

  • validates OAuth bearer tokens using issuer discovery (OAuth AS or OpenID) + JWKS
  • when resource is set, serves RFC 9728 Protected Resource Metadata and returns HTTP 401/403 WWW-Authenticate challenges for MCP clients (Claude, etc.)
  • options:
    • issuer: string
    • resource?: string (absolute MCP URL — required for Claude-style OAuth)
    • audience?: string | string[] (defaults to resource)
    • authorizationServers?: string[] (defaults to [issuer])
    • requiredScopes?: string[]
    • scopesSupported?: string[]
    • optional?: boolean

See also