Make Lyreto plugins
Ship slash commands, signed GitHub channel webhooks, and remote MCP tool bridges with lyreto-plugin.json — or build .lyplug effects and instruments for Lyreto Studio.
Group Plugin SDK (lyreto-plugin.json)
Build slash commands, signed GitHub & CI webhooks, and remote MCP tool bridges for coding and dev teams on Lyreto. A group plugin is declared by a single standardized lyreto-plugin.json manifest — paste it in Server Settings → Plugin Directory or register it via the REST API and install it in one click.
- Write a
lyreto-plugin.jsonmanifest describing your plugin metadata, permissions, slash commands, webhooks, or optional HTTPSmcp_server. - Validate & register via Server Settings → Plugin Directory → Paste Manifest or
POST /api/plugins/register. - Install & configure on your server (target channel, MCP URL, optional signing secret). Team members immediately see your slash commands in chat when they type
/. - Connect GitHub Webhooks in Server Settings → GitHub Webhooks to get a one-time URL (
https://lyreto.com/api/webhooks/github/<id>) and HMAC-SHA256 signing secret for pushes, PRs, issues, releases, and GitHub Actions CI runs.
lyreto-plugin.json Manifest Reference
| Field | Type & rules |
|---|---|
id | Required. Lowercase slug, 3–48 chars matching ^[a-z0-9][a-z0-9-]{1,46}[a-z0-9]$ (e.g. acme-deploy-tracker). |
name | Required. Display name, 2–64 characters. |
version | Required. Semver string like 1.0.0 or 1.2.0-beta.1. |
description | Required. Short explanation shown in the Group Plugin Directory (4–400 characters). |
author | Required. Person or engineering team name (2–64 characters). |
category | One of: developer, git, ci-cd, monitoring, mcp, productivity, other. |
permissions | Array of scopes: messages:post, slash_commands, webhooks:receive, mcp:tools, embeds:rich. |
slash_commands[] | Up to 15 commands. Each entry has name (lowercase a-z0-9_-, 2–32 chars, non-reserved), description (2–160 chars), optional usage, and optional HTTPS endpoint. |
webhooks[] | Up to 15 declared webhook event descriptors: event, description, and optional HTTPS target_url. |
mcp_server | Optional object: { "url": "https://...", "transport": "streamable-http", "description": "..." }. Strict HTTPS-only + SSRF protection enforced. |
Copy-Paste Starter Examples
1. Slash command plugin (with HTTPS webhook handler)
{
"id": "acme-deploy-tracker",
"name": "Acme Deploy Tracker",
"version": "1.0.0",
"description": "Check staging and production deploys straight from group chat with /release.",
"author": "Acme Engineering",
"category": "ci-cd",
"permissions": [
"messages:post",
"slash_commands",
"embeds:rich"
],
"slash_commands": [
{
"name": "release",
"description": "Check live release status for an environment",
"usage": "<staging|prod>",
"endpoint": "https://ops.example.com/lyreto/commands/release"
}
],
"webhooks": [
{
"event": "deploy.completed",
"description": "Notify ops channel when a deploy finishes"
}
]
}
When a member types /release prod, Lyreto sends a JSON POST to your HTTPS endpoint with { type, pluginId, command, args, serverId, channelId, user, timestamp } and signs the raw body with X-Lyreto-Signature-256 when a secret is configured:
// Example Node.js / Express handler for a custom lyreto-plugin.json slash command
import crypto from 'node:crypto';
import express from 'express';
const app = express();
app.use(express.json({
verify: (req, _res, buf) => { req.rawBody = buf; },
}));
function verifyLyretoSignature(secret, rawBody, header) {
if (!secret || !rawBody || !header?.startsWith('sha256=')) return false;
const expected = 'sha256=' + crypto.createHmac('sha256', secret).update(rawBody).digest('hex');
const a = Buffer.from(header.trim());
const b = Buffer.from(expected);
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
app.post('/lyreto/commands/release', (req, res) => {
if (!verifyLyretoSignature(process.env.PLUGIN_SECRET, req.rawBody, req.get('X-Lyreto-Signature-256'))) {
return res.status(401).json({ error: 'Invalid signature' });
}
const env = (req.body.args || 'prod').trim();
return res.json({
content: '',
embeds: [{
title: `🚀 ${env} is healthy`,
description: 'v2.14.0 deployed 4m ago · 0 errors',
color: '#3fb950',
fields: [
{ name: 'Environment', value: env, inline: true },
{ name: 'Requested by', value: req.body.user?.username ?? 'team', inline: true },
],
}],
});
});
2. GitHub PR & CI Feed plugin
{
"id": "github-pr-ci-feed",
"name": "GitHub PR & CI Feed",
"version": "1.0.0",
"description": "Live GitHub PR/Issue/Commit cards and signed GitHub channel webhooks.",
"author": "Lyreto",
"category": "git",
"permissions": [
"messages:post",
"slash_commands",
"webhooks:receive",
"embeds:rich"
],
"slash_commands": [
{
"name": "gh",
"description": "Fetch a live GitHub PR, issue, or commit card",
"usage": "<owner/repo#123>"
}
],
"webhooks": [
{
"event": "pull_request",
"description": "Opened, merged, closed, and ready-for-review PR cards"
},
{
"event": "workflow_run",
"description": "GitHub Actions CI pass/fail alerts"
},
{
"event": "push",
"description": "Branch commit summaries with compare links"
}
]
}
Pasting any public GitHub Pull Request (/pull/123), Issue (/issues/42), or Commit (/commit/sha) URL in chat automatically unfurls a live dark-mode GitHub card showing repo, state pill (Open / Merged / Closed / Draft), author, +additions / -deletions, changed files, and CI check status.
3. Remote MCP server plugin
{
"id": "acme-mcp-tools",
"name": "Acme Remote MCP Bridge",
"version": "1.0.0",
"description": "Connect your internal HTTPS Model Context Protocol server to inspect dev tools.",
"author": "Acme Engineering",
"category": "mcp",
"permissions": [
"messages:post",
"slash_commands",
"mcp:tools",
"embeds:rich"
],
"slash_commands": [
{
"name": "mcp-tools",
"description": "List tools exposed by our MCP server",
"usage": "[filter]"
}
],
"webhooks": [],
"mcp_server": {
"url": "https://mcp.example.com/v1/rpc",
"transport": "streamable-http",
"description": "Internal read-only engineering telemetry MCP server"
}
}
Security, SSRF Protection & HMAC Signatures
- HTTPS-only endpoints: Every
slash_commands[].endpoint,webhooks[].target_url, andmcp_server.urlmust usehttps://on port 443 with no embedded credentials. - SSRF IP & hostname blocklist: Localhost,
.local,.internal, link-local metadata (169.254.169.254), RFC1918 private networks (10.0.0.0/8,172.16.0.0/12,192.168.0.0/16), loopback (127.0.0.0/8,::1), and ULA IPv6 ranges are blocked both at manifest registration and at DNS connect time on every redirect hop. - Strict timeouts & payload caps: Outbound slash command and MCP calls enforce a 5-second timeout and 32 KB response cap so a slow endpoint never blocks chat.
- GitHub webhook HMAC-SHA256 verification: Every delivery to
POST /api/webhooks/github/:idmust include a validX-Hub-Signature-256: sha256=<hex>header verified in constant time (crypto.timingSafeEqual) against the webhook's sealed secret. Unsigned or tampered requests are rejected with HTTP401.
Plugin Directory & GitHub Webhook API
| Method & Route | Access | Description |
|---|---|---|
GET /api/plugins/directory | Public | Browse and search official & community group plugins (?q=, ?category=). |
POST /api/plugins/register | Signed-in user | Validate and register a custom lyreto-plugin.json manifest. |
GET /api/servers/:serverId/plugins | Server member | List plugins installed in a group and their sanitized config. |
POST /api/servers/:serverId/plugins/install | Owner / Admin | Install by { pluginId, config } or paste an inline { manifest, config }. |
PATCH /api/servers/:serverId/plugins/:pluginId | Owner / Admin | Toggle enabled or update channel / MCP URL / signing secret. |
DELETE /api/servers/:serverId/plugins/:pluginId | Owner / Admin | Uninstall a plugin from the group. |
POST /api/servers/:serverId/github-webhooks | Owner / Admin | Create a GitHub channel webhook; returns one-time URL and HMAC secret. |
POST /api/webhooks/github/:id | GitHub HMAC-SHA256 | Public ingress for signed GitHub ping, push, pull_request, issues, workflow_run, check_run, and release events. |
Studio Audio Plugins (.lyplug)
A Lyreto plugin is also an effect or an instrument anyone can write and load into Lyreto Studio, the free beat maker at lyreto.com/studio. Browsers can't load VST or AU plugins, so Lyreto has its own format: a small manifest that names the plugin and its knobs, and DSP code in plain JavaScript that makes or changes the sound.
The code runs inside the Studio's audio engine, the same one the built-in effects use, so a plugin sounds the same while you play and in every export. Its knobs work like the built-in ones: you can automate them, link them to a MIDI controller and undo every change. A beat keeps a copy of each plugin it uses, so it opens with them anywhere.
The Bitcrusher and Transient Shaper are Lyreto's own built-in effects rewritten as plugins. Their output matches the built-ins sample for sample, so they make good real-world examples. All the example code on this page is CC0: copy it freely.
The .lyplug file
A plugin is one file ending in .lyplug. It comes in two forms:
- One JSON file with
manifestandcode, which is what the examples above are:
{
"lyplug": 1,
"manifest": {
"format": 1,
"name": "Simple Gain",
"author": "Lyreto",
"version": "1.0.0",
"kind": "effect",
"description": "The smallest useful effect: turns the sound up or down.",
"params": [
{
"id": "gain",
"name": "Gain",
"min": -24,
"max": 12,
"default": 0,
"step": 0.5,
"unit": "dB"
}
]
},
"code": "// Simple Gain: multiplies every sample by the…
- A zip holding
manifest.jsonanddsp.js. You can name the code file something else with"main": "my-file.js"in the manifest.
Limits: the file can be up to 256 KB, the code up to 64 KB and the manifest up to 16 KB. A plugin can have up to 16 knobs. An account can keep 40 plugins, and one beat can use 8 different ones.
The Studio plugin manifest
{
"format": 1,
"name": "Simple Gain",
"author": "You",
"version": "1.0.0",
"kind": "effect",
"description": "Turns the sound up or down.",
"params": [
{
"id": "gain",
"name": "Gain",
"min": -24,
"max": 12,
"default": 0,
"step": 0.5,
"unit": "dB"
}
],
"ui": {
"layout": [
[
"gain"
]
],
"accent": "#7c5cff"
}
}
format | Always 1 for now (optional). |
name, author | Text, up to 40 characters. |
version | Like 1.0 or 1.2.3. Changing anything makes it a new plugin, and beats that used the old one keep their own copy. |
kind | "effect" goes in a mixer FX rack. "instrument" becomes a channel you play notes on. |
description | Optional, up to 200 characters. |
params | Up to 16 knobs (an empty list is fine). Each knob has:id: letters, digits and _, starting with a letter. Your code reads it as params.id. (mix is taken, since every effect slot already has a Mix knob.)name: the label under the knob.min, max, default: numbers.step, unit (like dB, Hz, ms or %): optional.log: true: sweeps logarithmically, which suits frequencies and times (min must be above 0).options: ["A", "B", "C"]: makes a switch, and your code gets 0, 1, 2…automate: false: keeps it out of automation. |
ui | Optional. layout is rows of knob ids (up to 4 rows of 8). accent is a colour like #7c5cff. Without a layout the Studio lays out the knobs for you. |
latency | Optional, effects only. How many samples your effect delays the sound (look-ahead, oversampling), 0–2048. The mixer delays every other track by the same amount so everything stays in sync. |
The DSP code
The code calls plugin({ ... }) once. An effect gives create(host), which returns an object with process(input, output, params, frames):
// Simple Gain: multiplies every sample by the Gain knob (in dB).
plugin({
create(host) {
return {
process(input, output, p, frames) {
const g = Math.pow(10, p.gain / 20);
for (let c = 0; c < output.length; c++) {
const i = input[c], o = output[c];
for (let n = 0; n < frames; n++) o[n] = i[n] * g;
}
}
};
}
});
host.sampleRateis 44100 or 48000,host.channelsis 2, andhost.maxFramesis 128.inputandoutputare two channels (left, right), each aFloat32Arrayofframessamples. Mono sources arrive on both channels.paramsholds every knob's current value in real units (the automation and controller already applied), updated once per block of 128 samples.- State you keep between calls (filters, delay lines, envelopes) lives in variables inside
create. Every slot gets its own copy.
An instrument gives voice(host, note, velocity), called once per note. It returns process(output, params, frames), which adds its sound into output and returns false when the note is finished. It can also return release(), which is called when the key is let go:
// Soft Saw: one voice per note. process() returns false when the note has faded out.
plugin({
voice(host, note, velocity) {
const freq = 440 * Math.pow(2, (note - 69) / 12);
const inc = freq / host.sampleRate;
let phase = 0, env = 0, low = 0, released = false;
return {
process(output, p, frames) {
const up = 1 / Math.max(1, p.attack * 0.001 * host.sampleRate);
const down = Math.exp(-1 / Math.max(1, p.release * 0.001 * host.sampleRate));
const k = 1 - Math.exp(-2 * Math.PI * p.cutoff / host.sampleRate);
const L = output[0], R = output[1];
for (let n = 0; n < frames; n++) {
env = released ? env * down : Math.min(1, env + up);
phase += inc; if (phase >= 1) phase -= 1;
low += (2 * phase - 1 - low) * k;
const s = low * env * velocity * p.level * 0.5;
L[n] += s; R[n] += s;
}
return !released || env > 0.0001;
},
release() { released = true; }
};
}
});
note is a MIDI note number (60 = middle C, 69 = A 440 Hz) and velocity runs from 0 to 1. Notes start and end on the exact sample, both live and in exports. A voice stops on its own 10 seconds after its key is released.
What Studio plugin code can and can't do
Plugins run in the browser's audio thread. That thread has no page, no DOM, no network and no access to the person's account. On top of that, Lyreto checks the code before running it:
- These names are refused:
eval,Function,import,require,globalThis,self,window,document,fetch,XMLHttpRequest,WebSocket,EventSource,importScripts,postMessage,port,registerProcessor,AudioWorkletProcessor,Atomics,SharedArrayBuffer,WebAssembly,setTimeout,setIntervaland a few more. The same goes for any name starting with__and for generator functions. The Studio tells you the line. - Every loop is counted. A loop that runs more than 4,000,000 times in one block stops the plugin instead of freezing the music.
- If a plugin uses more than 60% of the audio thread's time, or a single block takes very long, it is bypassed so the beat keeps playing. An effect then passes the sound through untouched, and an instrument goes quiet. The slot and the Plugin manager show the reason.
- If a plugin throws an error or outputs
NaN, it is switched off the same way. - Built-in objects like
Mathand the array types are frozen, so one plugin can't change them for the others. - Plugin code never runs on Lyreto's servers. The server only checks the manifest and the size, then stores the file for your account.
Plugins you load from other people run in your browser. They can't reach anything outside the audio engine, but a bad one can still sound bad, so only load plugins from people you trust.
Load it in the Studio
- Effect: open the Mixer, pick a track, then open + Add effect → Lyreto plugins → Add plugin from file in its FX rack.
- Instrument: in the Channel rack or the Playlist, use + Plugin → Load plugin file. It becomes a new channel. Write its notes in the Piano roll, where its knobs are too.
- Knobs: drag up or down (Shift for fine moves) and double-click to reset. Right-click a knob for an automation clip, or use MIDI Learn and turn a controller knob.
- Plugin manager (Shift+P or 🔌 Plugins): see each plugin's version and status, switch plugins off and on, remove them from your account, save the .lyplug or Rescan after a problem.
FAQ
How fast can a dev team add a custom group plugin?
Under two minutes: write a lyreto-plugin.json manifest with your slash command or remote MCP HTTPS URL, paste it in Server Settings → Plugin Directory, and install it on your server.
How are GitHub webhooks secured?
Every channel webhook gets its own sealed signing secret. Deliveries to /api/webhooks/github/:id require a valid HMAC-SHA256 X-Hub-Signature-256 header verified in constant time.
Can I load VST or AU plugins in Studio?
Not in the browser, since browsers can't run them. Lyreto Studio plugins are our own open .lyplug format, and they work on every computer and Chromebook that runs Lyreto Studio.
Can I sell or share my plugin?
Yes. Your lyreto-plugin.json and .lyplug files are yours, so share them however you like. The example code on this page is CC0.
Do Studio plugins work in exports and stems?
Yes. Exports run the same plugin code as playback, sample for sample.
What happens if a Studio plugin crashes?
Only that plugin is switched off: an effect passes the sound through and an instrument goes quiet. The reason shows in its slot and in the Plugin manager, and Rescan retries it after you fix the code.
Build tools for your team and instruments that sound like you.
Free. No credit card. Works in your browser, on iPhone and Android, and on Mac, Windows and Linux.