Requirements
@powersync/node.- Node.js 20.16 or later.
Set Up DevTools
1
Install the package
2
Enable DevTools in your app
After you create the database, call Import
enablePowerSyncDiagnostics() in development only.@powersync/diagnostics inside the check. A production install without dev dependencies (npm ci --omit=dev) does not include the package. A static import at the top of the file then stops your app at startup.diagnostics: true is optional. Without it, the Buckets tab does not show the total number of operations for each bucket.3
Open the sign-in link
Start your app and open the link that it prints. The link contains a one-time code that is valid for five minutes and for one browser. If the code expires, open
devtools.url to print a new link in the terminal.<url>/__mcp, read MCP Tools.
Options
Pass options as the second argument:enablePowerSyncDiagnostics(db, { port: 4000 }).
Return Value
enablePowerSyncDiagnostics() returns an object with these properties: