WEBHOOK_TRIGGER or API_TRIGGER instead. To write a plugin in Java inside the server, see Write a plugin.
The contract
For each message, Yukta starts the command in the plugin’s directory and:
Ignore properties you do not know (later v1 releases may add some) and refuse an
apiVersion you do not know. Yukta checks each output line against the schema and refuses anything else: a line that is not JSON, an unknown property such as traceId, an undeclared port. The schemas are in plugin-api/src/main/resources/schema/plugin/v1.
Steps
1
Write the manifest
A plugin is its own directory (usually its own git repository), outside the Yukta repository. Create
word-count/yukta-plugin.json:type is upper case and may not be the type of any other plugin. config fields have the same shape as a built-in plugin’s, so the UI shows a form; declare a credential as a SECRET field. command is an argument list, never a shell line: an executable with a / is taken from the plugin’s directory, a bare name from PATH. timeout defaults to 30s. To ship the program with its dependencies, use run.image instead of run.command (see Run it from a container image). To wrap a tool of an MCP server, use run.mcp (see Wrap an MCP tool).2
Write the program
word-count/main.py reads the envelope, logs to stderr and writes one output object:PATH as its only environment variable, checks every output line, and prints the digest to pin.3
Install it (operator)
Put the plugin’s directory (for example a Only a type you name runs:
git clone of its repository) under the plugins directory and name the type in the enable list, then restart:all does not cover community plugins, and a directory without its type in the list is only logged. Pin the directory with TYPE@sha256:<digest> (from yukta-cli plugin validate); the server also logs each plugin’s digest at startup, and a pinned plugin whose files changed fails startup. An enabled plugin with an invalid manifest, a symbolic link in its directory, or a type another plugin has, also fails startup.Run it from a container image
Instead of a command, the manifest can name an image that holds the program and everything it needs:docker run --rm -i --name yukta-<type>-<id> <image>: no mounts, not privileged, no environment variables, network on. At startup the server checks the image is there and pulls it when it is not (never per message); an image it cannot pull fails startup. A container that outlives its timeout, or a stopped run, is removed by name.
The operator picks the container CLI and adds run arguments per plugin:
@sha256 image runs exactly what was checked. yukta-cli plugin validate runs an image plugin the same way (it reads YUKTA_PLUGINS_CONTAINER_RUNTIME too). A container starts per message, so expect a second or so per message; the server needs a container runtime, which the stock Yukta Docker image does not have.
Wrap an MCP tool
A plugin can be one tool of an existing MCP server. The server stays running, so there is no process start per message:run.mcp takes one of:
At startup Yukta lists the server’s tools and reads the tool’s input schema: each of its properties becomes a configuration field (a
SECRET the manifest declares stays first). For each message the node’s configuration, with ${...} placeholders resolved, is the tool’s arguments. The output payload is the tool’s structured result, or its text when it has none; a tool error fails the message. A missing tool fails startup.
The digest to pin covers the plugin’s directory and the tool’s input schema, so a server that changes the tool after you accepted it fails startup. yukta-cli plugin validate checks the manifest of an MCP plugin but does not run it; take the digest from the server’s startup log (Plugin GITHUB_ISSUE from ..., sha256:...).
Verify it worked
GET /api/plugins (or the list_plugins MCP tool) lists WORD_COUNT with its options and ports. A node of that type in a workflow shows the program’s stderr lines in its output.
Security
The operator who installs a plugin trusts it: a command runs as the server’s user and can read what the server can. An image plugin is isolated by its container: it sees no server files, variables or processes unless the operator’s arguments add them. An MCP tool over HTTP sees only the arguments Yukta sends. What Yukta still enforces:- A workflow can never define a plugin; only the operator installs and enables one.
- No shell, and a clean environment: the process gets
PATHand nothing else from the server, so it cannot read server secrets. Secrets it declares asSECRETfields arrive on stdin, never in arguments or the environment. - Limits: the manifest’s timeout, at most 1 MiB on stdout (
yukta.plugins.external.max-output-bytes) and 1,000 outputs (yukta.plugins.external.max-outputs) per message, more fails the message; one message at a time per node. - The server warns at startup when the plugins directory is writable by its own user.
Related
- Write a plugin: a node type in Java, built into the server.
- Configuration:
yukta.plugins.*settings. - Use variables, expressions and secrets: what
configplaceholders can read.