About mlua-swarm
mlua-swarm is a long-running engine that compiles flow.ir Blueprints and dispatches agent steps to multiple backends. It is for running Blueprint workflows, recording task state, and coordinating in-process Lua, Rust functions, child processes, or interactive Operators.
Key features
- 01Compile flow.ir Blueprints
- 02Run step, branch, loop, and fanout flows
- 03Dispatch agent steps to multiple backends
- 04Record task state
- 05Provide HTTP, WebSocket, and Blueprint storage
Use cases
- 01Run Blueprints with branching and loops
- 02Assign workflow steps to Lua or Rust backends
- 03Execute agent steps through processes or Operators
MCP support
`mse mcp` provides a stdio MCP adapter, including `swarm_run` for one-shot Blueprint execution, `bp_schema`, and documentation and sample resources.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
docker run -i --rm ghcr.io/ynishi/mse:0.32.1Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
ghcr.io/ynishi/mse:0.32.1stdioTools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEmlua-swarm
A long-running swarm engine host that compiles flow.ir Blueprints and
dispatches their agent steps to workers. A Blueprint declares a flow
(step / seq / branch / loop / fanout / try / let nodes) plus the
agents it references; the engine resolves each agent to a backend
(in-process Lua, a Rust function, a child process, or an interactive
Operator) and drives the flow while recording task state.
Install
cargo install mlua-swarm-cli
This installs the mse binary with two subcommands:
mse serve # HTTP + WS server (tasks, Blueprint store, WS Operator sessions)
mse mcp # MCP adapter over stdio, for AI agents (Claude Code etc.)
One-shot Blueprint execution is available through the swarm_run MCP tool
(exposed by mse mcp), which runs through the canonical
TaskApplication.handle / TaskLaunchService::launch path.
MCP client config:
{ "command": "mse", "args": ["mcp"] }
Docker (no Rust toolchain required)
Also listed on the MCP Registry
as io.github.ynishi/mlua-swarm:
{
"mcpServers": {
"mlua-swarm": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"ghcr.io/ynishi/mse:latest",
"mcp"
]
}
}
}
Documentation
Documentation is served from the code itself:
- API / architecture — rustdoc on docs.rs (the crate root doc is the architecture overview).
- Guides / samples / schema — bundled MCP resources under
mse://, served bymse mcpand always version-matched to the binary:mse://guides/getting-started,mse://guides/bp-lifecycle(the develop → trial-run → operate workflow map),mse://guides/blueprint-authoring,mse://guides/mcp-tool-reference,mse://blueprints/samples/*, and the live Blueprint JSON Schema atmse://api/blueprint-schema(also available as thebp_schematool).
Workspace crates
| crate | role |
|---|---|
mlua-swarm | engine core (workspace root package) |
mlua-swarm-schema | Blueprint schema types |
mlua-swarm-server | HTTP + WS server library |
mlua-swarm-cli | the mse binary |
License
Licensed under either of Apache License 2.0 or MIT License at your option.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.