Docs / Scripting & MCP
JavaScript Scripting
Modify traffic programmatically with JavaScript.
MinPin embeds a JavaScriptCore engine. Open Tools → Scripts (⌘⌥S, PRO) and 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 minpin.log() output and a Run Test button.
minpin.onResponse = function(req, res) {
return { body: res.body.replace("prod", "staging") };
};
Add-ons
Ten pre-built add-ons ship across five categories (Authentication, Debugging, Modification, Security, Testing). Import them individually or all at once. Request scripts run after rewrite rules; response scripts after response rewrites.