Skip to main content

Documentation Index

Fetch the complete documentation index at: https://redop.useagents.site/docs/llms.txt

Use this file to discover all available pages before exploring further.

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
import { logger, Redop } from "@redopjs/redop";

new Redop({ serverInfo: { name: "logs" } }).use(logger({ 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
import { apiKey, Redop } from "@redopjs/redop";

new Redop({ serverInfo: { name: "auth" } }).use(
  apiKey({
    key: process.env.API_SECRET ?? "dev-secret",
  }),
);

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
import { jwt, Redop } from "@redopjs/redop";

new Redop({ serverInfo: { name: "auth" } }).use(
  jwt({
    secret: process.env.JWT_SECRET ?? "dev-jwt-secret",
  }),
);

oauth(opts)

  • validates OAuth bearer tokens using issuer discovery and JWKS
  • options:
    • issuer: string
    • audience?: string | string[]
    • requiredScopes?: string[]
    • optional?: boolean
import { oauth, Redop } from "@redopjs/redop";

new Redop({ serverInfo: { name: "auth" } }).use(
  oauth({
    issuer: "https://auth.example.com",
    audience: "my-mcp-server",
  }),
);

See also