Skilled OpenAPI

Checked against FrontMCP 1.12.2 on

SkilledOpenApiPlugin, from @frontmcp/plugin-skilled-openapi, serves a REST API to the model as a few named skills instead of a tool per endpoint. You describe the API in a bundle: its services, credentials, operations, and skills that each group some operations with instructions. The model sees four tools. search_skill finds a skill, load_skill reads its instructions and the operations it offers, execute_action runs one of those operations, and run_workflow runs a short script that chains several, each call checked, authorized and sent with credentials the model never sees. Use it for an API with too many operations to list as tools; for a small one, where the model should see every operation, use the OpenAPI adapter. The two work side by side.

@FrontMcp({ plugins: [SkilledOpenApiPlugin.init({ source, requireSignature?, trustedKeys?, credentials?, authProviders?, confirm?, outbound?, unprotectedOps?, ... })] })

Reference

SkilledOpenApiPlugin.init(options)

Install the plugin, and the two packages run_workflow runs scripts with:

npm install @frontmcp/sdk @frontmcp/plugin-skilled-openapi @enclave-vm/core @enclave-vm/ast

Without @enclave-vm/core and @enclave-vm/ast, search_skill, load_skill and execute_action still work; only run_workflow needs them. In a web page, run_workflow uses @enclave-vm/browser and @enclave-vm/ast instead: see in a web page. Install @frontmcp/sdk at the same version as the plugin. Changed in 1.9.7: the plugin uses the app's SDK through a peer dependency; before, it could install a separate SDK copy. Apps that don't list the SDK must add it when their package manager doesn't install peers.

List it in the plugins of @FrontMcp, or of an @App. Here a CI job publishes a signed bundle, and the server polls for it:

main.ts
import { FrontMcp } from "@frontmcp/sdk";
import { SkilledOpenApiPlugin } from "@frontmcp/plugin-skilled-openapi";

@FrontMcp({
  info: { name: "billing", version: "1.0.0" },
  apps: [],
  plugins: [
    SkilledOpenApiPlugin.init({
      source: {
        type: "saas",
        endpoint: "https://bundles.acme.example/v1/bundles/billing-prod",
        authToken: process.env.BUNDLE_PULL_TOKEN!,
        expectedAudience: "billing-prod",
        jwksUrl: "https://bundles.acme.example/.well-known/jwks.json",
        expectedIssuer: "https://bundles.acme.example",
      },
      trustedKeys: [{ keyId: "ci-2026", alg: "EdDSA", publicKeyPem: process.env.BUNDLE_PUBLIC_KEY! }],
      credentials: { "billing-token": process.env.BILLING_API_TOKEN! },
      unprotectedOps: "deny",
    }),
  ],
})
export default class Server {}

SkilledOpenApiPlugin is also the package's default export. It isn't part of the @frontmcp/plugins package. See more examples below.

A server runs one Skilled OpenAPI plugin. A second one, in the same plugins list or in another (the server's and an app's, or two apps'), stops the server at startup with a DuplicatePluginError (DUPLICATE_PLUGIN). One bundle can describe several services, each with its own baseUrl and auth binding, so put them in one bundle; to serve separate bundles, give each its own app with splitByApp: true. Changed in 1.11.1: before, a second plugin started without an error, and only one of the bundles was served.

Options

init() checks the options with a Zod schema (exported as skilledOpenApiPluginOptionsSchema) and throws a ZodError for a bad one, like source.endpoint: must use https://. Keys it doesn't know are dropped.

OptionTypeDefaultDescription
source{ type: "inline" | "static" | "npm" | "saas", ... }requiredWhere the bundle comes from. See sources.
requireSignaturebooleantrue, or false with dev: trueApply only bundles with a valid signature from one of trustedKeys. An unsigned bundle is rejected, and the server has no bundle.
trustedKeys{ keyId, alg: "RS256" | "EdDSA", publicKeyPem }[][]Public keys a bundle's signature may be made with, matched by keyId.
credentialsRecord<string, string>Secrets for the bundle's auth bindings, keyed by their vaultRef: { "billing-token": process.env.BILLING_API_TOKEN }. A trailing newline is removed. To fetch them from a vault instead, see credentials.
authProvidersRecord<string, string>Bindings that send each caller's own credential: for a vaultRef, the name of the auth provider the caller connects it as, like { "billing-token": "billing" }. A vaultRef listed here and in credentials throws VaultRefListedTwiceError. See credentials. New in 1.11.1.
confirm{ methods?, tags?, operations?, whenUnsupported? }Actions that ask the user before their request is sent. See asking the user. New in 1.11.1.
unprotectedOps"allow" | "deny""allow"Whether an operation with no requiredAuthorities, on itself or its skill, may be called. "deny" blocks it unless it's marked public: true. See authorization.
outboundOutboundOptionssee belowLimits on the requests to your API.
devbooleanfalseFor development: turns off signature checks (unless you set requireSignature), allows http: URLs (sets outbound.allowHttp), and logs dev=true: signature verification BYPASSED and http:// URLs allowed. NEVER use this in production.
bundleCacheDirstring.frontmcp/skilled-openapi/Where the saas source keeps the last bundle the plugin applied.
exposeOperationsAsInternalToolsbooleantrueRegisters each operation as an internal tool, <bundleId>.<operationId>, like acme:billing.getInvoice, for your tools to call with this.callTool(), and for execute_action to run an action through. They aren't listed, and a client can't call them. See What the plugin adds.
sourceConflictPolicy"static-wins" | "last-wins" | "reject""static-wins"Accepted and unused: the plugin has one source.
providersProviderType[]More providers for the plugin, as for any plugin's init(). One way to replace the credential resolver.

outbound:

FieldTypeDefaultDescription
allowHttpbooleanfalseAllow http: services. Otherwise a request to one fails with forbidden scheme "http:" (https: required).
allowPrivateNetworksbooleanfalseLogs a startup warning. Allow services on private and loopback addresses (10.0.0.0/8, 127.0.0.0/8, …), and hosts whose name doesn't resolve. Link-local and cloud metadata addresses stay blocked.
defaultTimeoutMsnumber30000Milliseconds a request may take; an operation's timeoutMs overrides it.
defaultMaxResponseBytesnumber262144 (256 KB)Largest response read; an operation's maxResponseBytes overrides it. Exceeding it cancels the response body.
maxConcurrencyPerHostnumber10Requests in flight to one host; more wait their turn. Must be greater than 0.
egressProxystringA proxy URL, like http://proxy.internal:3128, that every request to the bundle's services goes through. On Node it needs the undici package, which the plugin loads only when this is set. Changed in 1.9.2: it was accepted and unused.
errorBodies"include" | "status-only""include"What a failed action's error says about an API's error answer: its status and body, redacted and cut at 2048 characters, or "status-only", the status alone, for an API whose error bodies hold internal details. See How run_workflow runs a script. New in 1.11.1.

confirm:

FieldTypeDefaultDescription
methods("GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD")[]Actions whose operation uses one of these HTTP methods.
tagsstring[]Actions whose operation, or a skill that lists it, has one of these tags.
operationsstring[]Actions by operationId.
whenUnsupported"refuse" | "allow""refuse"For a client that can't show the question: refuse the action, or run it unasked.

An action that any of methods, tags or operations names asks. Unknown keys in confirm are errors.

init() with no argument throws a ZodError: source is required.

Sources

typeFieldsWhat it does
inlinecontentThe bundle object itself. Loaded once. The source for tests, for bundles built in code, and for runtimes without a file system.
staticpath, watch (default false)A bundle file, JSON (.json) or YAML (.yaml, .yml; other extensions are guessed from the first character). With watch: true, the plugin reloads it 250 ms after it changes, also when it failed to load at startup.
npmpackageName, exportName (default: the default export), verifyProvenance (default true)Imports a package and uses one of its exports as the bundle. Loaded once; a new version needs a redeploy. Provenance checks aren't implemented, so with verifyProvenance: true the plugin refuses to import the package, and the server has no bundle. Set it to false to load the package.
saasendpoint, authToken, expectedAudience, jwksUrl, expectedIssuer, pollIntervalMs (default 300000), allowRollback, enableWebhook (default false), requirePushBodyDigest, pushReplayStorageGETs the bundle (JSON or YAML) from endpoint, which must be https:, with Authorization: Bearer <authToken>, when the server starts and then every pollIntervalMs, also after a first pull that failed. Before each pull it checks authToken (see below). Each bundle the plugin applies is saved to <bundleCacheDir>/<expectedAudience>.json (characters other than letters, digits, _, . and - become _), and stands in at startup (see below). A redirect is refused. With enableWebhook, it also takes pushed bundles.

authToken is a JWT that the bundle server issued for your server. Before every pull, at startup, on each poll and on each refresh a host's scheduler runs, the saas source fetches the keys at jwksUrl (without the token; a redirect is refused) and checks the token: it must be signed by one of those keys, its iss must be expectedIssuer, its aud must include expectedAudience (and so must its resource claim, when it has one), and it must have an exp that hasn't passed. A token that fails stops the pull, and the saved bundle isn't used in its place: the server starts without a bundle, or keeps the one it has. The log names the check it failed, at warn level and without the token, like [saas-source] saas:<endpoint>: pull token check failed (expired), and so does /readyz (see when no bundle is loaded). A jwksUrl that can't be reached counts as the bundle server being down, so the saved bundle is used. Pulling from a bundle server shows each case.

A pulled or pushed bundle is applied only when it isn't older than the bundle the server serves, so a signed bundle that is replayed, or served again by mistake, can't roll the server back. Two semver versions compare by semver; the same version, or versions that aren't both semver, compare by generatedAt, which the signature covers. compareBundleVersions(bundle, other), from @frontmcp/adapters/skills, compares two bundles the same way: negative when bundle is older. An older bundle isn't applied or saved, and the log says why: [bundle-sync] bundle acme:billing@1.9.0 not applied: older than the served bundle acme:billing@2.0.0 (generatedAt …). To roll back, publish the earlier content under a newer version, or set allowRollback: true, which applies any bundle that passes its other checks, as the other sources do. Changed in 1.11.1: before, an older bundle was applied.

The saved bundle is the last one the plugin applied: a bundle that fails its signature or its other checks is never saved. When the server starts, it stands in for the bundle served: if the pull fails, the pulled bundle is refused, or it is older than the saved one, the server serves the saved bundle, and doesn't write it back. If the saved bundle is refused too, the pulled one serves when it passes. Changed in 1.11.1: before, every pulled bundle was saved before its signature was checked, so a refused one replaced the last good one, and a restart served whatever it pulled, an older bundle included.

The bundle

A bundle is a JSON object, or YAML, with this shape. YAML is read with the YAML 1.2 core schema, so it means what the same JSON would: an unquoted generatedAt: 2026-09-01T12:00:00.000Z, as yaml.stringify writes it, stays the string that was signed, and merge keys (<<) and tags like !!binary aren't supported. Changed in 1.11.1: before, an unquoted date was read as a Date, and the bundle failed its schema check. The plugin also accepts a bundle wrapped in an OpenAPI Overlay document, under info["x-frontmcp-bundle"] or a top-level x-frontmcp-bundle, so it can live next to the spec it describes.

FieldTypeDescription
schemaVersion1
bundleIdstringThe bundle's id: letters, digits, _ . - :.
versionstringShown to the model as bundleVersion, so it can tell when the bundle changed.
generatedAtstringAn ISO 8601 date.
sourceDigeststringA hex digest of the spec the bundle was made from, for your records.
services{ id, baseUrl, description? }[]The APIs, at least one. An operation's URL is its service's baseUrl plus its pathTemplate.
authBindingsRecord<string, AuthBinding>How operations authenticate. See credentials.
skillsBundledSkill[]What the model searches and loads.
operationsRecord<string, OperationDescriptor>Keyed by operationId.
integrity{ alg, keyId, signature, digest }The signature. See signing.

A skill:

FieldTypeDescription
idstringWhat load_skill takes. Letters, digits, _ . -, unique in the bundle.
name, descriptionstringWhat search_skill returns, and the most of what it matches: see below. Write the description in the words callers use.
instructionsstringMarkdown load_skill returns: how to use the operations, in what order, what to check.
operationIdsstring[]The operations the skill offers, as actions.
tagsstring[]What search_skill's tags filter matches, and words search ranks by. confirm.tags matches them too.
requiredAuthoritiesobjectA rule every caller of the skill's actions must pass. See authorization.
requiresstring[]Skills this one builds on. The plugin registers them first, and rejects a bundle with a missing one or a cycle.

search_skill ranks a skill by its name, its description (which counts three times), its tags (twice), its actions' ids (getCustomer, and the words get customer), summaries and descriptions, and up to 48 distinct words of its instructions, of four letters or more. Words like the, of and and don't count. Changed in 1.11.1: before, search read only the name and description, so inventory didn't find a skill with a getInventory action, and a skill's tags were dropped: the tags filter matched no bundle skill. A skill notQuery demotes stays lower; before 1.11.1, a keyword fallback could return it with a higher score.

An operation:

FieldTypeDescription
operationIdstringThe action's id, the same as its key in operations.
serviceIdstringOne of services.
httpMethod"GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD"
pathTemplatestringLike /invoices/{id}/refunds. Must start with /, with no spaces, ?, #, .., \, backticks, $( or ${.
inputSchemaJSON SchemaThe action's input. Checked before every request.
outputSchemaJSON SchemaThe response. A JSON response with a body that doesn't match fails the action; a bodyless answer, like a 204, isn't checked.
mapper{ inputKey, type: "path" | "query" | "header" | "cookie" | "body", key, required?, style?, explode? }[]Where each input field goes in the request: { inputKey: "id", type: "path", key: "id" } fills {id}. Input fields without a mapper entry aren't sent. An array query parameter follows OpenAPI's style and explode: by default it repeats its key (ids=a&ids=b), and explode: false joins it with commas. Changed in 1.11.1: before, every array was sent comma-joined.
authBindingRefstringOne of authBindings.
requiredAuthoritiesobjectA rule callers of this operation must pass, as well as a rule of one skill that lists it.
publicbooleanWith unprotectedOps: "deny", lets this operation be called without a rule.
summary, descriptionstringShown by load_skill, and searched.
tagsstring[]What confirm.tags matches. compileSkilledBundleFromOpenApi() copies the operation's OpenAPI tags and x-frontmcp.tags. New in 1.11.1.
timeoutMs, maxResponseBytesnumberOverride outbound's defaults.

Before a bundle is applied, the plugin checks it against this shape (unknown fields are errors) and checks that every operation's service and auth binding, and every skill's operations, exist. A bundle that fails isn't applied: the log says why, with the first issues the check found, and the server keeps the bundle it had, or has none and says so. @frontmcp/adapters/skills exports compileSkilledBundleFromOpenApi(), which builds services, operations and their mappers from an OpenAPI spec and a list of skills; see building a bundle.

What the plugin adds

Four tools, and nothing for the operations themselves:

ToolInputResult
search_skillquery (1–2048 characters), limit? (default 20, at most 50), tags? (skills with one of these tags), notQuery? (a string or strings: skills that match it rank lower), notWeight?{ skills: [{ skillId, name, description, score, bundleVersion }] }, best first, with the version of the bundle each skill comes from. Read-only.
load_skillskillId, or skillIds (up to 10)For skillId: { skill: { id, name, description, instructions, bundleVersion, actions: [{ actionId, summary, description?, inputJsonSchema, outputJsonSchema, requiredAuthorities?, asksForConfirmation? }] }, isComplete }. For skillIds, { skills: [{ skill, isComplete }] }, each skill once. A skill is named by its id or by the name the catalog shows. actions has only the actions the caller may run, and asksForConfirmation: true marks those that ask the user. An unknown skill, or one the caller may not use, is an error result with code SKILL_NOT_FOUND; both or neither of skillId and skillIds is INVALID_PARAMS: Pass either skillId or skillIds. Read-only.
execute_actionactionId, input? (an object, {} when left out)The action's data: a JSON object as structured content, anything else under value, and a text that names the status for a bodyless answer. A failure is an error result, isError: true, whose text is the error a script's callTool throws and whose structured content is { ok: false, status, data?, error? }. Needs no sandbox. Annotated destructiveHint: true, openWorldHint: true. New in 1.11.1.
run_workflowscript (1–20000 characters){ success, value?, error?, stats?: { durationMs, toolCalls, steps } }. stats is present only when execution starts. A failed workflow, success: false, is an error result with the same structured content. Annotated destructiveHint: true, openWorldHint: true.

A failed execute_action or run_workflow is an error result, so an MCP client sees a failed call. Changed in 1.11.1: before, a failed workflow had no isError, so a client saw a successful call, and a CLI built with the plugin exited 0. load_skill's outputSchema describes a loaded skill once, under $defs.LoadedSkill, and both forms refer to it with $ref.

With exposeOperationsAsInternalTools (the default), each operation is also a tool, <bundleId>.<operationId>, that isn't listed and that a client calling it gets Tool "…" not found for; a name longer than 64 characters keeps its start and ends with . and the first 16 hex characters of the SHA-256 of the whole name. Your own tools reach an operation by that name; a bundle id and operation id short enough to fit avoid it. execute_action runs an action through its operation tool, with the caller's auth, so tools:call-tool hooks run for that call too; without operation tools, it runs the same checks itself. Your own tools call an operation tool with this.callTool("acme:billing.getInvoice", { id }). It runs a script's checks, requiredAuthorities, the input and output schemas, the confirmation and the audit records, aborts its request when the call is cancelled, and answers { ok, status, data?, contentType?, error? } without isError. A failure doesn't throw: it's ok: false, with the status and the API's error body in data, redacted and cut as errorBodies says, or an error for a refusal, like authority denied: …, or an answer that fails outputSchema. Changed in 1.11.1: before, an operation tool skipped the output schema check and the audit log, and passed the API's whole error body. Changed in 1.9: these tools were never registered, and the plugin logged per-op internal tools disabled.

The descriptions lead the model to the calls it needs. On every tools/list, the plugin appends the skills the caller may use to search_skill's description, under Available skills (load one by name with `load_skill`; `search_skill` finds others):, one line each (- **Invoices**: Look up and refund invoices.), so the model loads a skill it sees there without searching. load_skill's description says to load each skill once per conversation, and again only when its bundleVersion changes; execute_action's and run_workflow's say which to use for one action and for a chain. The server's initialize instructions wait for the bundle, then count its skills and point to the same tools: This server has 2 skills: load one by name with `load_skill`, or find one with `search_skill`; then run an action with `execute_action`, or chain several with `run_workflow`. Changed in 1.11.1: before, the catalog and the instructions sent the model to skill://index.json, whose SKILL.md files list no actions, and initialize didn't wait for the bundle.

search_skill and load_skill also find the server's other skills. The bundle's skills are registered in the same registry, as skills added at runtime, so they're listed in skills/list, with their tags and bundleVersion, in skill://index.json and, by name, as skill://<name>/SKILL.md in resources/list too (changed in 1.9.5: before, resources/list had only skill://index.json). The plugin tells the server it adds skills while it runs (@Plugin({ dynamicSkills: true })), so a server whose only skills come from a bundle has the skills methods and skill://index.json from the start; until a bundle has loaded, they answer why not. The index names each bundle skill's SKILL.md by the skill's name, like skill://Invoices/SKILL.md, which serves its instructions, then an ## Actions section: how to run them, and each action the caller may run, with its summary and its input and output JSON Schemas, as load_skill lists them. The skill's id works too: skill://invoices/SKILL.md. (Before 1.8.5, the id form wasn't found. Before 1.11.1, SKILL.md had no actions.)

The plugin's providers include two tokens you can get with this.get(): SkilledOpenApiConfig (options, the parsed options; outbound; unprotectedOps) and SkilledOpenApiCredentialResolver. SKILLED_OPENAPI_RUNTIME_DEPS_TOKEN is for hosts without a file system or background timers: a provider under it can give the saas source a cache of its own (cache: { read, write }), a store for pushed tokens' jtis in place of pushReplayStorage (pushReplayStore: { claim(key, ttlMs) }), turn off polling (disablePolling), and receive attach({ start, refresh }) to pull on a schedule, as a Worker's Cron run does. Each resolves once the bundle it pulls is applied and saved, or refused, with what the sync came to (BundleSyncOutcome): { status: "applied" | "unchanged" | "refused" | "failed", … }. Changed in 1.11.1: before, attach received the source itself.

How run_workflow runs a script

The script is AgentScript, a subset of JavaScript that @enclave-vm/ast checks and rewrites and @enclave-vm/core interprets, step by step, in plain JavaScript: it doesn't use Node's vm. (In a web page it runs in @enclave-vm/browser's sandbox instead: see in a web page.) The script calls operations with await callTool(actionId, input) and ends with return <value>, which becomes value.

A script has three globals: callTool, Math and JSON. Before it runs, and before confirm asks the user, the plugin checks the names as the script wrote them. An unavailable global, such as fetch, process, console, Promise, Array or undefined, rejects the whole script with AgentScript rejected: …. Nothing in it runs, even a callTool before that name. The result has success: false, an error and isError: true, with no stats because execution didn't start. Use array literals and their methods, such as [].map(), rather than the Array global. Properties and object keys, such as invoice.fetch and { process: 1 }, are allowed.

Changed in 1.11.2: before, Node.js and Workers failed at run time with internal names such as '__safe_fetch' is not defined, and returned stats. A web page could use additional globals, including Array and console; it now uses the same three globals as Node.js.

The pre-scanner also checks the reformatted script before execution: a generated line over 10,000 characters or a regular expression it judges open to ReDoS is refused with its reason in AgentScript rejected: …. Changed in 1.11.2: before, this check ran only in a web page, and its refusal could say the script could not be parsed.

For each callTool, and for each execute_action call:

  1. The action is found by actionId among the operations of the skills the caller may see; the script doesn't have to have loaded its skill. An action no such skill lists, or that doesn't exist, fails with unknown action "…" — run search_skill then load_skill to discover available actions.
  2. The operation's requiredAuthorities, and those of one skill that lists it, are checked against the caller. See authorization.
  3. The input is checked against inputSchema: input validation failed: id: Invalid input: expected string, received undefined.
  4. If confirm names the action, the user is asked; a no fails with the user declined: …, and nothing is sent.
  5. The request is built, checked and sent, with the auth binding's credential.
  6. A JSON answer with a body is checked against outputSchema: upstream response failed output schema: …. A bodyless answer, like a 204 or 205, isn't.
  7. callTool returns the response's data, and execute_action answers with it. Any failure throws in the script, and is an error result from execute_action. For a 4xx or 5xx answer, the error ends with the API's error body, so the model can see what the API objected to: action "getInvoice" failed with status 404: {"message":"No such invoice"}. A JSON body is compacted, a text body kept as it is, and a body over 2048 characters is cut and ends with …. Credentials in it are replaced with [REDACTED]: a Bearer value, a JWT, and the field the operation's credential is sent in, like authorization. With outbound.errorBodies: "status-only", the error names the status alone. Changed in 1.11.1: before, it named the status alone, always.

callTool(actionId, input, { throwOnError: false }) doesn't throw: it returns { ok, status, data }, with the API's error body, redacted and cut the same way, as data on an error status, or status: 0 and an error for a failure with no answer, like an unknown action, a refusal, invalid input or a timeout. The call is checked and audited the same way. A missing connected credential still ends the run, since the script can't fix it.

The first throw ends the script with success: false and the message as error, as an error result. Other limits end it the same way:

LimitError
25 callToolsMaximum tool call limit exceeded (25). This limit prevents runaway script execution.
2,000,000 stepsExecution step limit exceeded (2000000)
8 secondsExecution timed out after 8000ms

When the script ends, whatever ends it, the plugin aborts the requests it still has in flight, and sends none after, so a write can't reach your API once the model has been told the workflow failed. A cancelled run_workflow call does the same. An aborted request fails with request aborted: the workflow ended before the request finished, and the audit log records it as a failed call. Changed in 1.11.1: before, a request a timed-out script was waiting for went on. A workflow runs on the operations of the bundle it started on: one applied meanwhile doesn't change them.

The language has const and let, functions and arrow functions, array methods like map, if and switch, for, for…of, for…in, while and do…while loops, ++, try/catch/finally and throw, Math and JSON. A catch gets a failed callTool's error, so e.message is the message the script would have ended with. It has no class (Unsupported statement: ClassDeclaration), no this (Unsupported expression: ThisExpression), no labels and no tagged templates, no Promise (so calls run one at a time), no fetch and no process. The language is the installed Enclave's: this page runs 2.19.2. Before 2.19.2, try/catch and ++ were unsupported too. Without @enclave-vm/core and @enclave-vm/ast installed, run_workflow answers workflow execution unavailable: the @enclave-vm sandbox is not installed. Install @enclave-vm/core and @enclave-vm/ast to enable run_workflow., as an error result, and the other three tools work.

Outbound requests

Each request goes to the operation's service, without following redirects. Before it's sent:

  • The URL must be https: (or http: with allowHttp).
  • The host must be the service's host, and not a cloud metadata name (metadata.google.internal, metadata.azure.com, metadata.aws.com, metadata, metadata.goog).
  • An IP address in the URL is checked, and a host name is resolved and each address it resolves to is checked: private and loopback addresses are refused unless allowPrivateNetworks, link-local and metadata addresses always. A name that doesn't resolve is refused unless allowPrivateNetworks.

For a direct Node.js request, when the outbound check resolves a named host, the request connects only to those allowed addresses. The original hostname is still used for HTTP's Host header and for TLS's server name and certificate check. Requests through outbound.egressProxy use the proxy instead; an injected fetchImpl in the executor takes precedence over both transports. Otherwise, IP-literal URLs and edge runtimes use the global fetch. Where node:dns isn't available, a named host fails the outbound check unless allowPrivateNetworks: true; if allowed, the platform resolves and connects. In a browser page or Web Worker, which can't resolve names, a named host isn't resolved or refused: the browser's own rules, CORS and Private Network Access, decide whether the page may connect (in a web page).

Changed in 1.10.14: before, direct named-host requests on Node.js resolved the host again when connecting, rather than using the addresses the outbound check approved.

A refusal ends the action with ssrf check rejected request: …, like private/loopback IPv4 10.0.0.5 (in 10.0.0.0/8) is blocked. A redirect answer isn't followed. A response larger than the limit cancels its body and fails with response exceeded maxResponseBytes (…). A request that times out, including while reading the body, fails with timeout after …ms.

Changed in 1.10.14: before, an oversized response could leave its connection open, and a timeout during a body read could be reported as aborted.

The direct Node.js transport decodes gzip, x-gzip, deflate and br responses, including chains of these encodings. A list containing another encoding is left as sent; more than five encodings fails with too many content-encodings in response: …, at most 5. A HEAD response has no body. A 204 or 205 answer succeeds with no data, even with content-type: application/json: the script's callTool() returns undefined. A 304 fails the same redirect check as other 3xx responses.

Changed in 1.10.15: before, a 204 or 205 answer failed the action with Response constructor: Invalid response status code 204 (or 205).

A body is sent as JSON, with content-type: application/json, unless a mapper header entry sets Content-Type. A body that can't be turned into JSON fails the action with request body serialization failed: …. Changed in 1.9: the body went out as text/plain;charset=UTF-8, and an API that insists on application/json answered 415.

Credentials

An operation's authBindingRef names one of the bundle's authBindings:

kindFieldsSends
nonenothing
bearervaultRef, passthroughCallerToken?Authorization: Bearer <secret>
apiKeyin: "header" | "query", name, vaultRefthe secret as header or query parameter name
oauth2flow: "client_credentials", vaultRefAuthorization: Bearer <secret>: the secret is used as the token, nothing is exchanged

The secret for a vaultRef comes from the SkilledOpenApiCredentialResolver provider: resolve(ref, { bundleId, authInfo }) returns it, or undefined, which fails the action with auth resolution failed: bearer vaultRef "billing-token" did not resolve. authInfo is the caller the request is for, with its token, user claims and sessionId, so a resolver that serves several tenants can pick each one's secret. The default resolver reads the credentials option. To read a vault, extend SkilledOpenApiCredentialResolver and provide an instance in @FrontMcp({ providers }), in the @App that installs the plugin, or in init({ providers }): the nearest one replaces the default for run_workflow, execute_action and the operation tools alike. See the example. The resolver is asked on every request, so a rotated secret is sent from the next request on. Changed in 1.11.1: before, it was told only bundleId, and a resolver in @FrontMcp or @App providers was ignored.

authProviders makes a binding send each caller's own credential instead, for an API where each caller has an account. It maps the binding's vaultRef to the auth provider the caller connects it as, like { "billing-token": "billing" }, and each request reads that caller's credential from the vaults @Tool({ authProviders }) reads: the auth providers vault (this.authProviders), else the session credential vault (this.credentials). An oauth, oauth_pkce or bearer credential sends its token, an api_key its key; other types fail the request. A mapped vaultRef never falls back to credentials, a resolver or another caller's credential, and one listed in both credentials and authProviders throws VaultRefListedTwiceError from init(). Map a provider with user or session scope: one with global scope is shared by every caller.

A caller who hasn't connected the provider gets ToolCredentialsRequiredError, a JSON-RPC -32001 error with data: { tool, providers }, as a tool whose authProviders aren't connected does, and nothing is sent. Where the server has a session credential vault, in local and remote modes, data.authUrl is the link to connect it, or data.signInRequired: true says the caller must sign in first; without that vault, data has neither. The message never holds the link. Unlike such a tool, the plugin doesn't ask the client to open the link with a URL-mode elicitation: the call fails. It ends a run_workflow run even with throwOnError: false. From execute_action, its tool is the operation tool's name, like acme:billing.getInvoice. This was checked in Node and the browser with authProvidersVault credentials; a caller connecting through the session vault's link wasn't.

passthroughCallerToken: true sends the caller's own token, the one the server verified for the request, to the API, and the plugin's resolver isn't asked. Only a token issued for that API goes out: it must be a JWT whose aud or resource claim names the service's baseUrl, or a URL above it on the same origin, like https://203.0.113.10. Otherwise the action fails before anything is sent:

The callererror
Has no tokenauth resolution failed: passthrough caller token requested but the caller presented none
Has a token that isn't a JWT, like a static key… passthrough caller token refused: the caller token is not a JWT, so the API it was issued for cannot be checked
Has a JWT issued for something else, like your MCP server… passthrough caller token refused: the caller token was not issued for https://203.0.113.10/v1 (no resource or aud claim names it)

So the client needs a token whose audience includes your API, from an identity provider that issues those. Supplying credentials runs each case. Changed in 1.9: the token was never passed along, and every call failed with passthrough caller token requested but not supplied.

Authorization

requiredAuthorities, on a skill, an operation or both, is a rule in the grammar of authorities: roles, permissions, attributes, anyOf, allOf, not, operator. An action runs when the caller passes the operation's rule and the rule of at least one skill that lists it, whatever order the bundle lists the skills in; it runs, and is audited, under the first such skill. load_skill judges each skill the same way, so what it lists and what runs agree. A bundle rule is an object, so it can't name a profile. Changed in 1.11.1: before, an action ran under the first skill in the bundle that listed it, whose rule alone decided.

When your server has the authorities option, the plugin checks bundle rules with the same engine and settings as your entries' authorities, so the caller's roles come from where its claimsMapping says. Without it, the plugin uses these defaults:

  • the caller's roles are the token's roles claim, and permissions its permissions claim;
  • claims are all the token's claims, and input is the action's input, so { attributes: { conditions: [{ path: "input.amount", op: "lte", value: 100 }] } } refuses a refund over 100 with authority denied: attributes.conditions: 'input.amount' failed 'lte' check against '100';
  • an anonymous caller has no roles.

Either way, input holds the values the request is sent with: the schema's defaults filled in, and a required parameter left out given its default from the spec. Changed in 1.12.1: before, a rule saw the input as the caller sent it, so a default could reach the API unchecked.

A refusal ends the action with authority denied: roles.any: user has none of 'agent', or the like. With no rule on the operation or its skill, the action runs under unprotectedOps: "allow"; under "deny" it fails with authority denied: unprotected_operation_denied unless the operation has public: true. A rule that checks nothing, or has a field the grammar doesn't have, refuses everyone: authority denied: invalid authorities rule: has an unknown field "role"; checks nothing. Bundle rules aren't checked when the bundle is applied, only when an action runs.

Each caller sees only what they may use. search_skill, the catalog in its description, load_skill and the skill's SKILL.md leave out a skill whose own rule refuses the caller, and load_skill answers SKILL_NOT_FOUND for it, as for a skill that doesn't exist. A skill a skills:filter hook hides, like one behind a feature flag or a tenant's plan, is left out the same way. load_skill's actions leave out the actions the caller can't run. A rule that reads the action's input can't be judged before the call, so its action stays listed, and the call is checked when it's made.

What a caller may run follows what they may see: only the skills the skills:filter flow keeps for the caller count. An action that none of them lists answers unknown action "…", as one that doesn't exist does, so the call doesn't reveal the hidden skill; the audit log records it as a failed authority check. A workflow asks the flow once, when it starts. Changed in 1.11.1: before, an action of a hidden skill still ran when a script named it, and one whose skill's rule refused the caller answered authority denied.

Asking the user before an action

confirm names the actions that need the user's yes before their request is sent: by HTTP method, by a tag of the operation or of a skill that lists it, or by operationId. The question is an MCP elicitation, so the server needs elicitation: { enabled: true }, and the client shows a form with one field, confirmed, a boolean. Without confirm, nothing asks. New in 1.11.1.

  • One action, through execute_action or an operation tool, asks once it's authorized and its input checked, and before its request: Run refundInvoice: Refund part or all of an invoice (POST /invoices/{id}/refunds) with {"id":"INV-1","amount":5}? A call that's refused, or has invalid input, doesn't ask.
  • A workflow asks once, before its script starts, about the matching actions the script names as strings, like callTool("refundInvoice", …), and the caller may run: This workflow can run these actions, as many times as its script calls them:, a line per action, and Run it?. A yes covers every call of those actions in that run. It asks before the script, since waiting for the user would count against the script's 8 seconds. A matching action the question didn't name, like one whose id the script builds, fails with action "refundInvoice" needs the user's confirmation, which run_workflow asks for before the script starts, for the actions it names: write the actionId as a string, as in callTool('refundInvoice', …), or run it with execute_action.
  • A no, or a cancel, sends nothing: the call fails with the user declined: refundInvoice, and a declined workflow runs none of its script. A question that times out unanswered sends nothing either: the user did not answer in time: refundInvoice.
  • A client that can't show the question, one that didn't declare elicitation, or a server with elicitation off, is refused: the user's confirmation is needed for refundInvoice, and this client can't ask for it: it doesn't support elicitation; nothing was sent. With whenUnsupported: "allow", the action runs unasked there instead. The plugin doesn't use the SDK's elicitation fallback, in which the model would answer for the user.

load_skill marks each action that asks with asksForConfirmation: true, and the audit log records what each call's confirmation came to. Confirming actions runs each case. A CLI built from the server asks in the terminal, and its --yes answers yes.

Signing

With requireSignature (the default), a bundle is applied only if its integrity checks out:

  1. digest is the SHA-256, in hex, of the bundle without integrity, as canonical JSON: keys sorted at every level, no spaces.
  2. keyId is one of trustedKeys, with the same alg.
  3. signature is the base64url signature of that canonical JSON (the text, not the digest) with the key: RSA PKCS#1 v1.5 with SHA-256 for RS256, Ed25519 for EdDSA.

A bundle that fails isn't applied, and the log says why: bundle missing integrity envelope, digest mismatch (envelope=… computed=…), unknown signing keyId "…" — not in trustedKeys allowlist, signature verification failed. @frontmcp/adapters/skills exports canonicalize(), bundleDigest() and verifyBundleSignature() to sign and check bundles in CI; see signing a bundle.

Checking a signature needs Node's crypto, so the Playground below only shows bundles being rejected.

What the checks protect against

The plugin lets a model call your API, with your credentials, through scripts the model writes. Most of the checks above are there to keep that within bounds. Here they are against the OWASP MCP Top 10, a list of the main risks of MCP servers (its 2025 edition, still a beta):

RiskWhat the plugin does about it
MCP01 Token mismanagement and secret exposureCredentials stay on the server: the resolver adds them to each request, and execute_action and a script's callTool hand back only the API's answer. A caller's own token goes only to an API it was issued for, and with authProviders a request carries only its caller's credential. A redirect isn't followed, so a credential isn't sent on to wherever the API points, and one an API echoes in an error body is redacted. The audit log keeps hashes of inputs and answers, not their values.
MCP02 Privilege escalation via scope creeprequiredAuthorities on skills and operations, checked on every callTool and execute_action call, and unprotectedOps: "deny" for operations without a rule (Authorization). Loading a skill grants nothing: a script can call any action of a skill the caller may see, so these rules are the limit. confirm has the user approve the actions you name before they run.
MCP03 Tool poisoningWhat the model reads, the skills' descriptions and instructions and the operations' summaries, comes from a bundle that's applied only with a valid signature. Each bundle applied is logged with a count of what it changed: [bundle-sync] applied acme:billing@1.0.0 (+1/-0/~0 skills, +2/-0/~0 ops).
MCP04 Software supply chain attacks and dependency tamperingThe signature covers the whole bundle, so one changed after CI signed it isn't applied. The npm source doesn't check provenance, and importing a package runs its code before the bundle's signature is checked: pin the version (Sources).
MCP05 Command injection and executionA script is AgentScript, interpreted step by step, with no fetch and no process; in a web page, it runs in sandboxed iframes that can't reach the network (How run_workflow runs a script). Path templates can't hold $(, ${ or backticks, path parameters are percent-encoded, and a header value with a line break is refused (see below).
MCP06 Prompt injection via contextual payloadsIn part. A JSON answer must match the operation's outputSchema, but what it says isn't checked (see below).
MCP07 Insufficient authentication and authorizationYour server's auth decides who may call execute_action and run_workflow, and requiredAuthorities what each caller may run. The saas source checks its pull token's signature, issuer, audience and expiry before every pull, and a push token's too, with its jti, its iat and, when it has one, the body it was issued for (Sources).
MCP08 Lack of audit and telemetryThe audit log records each action's authorization, confirmation and outcome, signed and chained. Bundle pulls and signature checks are counted, a rejected bundle is logged with the reason, and /readyz says when no bundle, or a stale one, is served.
MCP09 Shadow MCP serversNothing: this is about servers running without anyone knowing, which a plugin can't see.
MCP10 Context injection and over-sharingA caller is shown only the skills and actions their rules allow, the operations aren't listed as tools, and an input field without a mapper entry isn't sent to the API.

What reaches the model. execute_action answers the model with the API's answer itself. In run_workflow, the answer goes to the script, and the model sees what the script returns. On either path, a JSON answer with a body must match the operation's outputSchema, an answer larger than maxResponseBytes fails the action, and an error answer's body is passed on in the error, redacted and cut at 2048 characters, or not at all with outbound.errorBodies: "status-only". None of this looks at the content. A string field can hold text written for the model, an answer that isn't JSON isn't checked against outputSchema, and a script, which the model wrote, can return an answer whole. Treat what your API returns, like ticket bodies, customer names and notes, as you'd treat user input. In Testing a bundle against hostile input, a receipt with an instruction in it reaches the model.

Strings in the bundle and in the script's input. A signature says who made a bundle, not that it's well formed, so a signed bundle is checked too: its shape, with no unknown fields, path templates without .., \, backticks, $( or ${, and an apiKey binding's name limited to the characters a header name may have. Header and cookie mapper keys must match RFC 7230 token grammar when the bundle is applied. Changed in 1.9.5: before, an invalid header key failed only when building a request. The script's input is checked as each request is built:

  • A path parameter is percent-encoded, so a / in it stays inside its segment. Give each path parameter a pattern in inputSchema, like ^C-[0-9]+$, so a script can only send ids of the right shape.
  • A header value with a carriage return, line feed or other control character is refused before anything is sent: request build failed: Invalid header value for 'X-Note-Author': contains control characters (possible header injection attack).

When the bundle changes

The static source with watch and the saas source deliver new bundles while the server runs. Each is checked like the first; if it passes, the plugin replaces the skills and operations at once, and the next search_skill or load_skill sees them, with the new bundleVersion. If applying it fails partway, the previous skills are restored. A rejected bundle leaves the previous one in place.

Each bundle applied gets validators of its own, built from its operations' schemas, so an edited schema applies at once, even under the same version. A workflow that started before the change finishes on the operations, and the schemas, of the bundle it started on. Changed in 1.11.1: before, validators were cached for the life of the process by the bundle's version and the operationId, so a schema changed under the same version was still checked against the old one.

Connected clients are told once the new bundle is in place, with one notification per list it changed: notifications/skills/list_changed, and notifications/resources/list_changed when skills are added or removed. The operation tools are internal, so no notifications/tools/list_changed. A pull of the bundle already served, a refused bundle, and one rolled back after failing partway send nothing. The first bundle that loads sends notifications/skills/list_changed, even with no skills. Changed in 1.11.1: before, a bundle sent one notification per skill, operation tool and resource it changed, about 25 for a modest bundle, and every poll sent them again.

With ObservabilityPlugin from @frontmcp/observability listed before this plugin in plugins, each bundle applied and each signature checked is counted, and each bundle applied is recorded as a span: see Skilled OpenAPI's counters.

When no bundle is loaded

While no bundle is loaded, because the first one is still loading or it failed to load (a bad signature, a schema error, a source that can't be reached, a refused pull token), the server keeps running and says so:

  • search_skill, load_skill, execute_action and run_workflow answer an error result, code SKILL_BUNDLE_NOT_LOADED: No skill bundle is loaded: <reason>, like No skill bundle is loaded: bundle acme:billing@1.0.1 was not applied: bundle missing integrity envelope, or the first bundle has not loaded yet. Its _meta.retryable is true. From callTool() on a FrontMcpInstance, it throws SkillBundleNotLoadedError.
  • The SDK's skill surfaces, skills/list among them, answer the same as a retryable JSON-RPC -32603 error with data: { code: "SKILL_BUNDLE_NOT_LOADED", retryable: true }: see SkillCatalogSourceToken for which ones.
  • initialize's instructions say the skills haven't loaded yet, and why, in place of the count.
  • /readyz answers 503: its skilled-openapi check is unhealthy, with the reason in error and the last sync in details.lastSync.

The reason is the first line of the error, with each URL cut to its scheme, host and path, and tokens and file paths left out; the log has it whole. Once a bundle loads, because a watched file is fixed or a poll succeeds, the tools work, connected clients get notifications/skills/list_changed, and the check is healthy, with details: { state: "loaded", bundleId, bundleVersion }. Changed in 1.11.1: before, the tools and the skill surfaces answered as if the server had no skills, and the reason was only in the log.

A server that has a bundle keeps it when a later one is refused, or a pull fails. Its skilled-openapi check is then degraded, which keeps /readyz at 200, with details.state: "stale" and details.lastSync: { status: "refused", bundleId, bundleVersion, reason, at } for a refused bundle, or { status: "failed", reason, tokenFailure?, cacheFallback, at } for a failed pull. cacheFallback: true says the server started on its saved bundle because of it. tokenFailure names the check a pull token failed: expired, not_yet_valid, wrong_issuer, wrong_audience, unknown_key, bad_signature, unsupported_algorithm, missing_claim, malformed, or jwks_unavailable when the keys couldn't be read. The next sync that applies a bundle, or pulls the one served, makes it healthy again. /readyz shows these details outside production, or with health: { includeDetails: true }. Pulling from a bundle server shows each state.

Pushed bundles

With enableWebhook: true, a saas source also takes bundles the bundle server pushes, at POST /__skilled_openapi/push, on Node and on a Worker. It runs as the hookable skilled-openapi:bundle-push flow: the server's IP filter and global rate limit, then the push token, then the bundle. New in 1.11.1: before, enableWebhook was accepted and did nothing.

  • The token, Authorization: Bearer <token>, is checked as authToken is, unexpired exp included, and must also have a jti of 8 or more characters that no push has used, and an iat within five minutes; a token without jti or iat is refused as missing_claim. A missing or refused token answers 401 invalid_token, whatever check failed; the log names it, like [saas-source] push refused (wrong_issuer): …. A used jti answers 409 push_replayed. A JWKS that can't be read, or a jti that can't be recorded, answers 503 temporarily_unavailable.
  • Bound to its body. A token with a body_sha256 claim, the base64url SHA-256, without padding, of the exact bytes of the request body, is good only for that body: any other, even the same bundle with other whitespace, answers 401, logged as body_mismatch, and its jti stays unused. A token without the claim is accepted, with one warning in the log, unless requirePushBodyDigest: true, which refuses it as missing_claim. @frontmcp/adapters/skills exports PUSH_BODY_DIGEST_CLAIM and pushBodyDigest(body) for the sender.
  • The body is the bundle as JSON, with Content-Type: application/json (on Node, a body of another type isn't read), checked as a pulled one is: 400 invalid_bundle for a body that isn't JSON or a bundle that fails its shape or cross-reference check, 409 bundle_outdated for one older than the bundle served, 422 bundle_not_applied for one whose signature fails, or that fails to apply, like one whose requires form a cycle. The bundle served stays.
  • An applied bundle, or the one already served, answers 200 { applied: true, bundleId, bundleVersion }, and is saved as the last good one. Pushes and pulls apply one at a time, in the order they arrive.

The used jtis are kept in the process's memory, enough for one process. With several replicas, a token replayed to another replica would be accepted again, so give them a store they share with pushReplayStorage, a createStorage() config from @frontmcp/utils: { type: "redis", redis: { url } }, upstash, vercel-kv, or sqlite for processes on one machine. memory, auto, cloudflare-kv and fallback: "memory" fail init()'s check. SQLite also requires a database file path; sqlite.path: ":memory:" is refused. Each jti is kept under frontmcp:skilled-openapi:push-jti:<expectedAudience>: until its token is five minutes old. While the store can't be reached, every push answers 503. On a Cloudflare Worker, @frontmcp/edge keeps them in a Durable Object.

Changed in 1.11.1: before, WebhookReplayGuard, from @frontmcp/adapters/skills, answered check() at once and had size and prune(). Its check() now returns a promise, and it keeps the jtis in its store, a ReplayNonceStore: MemoryReplayNonceStore by default, which has size and prune() now, or StorageReplayNonceStore over a storage adapter.

A push needs a token signed at the moment it's sent, so the Playground can't show one: this is from the plugin's source and its tests (plugins/plugin-skilled-openapi/src/push/bundle-push.flow.ts).

Audit log

skillsConfig.audit, an option of @FrontMcp rather than of the plugin, records each action that a run_workflow script, execute_action or your own tool's this.callTool() of an operation tool runs: whether its rules let it through, whether the user confirmed it, and how the request went. Each record is signed and carries the hash of the record before it, so a record edited, removed or moved afterwards breaks the chain, and verifyChain() says where. It's off by default.

The signers, stores and verifyChain() are in @frontmcp/adapters/skills, which the SDK doesn't import. The plugin registers the audit module automatically. Changed in 1.9.5: before, you had to call setSkillAuditFactory(() => auditModule) before startup. See recording an audit trail.

FieldTypeDefaultDescription
enabledbooleanfalseTurns the log on.
signerHs256AuditSigner, Rs256AuditSigner or your ownan HS256 signer with a random secretSigns each record. The default secret lasts as long as the process, so its records can't be checked after a restart, and the server logs a warning. With NODE_ENV=production, the server doesn't start without a signer.
storeMemoryAuditStore, StorageAdapterAuditStore or your ownMemoryAuditStoreWhere the records go. The default keeps them in the process and warns. In production, omitting store refuses startup; configure a persistent store.
metricsSkillAuditMetricsnoneCounts writes that failed and records dropped. Build it with createSkillAuditMetrics({ createCounter }). Anything without an incrementWriteFailure() method stops the server with a ScopeConfigurationError.
subjectMode"hash" | "plain" | "omit""hash"How the caller is written in subject. See below.
subjectHashSecretstring | Uint8Arrayderived from the signerAt least 32 bytes. Supplies the subject hashing key; otherwise HKDF derives it from signer key material. A signer without derivable material records redacted and warns.
headAnchorIntervalMsnumberAccepted, as a positive integer, and unused.

The signers:

SignerSigns with
new Hs256AuditSigner(secret, keyId)HMAC-SHA256, with secret as a string or bytes. Checking the log takes the same secret, so whoever can check it can also write records that pass.
new Rs256AuditSigner(privateJwk, keyId)RSA PKCS#1 v1.5 with SHA-256. privateJwk is an RSA private key as a JWK object, with n, e and d: a PEM string, an EC key or a public key throws. Checking the log takes only the public key.

keyId is written in each record as signatureKeyId, so verifyChain() can pick the key each record was signed with. Both throw for an empty keyId, and Hs256AuditSigner for an empty secret.

The stores:

StoreKeeps the records in
new MemoryAuditStore()The process. They're gone when it ends.
new StorageAdapterAuditStore(storage, options?)A storage adapter from @frontmcp/utils, under audit:skills:sequence (a counter) and audit:skills:records:<n>. options.sequenceKey and options.recordKeyPrefix change those keys. A server that restarts against the same storage carries on the same chain.
Your ownAny object with nextSequence(), appendAtSequence(record), which must refuse a sequence that's taken, tail() and read({ from?, limit? }). Optionally implement releaseSequence(sequence): Promise<void> to reclaim a failed write's latest allocation only when that record is absent. Both built-in stores do this. Extending one of the two above is the shortest way to also send each record somewhere else.

What each action leaves:

phaseWritten whenFields it adds
authority-check-passThe action passed its requiredAuthorities, or had none to pass.
authority-check-failIts rules refused it, or no skill the caller may see lists it.errorMessage, the reason: roles.any: user has none of 'agent', or skills:filter hides every skill that lists the action
http-call-successThe API answered with a 2xx status.status, outputHash, confirmation
http-call-failureThe API answered with another status, or nothing was sent.status, 0 when nothing was sent, errorMessage: http call failed with status 404, auth resolution failed: …, the user declined: … or request aborted: …, and confirmation once the input passed its schema

So an action that runs leaves two records, and a refused one leaves one. Input validation and output-schema failures are recorded as http-call-failure; success is written only after output validation. Changed in 1.9.5: before, invalid input had no failure record and invalid output was recorded as success. An action id no skill of the bundle lists leaves nothing, and so do search_skill and load_skill. Changed in 1.11.1: before, only run_workflow's actions were recorded, and an action of a skill hidden from the caller ran.

confirmation says what the confirmation came to: not_required (no confirm rule names the action), confirmed, skipped (the client can't ask, and whenUnsupported: "allow" sent the request), declined (nothing was sent), or unanswered (no answer came, so nothing was sent). A workflow's action calls carry the workflow's answer. New in 1.11.1.

Every record also has id (a UUID), sequence (from 1), timestamp, subject, skillId, actionId, bundleId, bundleVersion, inputHash (the SHA-256 of the input as canonical JSON), prevHash (the SHA-256 of the record before it, without its signature, or 64 zeros for the first), signature, signatureKeyId and signatureAlg ("HS256" or "RS256"). The input and the answer themselves are never written.

subjectMode decides what subject holds:

  • "hash": hashed: and 32 hex characters, the same for every record of one caller, like hashed:4cc48a83b675b1b6caedd67a089837aa. The hash's key is subjectHashSecret, or else derived from the audit signer's key, so changing the signer's key changes every caller's hash unless subjectHashSecret is set. A signer with no key to derive from writes redacted, and the server warns at startup. For ids that must not appear in the log in any form, use "omit". Changed in 1.9.5: the key changed, so a caller's hash after the upgrade differs from the one before it, unless subjectHashSecret is set.
  • "plain": the caller's sub, like nour. An anonymous caller over HTTP is the id FrontMCP gave it, like anon:add67063-….
  • "omit": redacted for everyone.

Writing a record doesn't hold up the action, and a store that's slow or failing doesn't fail it. The writer writes one record at a time per process: up to 1000 wait their turn, and more are dropped with [skill-audit] queue overflow (1000/1000); dropping … record. Audit backend likely unhealthy. A record that can't be signed or stored is skipped, with [skill-audit] failed to append record at seq=…: … in the log. With metrics, these count as frontmcp_skills_audit_write_failures_total (reason: sign, append or unexpected) and frontmcp_skills_audit_dropped_total (reason: queue-overflow). So the log can miss records, and what it has is signed and in order.

In a web page

The plugin runs in a server that the SDK's browser create() builds, so an agent in the page can use your API. search_skill, load_skill and execute_action work as on Node. run_workflow runs its script in @enclave-vm/browser's sandbox, two nested sandboxed iframes whose content security policy blocks eval, the Function constructor and network access; install @enclave-vm/browser and @enclave-vm/ast. In a Web Worker, which has no DOM for the iframes, it uses @enclave-vm/core's interpreter, as on Node. The limits, callTool and its throwOnError, the error texts and the confirmation are the same. Every runtime first checks that the script uses only callTool, Math and JSON as globals, with the same AgentScript rejected: … error. The page sandbox also checks AgentScript's other rules, so callTool's action id must be a string literal. Changed in 1.11.1: before, the plugin didn't start in a page (setImmediate is not defined), and refused every request to a named host.

  • Outbound requests. URLs must still be https: and on the service's host, and an IP-literal host is still checked, but a host name isn't resolved: CORS and Private Network Access decide whether the page may connect, so your API must allow the page's origin, and the authorization header in its preflight answer.
  • Credentials are in the page. Every visitor can read the credentials option, what a resolver returns and the bundle. Give the page only a credential the visitor may use anyway, like their own token through passthroughCallerToken, never a server's secret. A visitor can change what runs in the page too, so requiredAuthorities there decide what the agent is shown, not what reaches your API, which must authorize each request itself.
  • Bundlers. Vite builds the page as it is. The plugin's OpenAPI runtime imports Node's dns, http, https, path and fs/promises inside try/catch, which esbuild and webpack 5 try to resolve: give esbuild external: ["node:http", "node:https", "path", "fs/promises"], and webpack an IgnorePlugin for /^(node:)?(dns|http|https|path|fs\/promises)$/ in mcp-from-openapi.

The Playgrounds run the plugin in a Web Worker; the iframe sandbox and the bundler settings come from the plugin's README and tests, not from a Playground.

Changed in 1.11.3: before, the initial bundle could be applied before the skill registry was ready, and a failed apply could not be retried. It is now applied after the server is ready, and failures can be retried.

Caveats

  • run_workflow and execute_action can call any action of a skill the caller may see, loaded or not. Skills organize what the model reads; they don't limit what a script can call. Protect operations with requiredAuthorities and unprotectedOps: "deny". A skill's rule doesn't protect an operation that another skill, without that rule, also lists: put the rule on the operation.
  • dev: true turns signature checks off, and lets operations call http: services: keep it out of production. With requireSignature: false and no dev, the plugin logs requireSignature=false without dev=true: bundle signing is OFF. at startup. Changed in 1.9: dev: true didn't skip signature checks, although its warning said it did.
  • The plugin starts loading the bundle when the server starts, and the four tools, initialize and /readyz wait for the first load to finish. A bundle that fails to load leaves the server running, and says why.
  • Nothing asks before an action runs unless you set confirm: a model can call a DELETE as often as its script says.
  • The audit log is the server's option, skillsConfig.audit on @FrontMcp, and the plugin registers the audit module: see audit log.
  • @frontmcp/plugin-skilled-openapi loads and runs in an ES module project.

Usage

Serving a bundle

An inline source takes the bundle as an object. requireSignature: false lets this unsigned one load; see requiring signed bundles for what production needs. The model finds a skill, then reads it:

Open
import "./billing.example";
import { FrontMcp } from "@frontmcp/sdk";
import { SkilledOpenApiPlugin } from "@frontmcp/plugin-skilled-openapi";
import { bundle } from "./bundle";

@FrontMcp({
  info: { name: "billing", version: "1.0.0" },
  apps: [],
  plugins: [
    SkilledOpenApiPlugin.init({
      source: { type: "inline", content: bundle },
      requireSignature: false,
      credentials: { "billing-token": "billing-api-token" },
    }),
  ],
})
export default class Server {}

Starting FrontMCP in your browser…

FrontMCP starts when this example comes into view.

The operations aren't tools: nothing in tools/list names getInvoice. The model learns about them from load_skill, or from the skill's SKILL.md, and runs them with execute_action or from a script.

Running one action with execute_action

execute_action takes an actionId that load_skill listed, and its input. It runs the same checks as a script's callTool, needs no sandbox, and answers with the action's data:

Open

Starting FrontMCP in your browser…

FrontMCP starts when this example comes into view.

A failure is an error result, isError: true, whose text says why and whose structured content is { ok: false, status, data?, error? }: for INV-9, action "getInvoice" failed with status 404: {"message":"No such invoice"}, with { ok: false, status: 404, data: { message: "No such invoice" } }. To chain actions, passing one's answer to the next, use run_workflow.

Running actions with run_workflow

The script calls actions with await callTool(actionId, input) and returns what the model should see. Several calls that depend on each other take one round trip:

Open
import "./billing.example";
import { FrontMcp } from "@frontmcp/sdk";
import { SkilledOpenApiPlugin } from "@frontmcp/plugin-skilled-openapi";
import { bundle } from "./bundle";

@FrontMcp({
  info: { name: "billing", version: "1.0.0" },
  apps: [],
  plugins: [
    SkilledOpenApiPlugin.init({
      source: { type: "inline", content: bundle },
      requireSignature: false,
      credentials: { "billing-token": "billing-api-token" },
    }),
  ],
})
export default class Server {}

Starting FrontMCP in your browser…

FrontMCP starts when this example comes into view.

The script didn't call search_skill or load_skill first; it didn't need to. A real model does, to learn the action ids and their input.

A script handles a failure itself with try/catch, or with callTool(actionId, input, { throwOnError: false }), which doesn't throw: it returns { ok, status, data }, with the API's error body as data, or status: 0 and an error for a failure with no answer, like an unknown action or a refused one.

A script that tries fetch is refused before it runs. The tests above also check process, console, Promise, Array and undefined, the absence of stats, and that no earlier action reaches the API:

Open

Starting FrontMCP in your browser…

FrontMCP starts when this example comes into view.

Authorizing actions

requiredAuthorities decides who may run an action, from the caller's token, and who sees it. Here refunds need the agent role, credits are capped at 100 by a rule on the input, the admin skill, which lists voids and refunds, needs admin on top of its operations' rules, and with unprotectedOps: "deny" an operation without a rule runs only if it's public. reissueInvoice's rule has a typo. The tests call as two users, with tokens a test key signed ahead of time:

Open
import "./billing.example";
import { App, FrontMcp } from "@frontmcp/sdk";
import { SkilledOpenApiPlugin } from "@frontmcp/plugin-skilled-openapi";
import { bundle } from "./bundle";

@App({
  id: "billing",
  name: "Billing",
  plugins: [
    SkilledOpenApiPlugin.init({
      source: { type: "inline", content: bundle },
      requireSignature: false,
      credentials: { "billing-token": "billing-api-token" },
      unprotectedOps: "deny",
    }),
  ],
})
class BillingApp {}

export const config = {
  info: { name: "billing", version: "1.0.0" },
  apps: [BillingApp],
  auth: {
    mode: "transparent" as const,
    provider: "https://auth.example.com",
    expectedAudience: "https://desk.example.com",
    allowAnonymous: true,
    anonymousScopes: ["tickets:read"],
    // The provider's public key, so the example runs offline. Usually FrontMCP fetches it.
    providerConfig: { jwks: { keys: [{ kty: "EC", crv: "P-256", kid: "desk-1", alg: "ES256", use: "sig", x: "1CjT9Do3B6PgOMVsIY0Amz_l1QbuUfoNLcq3E1OFip0", y: "4Je6s1T1RHT7obF4lowUe-63m0pat0TZfmnRxLfDCE8" }] } },
  },
};

@FrontMcp(config)
export default class Server {}

Starting FrontMCP in your browser…

FrontMCP starts when this example comes into view.

getInvoice shows what unprotectedOps: "deny" is for: in the default "allow", an operation someone forgot to give a rule is open to every caller, anonymous ones included, and run_workflow reaches every operation in the bundle whichever skill it's in.

What a caller is shown follows the same rules. An anonymous caller doesn't find the admin skill, and loading it answers SKILL_NOT_FOUND; in invoices they see creditInvoice, whose rule depends on the amount, and getPlans. reissueInvoice is listed to no one: its rule checks nothing, so it refuses everyone, and nothing reports it until the action runs. Test a bundle's rules before you publish it.

What a caller may run follows them too. Nour isn't an admin, so the admin skill is hidden from her, and naming voidInvoice gets the answer for an action that doesn't exist, which doesn't reveal the skill. refundInvoice is in both skills: it runs for her because invoices, which she may see, admits her, whatever order the bundle lists the skills in. Changed in 1.11.1: before, an action ran under the first skill in the bundle that listed it, so Nour's refund was refused with authority denied: roles.any: user has none of 'admin', and a void answered with that message too.

Confirming actions

confirm has the user approve an action before its request is sent. Here voids, the DELETEs, and refunds ask; reading an invoice doesn't:

Open
import "./billing.example";
import { FrontMcp } from "@frontmcp/sdk";
import { SkilledOpenApiPlugin } from "@frontmcp/plugin-skilled-openapi";
import { bundle } from "./bundle";

export const config = {
  info: { name: "billing", version: "1.0.0" },
  apps: [],
  elicitation: { enabled: true },
  plugins: [
    SkilledOpenApiPlugin.init({
      source: { type: "inline", content: bundle },
      requireSignature: false,
      credentials: { "billing-token": "billing-api-token" },
      confirm: { methods: ["DELETE"], operations: ["refundInvoice"] },
    }),
  ],
};

@FrontMcp(config)
export default class Server {}

Starting FrontMCP in your browser…

FrontMCP starts when this example comes into view.

The question names the action, its method and path, and the input it would send. A workflow's question lists the actions, without inputs, since one yes covers every call the script makes. An unavailable global rejects a workflow before the question is asked, as the test shows. Turn elicitation on for a server with confirm: with it off, every action that asks is refused, as the last test shows.

Supplying credentials

The credentials option is fine for one secret from the environment. To fetch secrets from a vault, extend SkilledOpenApiCredentialResolver and provide an instance in @FrontMcp({ providers }), in the @App that installs the plugin, or in init({ providers }); it replaces the default resolver. Each auth binding puts the secret where the API expects it:

Open
import "./billing.example";
import { FrontMcp } from "@frontmcp/sdk";
import { SkilledOpenApiCredentialResolver, SkilledOpenApiPlugin, type CredentialResolveOptions } from "@frontmcp/plugin-skilled-openapi";
import { bundle } from "./bundle";

/** Reads secrets from a vault. This one is a Map, for the example. */
class VaultResolver extends SkilledOpenApiCredentialResolver {
  private readonly secrets = new Map([
    ["acme:billing/billing-token", "billing-api-token"],
    ["acme:billing/crm-key", "crm-api-key"],
  ]);

  async resolve(ref: string, { bundleId }: CredentialResolveOptions) {
    return this.secrets.get(`${bundleId}/${ref}`);
  }
}

@FrontMcp({
  info: { name: "billing", version: "1.0.0" },
  apps: [],
  providers: [{ provide: SkilledOpenApiCredentialResolver, useValue: new VaultResolver() }],
  plugins: [SkilledOpenApiPlugin.init({ source: { type: "inline", content: bundle }, requireSignature: false })],
})
export default class Server {}

Starting FrontMCP in your browser…

FrontMCP starts when this example comes into view.

The resolver runs for each request, and the script never sees what it returns: callTool gives back only the API's answer. It's told the vaultRef, the bundle's id and the caller, as authInfo, with the caller's token, claims and session, so one resolver can serve several tenants; a resolver that caches secrets must key its cache by the caller too. Changed in 1.11.1: before, the resolver was told only bundleId, and one declared in @FrontMcp({ providers }) or @App({ providers }) was ignored: only init({ providers }) replaced the default.

When each caller has an account of their own with the API, authProviders maps a binding's vaultRef to the auth provider each caller connects it as, and each request sends that caller's credential, as the last tests show.

Testing a bundle against hostile input

The model writes the scripts, so test each operation with the input a careless or manipulated model could send, and with the answers your API could give, before you publish the bundle. The tests here send a path parameter with a / and one that doesn't match its pattern, a header value with a line break, and a request the API answers with a redirect. They also check that oversized responses are canceled, a stalled body reports a timeout, a 204 or 205 answer succeeds with no data, and an error answer that echoes the credential reaches the script redacted. The API's receipts are plain text, with a line aimed at the model:

Open
import "./billing.example";
import { FrontMcp } from "@frontmcp/sdk";
import { SkilledOpenApiPlugin } from "@frontmcp/plugin-skilled-openapi";
import { bundle } from "./bundle";

@FrontMcp({
  info: { name: "billing", version: "1.0.0" },
  apps: [],
  plugins: [
    SkilledOpenApiPlugin.init({
      source: { type: "inline", content: bundle },
      requireSignature: false,
      credentials: { "billing-token": "billing-api-token" },
    }),
  ],
})
export default class Server {}

Starting FrontMCP in your browser…

FrontMCP starts when this example comes into view.

The receipt's instruction reaches the model as the script's value: outputSchema applies to JSON answers only, and it checks a value's type, not what it says. getCustomer's pattern refuses an id of the wrong shape before anything is sent. The checks are listed in what the checks protect against.

Requiring signed bundles

By default the plugin applies only a signed bundle. An unsigned one, or one changed after it was signed, is rejected: each of the plugin's tools answers why no bundle is loaded, and /readyz answers 503. With dev: true it applies an unsigned one, as the second test shows.

Open
import { App, FrontMcp } from "@frontmcp/sdk";
import { SkilledOpenApiPlugin } from "@frontmcp/plugin-skilled-openapi";
import { bundle, publicKeyPem } from "./bundle";

// CI signed this bundle as version 1.0.0; its version was changed afterwards
const edited = {
  ...bundle,
  integrity: {
    alg: "EdDSA",
    keyId: "ci-2026",
    signature: "syKKffz-W5oXmwfZYFMy6qiTGwCY1m4xQHaJntPCg42ci2SNakhjwecDi7AbPSJOHkZTpE2j0XyHWPOoEj8WBA",
    digest: "29817f4a232822a12963913b0d4044e5ba3c5d3668d21f8185a292ad2794c6cb",
  },
};

@App({
  id: "unsigned",
  name: "Unsigned",
  plugins: [SkilledOpenApiPlugin.init({ source: { type: "inline", content: bundle } })],
})
class Unsigned {}

@App({
  id: "edited",
  name: "Edited",
  plugins: [
    SkilledOpenApiPlugin.init({
      source: { type: "inline", content: edited },
      trustedKeys: [{ keyId: "ci-2026", alg: "EdDSA", publicKeyPem }],
    }),
  ],
})
class Edited {}

export const unsigned = { info: { name: "billing", version: "1.0.0" }, apps: [Unsigned] };
export const tampered = { info: { name: "billing", version: "1.0.0" }, apps: [Edited] };

@FrontMcp(unsigned)
export default class Server {}

Starting FrontMCP in your browser…

FrontMCP starts when this example comes into view.

Open the Logs tab: rejected bundle acme:billing@1.0.1: bundle missing integrity envelope. A server that can't load its bundle keeps running without skills, and says so: its tools answer No skill bundle is loaded: <reason>, retryable, and /readyz fails its skilled-openapi check. Changed in 1.11.1: before, the tools answered as if the server had no skills (search_skill with { skills: [] }, load_skill with SKILL_NOT_FOUND), and the reason was only in the log.

Signing a bundle

Sign in CI, where the private key lives, with Node's crypto and the helpers from @frontmcp/adapters/skills. Checked in Node with both algorithms:

sign-bundle.ts
import { readFileSync, writeFileSync } from "node:fs";
import { createPrivateKey, sign } from "node:crypto";
import { bundleDigest, canonicalize } from "@frontmcp/adapters/skills";

const bundle = JSON.parse(readFileSync("dist/billing-bundle.json", "utf8"));
delete bundle.integrity;

// An Ed25519 key: `openssl genpkey -algorithm ed25519`
const privateKey = createPrivateKey(process.env.BUNDLE_PRIVATE_KEY!);
const signature = sign(null, Buffer.from(canonicalize(bundle)), privateKey).toString("base64url");
// For RS256 with an RSA key: sign("sha256", Buffer.from(canonicalize(bundle)), privateKey)

bundle.integrity = { alg: "EdDSA", keyId: "ci-2026", signature, digest: bundleDigest(bundle) };
writeFileSync("dist/billing-bundle.json", JSON.stringify(bundle, null, 2));

Give the server the public key (openssl pkey -pubout) in trustedKeys, with the same keyId and alg. verifyBundleSignature(bundle, trustedKeys) returns { ok: true, keyId, alg } or { ok: false, reason }, to check a bundle before you publish it. Any change to the bundle after signing, even its version, fails with digest mismatch. To rotate keys, add the new key to trustedKeys, publish bundles signed with it, then remove the old one.

Recording an audit trail

The audit log is set on the server, in skillsConfig.audit, and its signers and stores come from @frontmcp/adapters/skills (npm install @frontmcp/adapters). The Playground can't import that module, so this section is code, checked in Node. Here the server signs each record with an RSA key and keeps the chain in a storage adapter:

main.ts
import "reflect-metadata";
import { Rs256AuditSigner, StorageAdapterAuditStore } from "@frontmcp/adapters/skills";
import { FrontMcp } from "@frontmcp/sdk";
import { SkilledOpenApiPlugin } from "@frontmcp/plugin-skilled-openapi";
import { createStorage } from "@frontmcp/utils";

// An RSA private key as a JWK. Checking the log takes only its public half.
const signer = new Rs256AuditSigner(JSON.parse(process.env.AUDIT_PRIVATE_JWK!), "audit-2026");
const store = new StorageAdapterAuditStore(await createStorage());

@FrontMcp({
  info: { name: "billing", version: "1.0.0" },
  apps: [],
  plugins: [SkilledOpenApiPlugin.init({ source, trustedKeys, credentials, unprotectedOps: "deny" })],
  skillsConfig: { audit: { enabled: true, signer, store } },
})
export default class Server {}

Make the key with openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048, and turn it into a JWK once with Node's createPrivateKey(pem).export({ format: "jwk" }). With none of REDIS_URL, UPSTASH_REDIS_REST_URL or KV_REST_API_URL set, createStorage() keeps the data in memory, and in production says so with [storage] Warning: No distributed storage backend detected in production. Using in-memory storage.: the chain then ends with the process.

Nour, an agent, refunds INV-1, and Sam, who isn't one, tries to. The store holds three records (signatures and hashes shortened):

{ "sequence": 1, "phase": "authority-check-pass", "subject": "hashed:4cc48a83b675b1b6caedd67a089837aa", "skillId": "invoices",
  "actionId": "refundInvoice", "bundleId": "acme:billing", "bundleVersion": "1.0.0", "inputHash": "91c1adf5…",
  "prevHash": "0000000000000000000000000000000000000000000000000000000000000000", "signatureKeyId": "audit-2026",
  "signatureAlg": "RS256", "signature": "EKB2BufT…", "id": "a087983d-…", "timestamp": "2026-10-10T12:24:20.229Z" }
{ "sequence": 2, "phase": "http-call-success", "status": 201, "outputHash": "992e486c…", "prevHash": "d4752813…", … }
{ "sequence": 3, "phase": "authority-check-fail", "subject": "hashed:ca365a703527adfd47c38679eb40ec4d",
  "errorMessage": "roles.any: user has none of 'agent'", "prevHash": "b18e8f58…", … }

The refund's input appears only as inputHash, the same in all three records because both callers sent the same input. Sam's refusal is in the log although nothing was sent to the API.

Checking the chain

verifyChain() walks the records in order, from the first, and checks each one's prevHash and signature with the keys you trust:

check-audit.ts
import { StorageAdapterAuditStore, defaultAuditSignatureVerifier, verifyChain } from "@frontmcp/adapters/skills";
import { createStorage } from "@frontmcp/utils";

const records = await new StorageAdapterAuditStore(await createStorage()).read();
const result = verifyChain(
  records,
  [{ keyId: "audit-2026", alg: "RS256", publicKeyPem: process.env.AUDIT_PUBLIC_KEY_PEM! }],
  defaultAuditSignatureVerifier,
);
console.log(result); // { ok: true, verified: 3 }
The logverifyChain() returns
As written{ ok: true, verified: 3 }
Record 2 edited, like its status{ ok: false, breakAt: 2, reason: 'signature verification failed at sequence 2 (keyId="audit-2026", alg=RS256)' }
Record 2 removed, or records 2 and 3 swapped{ ok: false, breakAt: 3, reason: "sequence gap: expected 2, got 3" }
Record 1 removed{ ok: false, breakAt: 2, reason: "prevHash mismatch at sequence 2: expected 000000000000.. got 250ef3710919.." }
Read from the middle, with read({ from: 3 })prevHash mismatch at sequence 3: …, the same way
Record 3 removed{ ok: true, verified: 2 }: nothing shows it
Checked with another key, or a key list without the records' keyIdsignature verification failed at sequence 1 (…)
  • Removing the newest records isn't detected. headAnchorIntervalMs is meant for that, and does nothing. Keep the latest sequence and its hash somewhere the server can't write, and compare.
  • Check a window. Pass the already-verified preceding record as the fourth argument: verifyChain(records, keys, verifier, { previous }). AuditChainVerifyOptions.previous is a SkillAuditRecord. Without it, verification starts at genesis. New in 1.9.5.
  • Keep old keys. Each record is checked with the key its signatureKeyId names: after you change keys, keep the old one in the list for the records it signed. For an HS256 log, the entry is { keyId, alg: "HS256", secret }, with the signer's secret as bytes (new TextEncoder().encode(secret)). For RS256, publicJwk works in place of publicKeyPem.

Running several instances

A chain takes one writer. Two servers that append to the same chain at once each link their records to the record they last read, and verifyChain() then reports a prevHash mismatch, though nobody changed the log. Give each instance a chain of its own, and check each chain on its own:

const store = new StorageAdapterAuditStore(await createStorage(), {
  sequenceKey: `audit:${process.env.POD_NAME}:sequence`,
  recordKeyPrefix: `audit:${process.env.POD_NAME}:records:`,
});

A server that restarts against the same storage carries on its chain: two records before a restart and two after check out as one chain of four.

A record the store fails to write leaves the action alone, and is lost. Both StorageAdapterAuditStore and MemoryAuditStore release the unused sequence number, so the next write keeps the chain contiguous. Changed in 1.9.5: before, the memory store left gaps.

Sending records elsewhere, and counting failures

To copy each record to your log pipeline or SIEM, extend a store and forward the record once it's stored. To count failed and dropped writes, pass metrics, built with createCounter from @frontmcp/observability:

audit.ts
import { StorageAdapterAuditStore, createSkillAuditMetrics, type SkillAuditRecord } from "@frontmcp/adapters/skills";
import { createCounter } from "@frontmcp/observability";

/** Keeps the chain in storage, and writes each record to the log once it's stored. */
export class ForwardingAuditStore extends StorageAdapterAuditStore {
  async appendAtSequence(record: SkillAuditRecord) {
    await super.appendAtSequence(record);
    console.log(JSON.stringify({ audit: record }));
  }
}

export const metrics = createSkillAuditMetrics({ createCounter });

Pass both in skillsConfig: { audit: { enabled: true, signer, store: new ForwardingAuditStore(storage), metrics } }. A record the store then can't write is logged as [skill-audit] failed to append record at seq=1: … and adds 1 to frontmcp_skills_audit_write_failures_total{reason="append"}, while the action itself succeeds.

Loading bundles from files, packages and servers

The static, npm and saas sources need a file system, a package or a network, so they're shown as code, checked in Node:

main.ts
import { resolve } from "node:path";
import { SkilledOpenApiPlugin } from "@frontmcp/plugin-skilled-openapi";

// A file next to the server, reloaded when it changes
SkilledOpenApiPlugin.init({
  source: { type: "static", path: resolve(__dirname, "../billing-bundle.yaml"), watch: true },
  trustedKeys,
});

// An export of a package you depend on
SkilledOpenApiPlugin.init({
  source: { type: "npm", packageName: "@acme/billing-bundle", exportName: "bundle", verifyProvenance: false },
  trustedKeys,
});

// A bundle server, pulled at startup and every 5 minutes
SkilledOpenApiPlugin.init({
  source: {
    type: "saas",
    endpoint: "https://bundles.acme.example/v1/bundles/billing-prod",
    authToken: process.env.BUNDLE_PULL_TOKEN!,
    expectedAudience: "billing-prod",
    jwksUrl: "https://bundles.acme.example/.well-known/jwks.json",
    expectedIssuer: "https://bundles.acme.example",
  },
  bundleCacheDir: "/var/cache/billing-mcp",
  trustedKeys,
});
  • static: the file can be the bundle itself, or an OpenAPI Overlay with the bundle under info.x-frontmcp-bundle. With watch, an edit shows up in the next search_skill within about a second, also when the file failed to load at startup.
  • npm: packageName is imported with import(), so it can be any specifier Node resolves. verifyProvenance: false is required: with the default true, the plugin doesn't import the package and logs npm source "@acme/billing-bundle": verifyProvenance is true, but npm provenance verification is not implemented, so the package was not loaded. …. Importing a package runs its code before the bundle's signature is checked, so pin its exact version.
  • saas: BUNDLE_PULL_TOKEN is a JWT the bundle server issued, with iss: "https://bundles.acme.example" and aud: "billing-prod". Each bundle the plugin applies is saved, here to /var/cache/billing-mcp/billing-prod.json. When the server starts and the pull fails (in the check, the endpoint answered something that wasn't a bundle), the plugin logs initial pull failed (…); attempting cached bundle fallback and serves the saved bundle. Without a saved one, the server starts without a bundle and says so, and keeps polling. A failed poll later on is logged, and the current bundle stays. A pull token that fails its check is different: see below.

Pulling from a bundle server

Here bundle-server.example.ts plays the bundle server. The Playground has no file system, so a provider under SKILLED_OPENAPI_RUNTIME_DEPS_TOKEN gives the source a cache in memory, turns off polling, and keeps the refresh() a scheduler would call. The pull token is checked against the server's keys before each pull, and a token that fails stops the pull:

Open
import "./bundle-server.example";
import { FrontMcp } from "@frontmcp/sdk";
import { SkilledOpenApiPlugin, SKILLED_OPENAPI_RUNTIME_DEPS_TOKEN, type BundleSyncOutcome } from "@frontmcp/plugin-skilled-openapi";
import { PULL_TOKEN } from "./tokens";

// The last bundle applied. A server keeps it in bundleCacheDir; the Playground has no file system.
let saved: unknown;
// What a scheduler calls to pull again, so a test can too
export const pulls: { refresh?: () => Promise<BundleSyncOutcome> } = {};

export function billingServer(authToken: string) {
  return {
    info: { name: "billing", version: "1.0.0" },
    apps: [],
    providers: [
      {
        provide: SKILLED_OPENAPI_RUNTIME_DEPS_TOKEN,
        name: "BundleCache",
        inject: () => [],
        useFactory: () => ({
          cache: { read: async () => saved, write: async (bundle: unknown) => { saved = bundle; } },
          disablePolling: true,
          attach: ({ refresh }: { refresh(): Promise<BundleSyncOutcome> }) => { pulls.refresh = refresh; },
        }),
      },
    ],
    plugins: [
      SkilledOpenApiPlugin.init({
        source: {
          type: "saas",
          endpoint: "https://bundles.acme.example/v1/bundles/billing-prod",
          authToken,
          expectedAudience: "billing-prod",
          jwksUrl: "https://bundles.acme.example/.well-known/jwks.json",
          expectedIssuer: "https://bundles.acme.example",
        },
        requireSignature: false, // the example's bundle isn't signed
      }),
    ],
  };
}

@FrontMcp(billingServer(PULL_TOKEN))
export default class Server {}

Starting FrontMCP in your browser…

FrontMCP starts when this example comes into view.

The aud check is what keeps a token issued for another of the bundle server's customers, or for your staging server, from pulling your bundle, and the cache isn't a way around it. An unreachable jwksUrl is treated like any other outage: the saved bundle is served. In both cases /readyz names the check that failed, as tokenFailure, while what callers read stays the same.

The last two tests are the forward-only rule: refresh() pulls again, as a Worker's Cron run does, and resolves with what the pull came to. A server that restarts compares the pull with the bundle it saved, so a bundle server that serves an older version can't take it back either.

Building a bundle from an OpenAPI spec

A bundle's operations, with their schemas and mappers, can be generated from the spec. compileSkilledBundleFromOpenApi(), from @frontmcp/adapters/skills, takes the spec, your skills, and the bundle's id and version:

build-bundle.ts
import { readFileSync, writeFileSync } from "node:fs";
import { compileSkilledBundleFromOpenApi } from "@frontmcp/adapters/skills";

const spec = JSON.parse(readFileSync("billing-openapi.json", "utf8"));

const bundle = await compileSkilledBundleFromOpenApi(
  spec,
  [
    {
      id: "invoices",
      name: "Invoices",
      description: "Look up customer invoices and refund them.",
      instructions: readFileSync("skills/invoices.md", "utf8"),
      operationIds: ["getInvoice", "refundInvoice"],
    },
  ],
  { bundleId: "acme:billing", version: process.env.BUILD_VERSION!, authBinding: { kind: "bearer", vaultRef: "billing-token" } },
);

writeFileSync("dist/billing-bundle.json", JSON.stringify(bundle, null, 2));
  • It keeps only the operations your skills name, and throws for one the spec doesn't have: compileSkilledBundleFromOpenApi: operationId "…" is referenced by a skill but not defined in the OpenAPI document.
  • All operations share one service, serviceId (default api) at baseUrl (default: the spec's first servers entry; without one it throws), and one auth binding, default, which is authBinding or { kind: "none" }.
  • generatedAt defaults to now, and sourceDigest to 64 zeros.
  • It adds no requiredAuthorities and no public; add them to the result before signing it.
  • Each operation's outputSchema comes from its responses. A 2xx response the spec describes with a description only, or with a media type that names no schema, accepts any answer; several status codes give an anyOf. Changed in 1.11.1: before, a description-only response compiled to { "type": "null" }, which every JSON answer failed.
  • It keeps each operation's OpenAPI tags and x-frontmcp.tags as the operation's tags, and each query parameter's style and explode in its mapper.

Next to the OpenAPI adapter

The plugin and the OpenAPI adapter don't share anything, so one server can have both: a few operations as plain tools, and the rest of the API as skills.

Open
import "./apis.example";
import { App, FrontMcp } from "@frontmcp/sdk";
import { OpenapiAdapter } from "@frontmcp/adapters";
import { SkilledOpenApiPlugin } from "@frontmcp/plugin-skilled-openapi";
import { bundle } from "./bundle";
import { statusSpec } from "./status-spec";

@App({
  id: "ops",
  name: "Ops",
  adapters: [OpenapiAdapter.init({ name: "status", baseUrl: "https://status.example", spec: statusSpec })],
})
class OpsApp {}

@FrontMcp({
  info: { name: "billing", version: "1.0.0" },
  apps: [OpsApp],
  plugins: [SkilledOpenApiPlugin.init({ source: { type: "inline", content: bundle }, requireSignature: false })],
})
export default class Server {}

Starting FrontMCP in your browser…

FrontMCP starts when this example comes into view.

A good split: operations the model needs on every conversation, and should see without searching, as adapter tools; the long tail as skills.


Troubleshooting

A mapper entry of type header or cookie has a key that isn't a valid header or cookie name, which may use only letters, digits and !#$%&'*+-.^_`|~. The bundle is rejected, so none of its skills are applied. Changed in 1.9.5: before, the bundle was applied, and each request that set the header failed with request build failed: ….

request build failed: Path parameter '…' of operation '…' cannot be '.' or '..'

A path parameter in the script's input was . or .., and nothing was sent. A value that would take the URL outside the operation's path fails the same way, with request build failed: The path parameters of operation '…' do not resolve to its path. Give the field a pattern in inputSchema, so such input fails earlier, with input validation failed. Changed in 1.9.5: before, these values weren't refused.

No skill bundle is loaded: …

The tools answer this, with code SKILL_BUNDLE_NOT_LOADED, while the server has no bundle: the reason follows the colon, and the log has it in full. See when no bundle is loaded. the first bundle has not loaded yet means it's still loading: try again. Otherwise:

  • bundle … was not applied: bundle missing integrity envelope, digest mismatch, unknown signing keyId, signature verification failed: see signing. For an unsigned bundle in development, set dev: true or requireSignature: false.
  • Bundle schema validation failed (N issue(s)): … or Bundle cross-reference validation failed: the bundle doesn't have the right shape, or refers to a service, auth binding or operation it doesn't have. parseOverlay() from @frontmcp/adapters/skills throws an OverlayParseError whose errors list each problem, to check a bundle before you deploy it.
  • Overlay does not contain info.x-frontmcp-bundle or a bare bundle object with schemaVersion + bundleId: the document isn't a bundle.
  • [saas-source] initial pull failed (…): the bundle server couldn't be reached and nothing was saved. The source keeps polling.
  • [saas-source] pull token rejected: …: authToken failed its check: its "aud" claim does not include "billing-prod", or not a valid token from issuer "…" signed by a key in … for a token that is expired, from another issuer, signed with another key, or not a JWT. /readyz and the log name the check, as tokenFailure. Ask the bundle server for a token for this server. The saved bundle isn't used in this case.
  • npm source "…": verifyProvenance is true, but npm provenance verification is not implemented, so the package was not loaded: set verifyProvenance: false.

The SDK's skill methods answer it too, as a JSON-RPC error: see skills. Changed in 1.11.1: before, search_skill answered { skills: [] } and load_skill Skill "…" not found, and the reason was only in the log.

search_skill finds nothing, or Skill "…" not found

The bundle is loaded, and the caller may not be allowed to use the skill: a skill whose requiredAuthorities refuses the caller, or that a skills:filter hook hides, is left out for them, and load_skill answers as for an unknown skill. Or the query shares too few words with the skill: search reads the skill's name, description, tags, actions and instructions, and leaves out a skill that scores under 0.1. Try the words the skill's description uses, or load a skill the catalog in search_skill's description names.

unknown action "…" — run search_skill then load_skill to discover available actions

The script, or execute_action, named an actionId that no skill the caller may see lists. It's the operationId, as load_skill lists it, with no bundle or skill prefix. An action of a skill hidden from the caller answers the same, so it doesn't reveal the skill; the audit log records it as authority-check-fail with skills:filter hides every skill that lists the action. Changed in 1.11.1: before, such an action ran, or answered authority denied: … when the skill's rule refused the caller.

authority denied: …

The caller fails the operation's or its skill's requiredAuthorities, or, with unprotectedOps: "deny", the operation has no rule and isn't public (unprotected_operation_denied). Without the server's authorities option, the plugin reads roles from the token's roles claim; with it, from where its claimsMapping says. See authorization. invalid authorities rule: … means the rule itself is wrong, like a misspelled field, and it refuses everyone until the bundle is fixed.

auth resolution failed: bearer vaultRef "…" did not resolve

Neither credentials nor your resolver has a secret for that vaultRef. A resolver is used from init({ providers }), the @App that installs the plugin, or @FrontMcp({ providers }), the nearest first; before 1.11.1, only from init({ providers }).

Tool "…" requires credentials for … which are not connected for this session

The binding's vaultRef is in authProviders, and the caller hasn't connected that provider. It's a JSON-RPC -32001 error with data: { tool, providers }, and, in local and remote modes, data.authUrl, the link to connect it, or data.signInRequired: true for a caller who isn't signed in. Nothing was sent. See credentials and progressive auth.

SkilledOpenApiPlugin: vaultRef "…" is listed under both credentials and authProviders

init() threw VaultRefListedTwiceError: the vaultRef would send the caller's credential and never the server's. Keep it in one of the two. New in 1.11.1: before, the server's credential was ignored without a word.

Plugin "skilled-openapi" can be installed once per server, and this server installs it twice.

A DuplicatePluginError (DUPLICATE_PLUGIN) at startup: the server's plugins, or an app's, list the plugin twice, or both list it. Put every service in one bundle, or give each bundle its own app with splitByApp: true. See init().

auth resolution failed: passthrough caller token …

The binding uses passthroughCallerToken, and the caller had no token, or one that wasn't issued for the API: see Credentials for each message. requested but not supplied is FrontMCP before 1.9.0, which never passed the token along: update to 1.9.0 or later.

ssrf check rejected request: …

The request's URL failed the outbound checks:

  • forbidden scheme "http:" (https: required): set outbound.allowHttp for an http: service.
  • private/loopback IPv4 10.0.0.5 (in 10.0.0.0/8) is blocked, or host "…" resolved to private/loopback …: set outbound.allowPrivateNetworks if the API really is on your private network.
  • DNS resolution failed for "…": the service's host doesn't resolve from the server.
  • metadata/link-local … is always blocked, cloud metadata hostname "…" is blocked: these can't be allowed.

upstream returned a redirect (…); not followed to protect injected credentials

The API answered the operation with a redirect. The plugin doesn't follow it, since that would send the credential to wherever the API points (What the checks protect against). Put the address the API redirects to in the bundle: as the service's baseUrl, or as the operation's pathTemplate.

response exceeded maxResponseBytes (…)

The API's response exceeded the operation's maxResponseBytes, or outbound.defaultMaxResponseBytes (256 KB by default). Request less data, or raise the limit for an API whose response you expect to be larger. The plugin cancels the oversized body so its connection can close. Changed in 1.10.14: before, the body wasn't canceled.

timeout after …ms

The request took longer than the operation's timeoutMs, or outbound.defaultTimeoutMs (30 seconds by default). This includes reading its response body. Check the API's response time before raising the limit. Changed in 1.10.14: before, a timeout during a body read could be reported as aborted instead.

too many content-encodings in response: …, at most 5

The direct Node.js transport received a response listing more than five content encodings and refused to read it. Configure the API or proxy to send fewer encoding layers. See outbound requests.

Response constructor: Invalid response status code 204

The API answered 204 (or 205), and the plugin is older than 1.10.15, which rebuilt the answer with an empty body that Response refuses for these statuses. Upgrade: a 204 or 205 answer now succeeds with no data. See Outbound requests.

request build failed: Invalid header value for '…': contains control characters (possible header injection attack)

An input that a mapper entry sends as a header held a carriage return, a line feed or another control character, and nothing was sent. It's the script's input to fix; to refuse it earlier, with input validation failed, give the field a pattern in inputSchema. request build failed: Headers.set: "…" is an invalid header name. (the wording depends on the runtime) is the bundle's to fix: a mapper entry's key isn't a valid header name.

The API answers 415 Unsupported Media Type

It wants another content-type than the application/json the plugin sends: set it with a mapper header entry (Outbound requests). Before 1.9.0, the plugin sent JSON bodies as text/plain;charset=UTF-8: update to 1.9.0 or later.

input validation failed: … or upstream response failed output schema: …

The script's input, or the API's JSON answer, doesn't match the operation's inputSchema or outputSchema. Fix the script or the bundle; a loose outputSchema like { "type": "object" } accepts any object. A bundle built with compileSkilledBundleFromOpenApi() before 1.11.1 has { "type": "null" } for a response the spec describes with a description only, which every JSON answer fails: build it again. Before 1.11.1, a schema changed without a new bundle version could still be checked with the old validator, until a restart.

action "…" failed with status …: …

The API answered with an error status, and its error body follows the colon, compacted, cut at 2048 characters and with credentials redacted, so the model can correct the call. A script that wants to handle the failure itself calls callTool(actionId, input, { throwOnError: false }). With outbound.errorBodies: "status-only", the message ends at the status. See How run_workflow runs a script.

the user declined: …

confirm names the action, the user said no, and nothing was sent. A declined workflow runs none of its script. the user did not answer in time: … is the same for a question that timed out.

the user's confirmation is needed for …, and this client can't ask for it

confirm names the action, and the question couldn't be asked: the client didn't declare elicitation (this client can't ask for it: it doesn't support elicitation), or the server has it off (this server can't ask for it: elicitation is disabled). Nothing was sent. Turn on elicitation: { enabled: true }, use a client that shows forms, or set confirm.whenUnsupported: "allow" to run such actions unasked.

action "…" needs the user's confirmation, which run_workflow asks for before the script starts

The script called an action that asks with an id it built, like "void" + "Invoice", so the question before the script didn't name it. Write the id as a string, callTool("voidInvoice", …), or run the action with execute_action.

request aborted: the workflow ended before the request finished

The script ended, by returning, failing or running out of time, while this request was in flight, and the plugin aborted it. A cancelled run_workflow or operation-tool call aborts its requests the same way. The audit log records it as a failed call.

Unsupported statement: ClassDeclaration, Unsupported expression: ThisExpression

The script uses JavaScript that AgentScript doesn't have: see the language. Maximum tool call limit exceeded (25). This limit prevents runaway script execution. and Execution step limit exceeded (2000000) are its limits.

AgentScript rejected: `fetch` isn't available in run_workflow

The script names an unavailable global. Reach the API through await callTool(actionId, input); the only other globals are Math and JSON. The full message is:

AgentScript rejected: `fetch` isn't available in run_workflow. A script reaches the API only through `callTool(actionId, input)`, and can use `Math` and `JSON`.

Several unavailable globals are listed once each, in the order the script uses them, such as `process`, `console`, `Promise` aren't available in run_workflow. …. The script doesn't run or ask for confirmation, and its error result has no stats. Running actions tests the refusal.

Changed in 1.11.2: before, Node.js and Workers reported internal names such as '__safe_fetch' is not defined and '__safe_Promise' is not defined at run time, and a web page reported AgentScript validation failed: … Unknown identifier "__safe_fetch".

AgentScript rejected: Line … length (…) exceeds maximum allowed (10000)

The pre-scanner refused a generated line longer than 10,000 characters. The plugin reformats the script before this check, so adding line breaks alone may not help. Shorten long literals or build the value in separate statements, as the workflow tests show. Other pre-scanner refusals, including regular expressions it judges open to ReDoS, also keep their reason after AgentScript rejected:. The script hasn't run. This check applies on Node.js, in Workers and in web pages; see how scripts run.

workflow execution unavailable: the @enclave-vm sandbox is not installed

Install @enclave-vm/core and @enclave-vm/ast next to the plugin. In a web page, the message names @enclave-vm/browser: install it and @enclave-vm/ast (in a web page).

Tool "acme:billing.getInvoice" not found

A tool called an operation with this.callTool(), and it isn't registered: exposeOperationsAsInternalTools is false, the name isn't <bundleId>.<operationId> (a name longer than 64 characters is cut, and ends with . and the first 16 hex characters of the SHA-256 of the whole name), or the bundle hasn't loaded yet. Or a client called it: the operation tools are only for your own tools. Before 1.9.0 they were never registered.

ZodError from init()

An option is invalid, and the error's path names it: source: Invalid input: expected object, received undefined (no source, as in SkilledOpenApiPlugin.init() with no argument), source.endpoint: must use https://, outbound.maxConcurrencyPerHost: Too small: expected number to be >0.

[skill-audit] audit.enabled is true but no audit module factory is registered

The SDK has no registered audit module. Skilled OpenAPI registers it automatically; this can occur when using SDK audit options without the plugin. Outside production it's a warning and the server runs without the audit log; with NODE_ENV=production, the server doesn't start. When building without Skilled OpenAPI, call setSkillAuditFactory(() => auditModule), with import * as auditModule from "@frontmcp/adapters/skills", before the server starts.

[skill-audit] refusing to use the in-memory audit store in production

Audit is enabled in production without a store. Set skillsConfig.audit.store to a persistent store, such as StorageAdapterAuditStore. Changed in 1.9.5: before, startup used the default memory store.

[skill-audit] refusing to use the default HS256 signer in production

With NODE_ENV=production, skillsConfig.audit needs a signer. See recording an audit trail.

Failed to get provider Symbol(frontmcp:SKILL_AUDIT_WRITER) on every run_workflow

Changed in 1.9.5: an absent optional audit provider no longer warns on every run. A provider that fails still warns. Enable skillsConfig.audit to record actions.

verifyChain() reports a sequence gap or a prevHash mismatch, and nobody changed the log

  • The records start mid-chain: pass the already-verified preceding record with { previous } as the fourth argument, or read from the start.
  • Two servers write to one chain: give each its own sequenceKey and recordKeyPrefix (Running several instances).
  • Changed in 1.9.5: both built-in stores release a failed write's sequence number; before, the memory store could leave gaps.

Report a docs issue · Report a security concern privately