stuntman / plugins

A provider is a plugin. A plugin is a file.

Routes, the state they keep, the answers they give, the callbacks they send and the sentence each call leaves behind. Written once by someone who knows the provider; installed by everyone else.

Anatomy of a plugin.

service:
  name: recaptcha
  real_host: www.google.com
routes:
  - route: POST /recaptcha/api/siteverify
    receive:
      body: [secret, response]
    keep:
      state: tokens
      key: body.response
    decide:
      - when: body.response in state.tokens
        answer: duplicate
      - answer: human
answers:
  - name: duplicate
    sentence: "Token used twice: timeout-or-duplicate"
service
where it pretends to live, and the real host it stands in for
routes
one per kind of request; each reads receive → keep → decide → respond → send
keep
the state the provider remembers between calls
decide
plain expressions; the first match wins; no code
answers
the provider's bodies, and the sentence the timeline shows

More than request and answer.

The same file describes the parts of a provider that are hard to fake by hand. Details in docs/plugins.md.

FeatureIn the YAMLWhat it gives you
Regex and GraphQL routesGET ~/v2/(?<id>[0-9]+) · graphql: CreateChargeone route for a family of paths; one route per GraphQL operation
Streamed answersstream: · stream_format: sse | ndjson | chunksserver-sent events and NDJSON, part by part; cut or slow on cue
Signed webhooksservice.webhooks.sign: stripe | svix | github | cloudevents | hex | hex_tscallbacks your app must verify, broken on purpose when you ask
Idempotency keysservice.idempotencya repeated key replays the first answer; another body gets 409
Scenarioswhen: scenario == 'gps_down' · scenario:a provider that changes state, moved by a call or by set_scenario
An MCP servermcp: · routes with tool:a provider's own MCP tools, for apps that call them
WireMock templatestemplate: handlebarsimported mocks keep their {{request.path}} and {{now}}
The clocksend.delay: 30d · advance_clocka renewal due in 30 days, sent now

A provider that is an MCP server.

Declare mcp: and give routes a tool:. Your app's agent lists the tools, calls them, and gets the answers and failures you set, like any other route.

The Tools tab of an HTTP API: search_docs with its input schema, the MCP URL and the last calls

Or make it from what you have.

An OpenAPI spec or a WSDL

import_spec  service=acme-kyc
  source=https://api.example.com/openapi.json

WireMock mappings

import_mocks source=/mocks/partners

The real sandbox

start_recording service=acme-kyc
  upstream=https://sandbox.example.com

Edit in the UI. Keep the YAML.

The UI edits the same file. Every change is validated before it is saved, and the YAML beside the editor shows the exact lines that changed.

The route editor with the YAML beside it

Install it three ways.

validate_plugin returns schema and expression errors with line numbers before anything is saved.

From the catalog

list_plugins
install_plugin recaptcha

From a folder or a .zip

import_plugin ./plugins/acme-kyc
install_import

From a git URL

import_plugin https://example.com/acme/plugins.git
  path=kyc ref=v1.2.0

Safe by default.

A plugin cannot reach the network or the disk unless it declares it. Expressions are a small, side-effect-free language.

Full format, expressions and contribution guide: docs/plugins.md. The catalog lives in engine/plugins.