Docs / Scripting & MCP
JavaScript Scripting
Modify traffic programmatically with JavaScript.
MinPin embeds a JavaScriptCore engine. Write scripts with onRequest / onResponse hooks to modify method, URL, headers, body, or status code, matched by a glob URL pattern. The editor has a console for debugging.
minpin.onResponse = function(req, res) {
return { body: res.body.replace("prod", "staging") };
};
Add-ons
Ten pre-built add-ons ship across five categories (Auth, Debug, Modification, Security, Testing). Import them individually or all at once. Request scripts run after rewrite rules; response scripts after response rewrites.