Tools for debugging your node.js modules and event loop
Connect Diagnostics to Claude, Cursor or any other MCP client and it stops being a tab you switch to. Tools for debugging your node.js modules and event loop. The diagnostics mcp server is what makes that connection.
Diagnostics in the evolution of debug pattern that is used in the Node.js core, this extremely small but powerful technique can best be compared as feature flags for loggers. The created debug logger is disabled by default but can be enabled without changing a line of code, using flags.
To create a new logger simply require the @dabh/diagnostics module and call the returned function. It accepts 2 arguments:
The toolset is worth reading before you wire it up, because it tells you what the integration is really for:
Introduction — To create a new logger simply require the @dabh/diagnostics module and call the returned function. It accepts 2 arguments:modify — The modify method allows you add a new message modifier to all diagnostic instances. The passed argument should be a function that returns theModifiers — To be as flexible as possible when it comes to transforming messages we've come up with the concept of modifiers which can enhance the debugnamespace — This modifier is enabled for all debug instances and prefixes the messages with the name of namespace under which it is logged. The namespace isAdapters — Adapters allows diagnostics to pull the DEBUG and DIAGNOSTICS environment variables from different sources. Not every JavaScript environment has ahash — This adapter uses the window.location.hash of as source for the environment variables. It assumes that hash is formatted using the same syntax aslocalStorage — This adapter uses the localStorage of the browser to store the debug flags. You can set the debug flag your self in your application code, but youAsyncStorage — This adapter uses the AsyncStorage API that is exposed by the react-native library to store and read the debug or diagnostics storage itemsLoggers — By default it will log all messages to console.log in when the logger is enabled using the debug flag that is set using one of the adaptersSetup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.
Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Diagnostics's toolset — Introduction, modify, Modifiers and 6 more — is a fair guide to whether it matches your workflow. It is maintained by dabh; worth a glance at recent repository activity before you build anything load-bearing on it.
SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.
| Tool | What it does |
|---|---|
| Introduction | To create a new logger simply require the @dabh/diagnostics module and call the returned function. It accepts 2 arguments: |
| modify | The modify method allows you add a new message modifier to **all** diagnostic instances. The passed argument should be a function that returns the passed message after modification. The function receives 2 arguments: |
| Modifiers | To be as flexible as possible when it comes to transforming messages we've come up with the concept of modifiers which can enhance the debug messages. This allows you to introduce functionality or details that you find i |
| namespace | This modifier is enabled for all debug instances and prefixes the messages with the name of namespace under which it is logged. The namespace is colored using the colorspace module which groups similar namespaces under t |
| Adapters | Adapters allows diagnostics to pull the DEBUG and DIAGNOSTICS environment variables from different sources. Not every JavaScript environment has a process.env that we can leverage. Adapters allows us to have different ad |
| hash | This adapter uses the window.location.hash of as source for the environment variables. It assumes that hash is formatted using the same syntax as query strings: |
| localStorage | This adapter uses the localStorage of the browser to store the debug flags. You can set the debug flag your self in your application code, but you can also open browser WebInspector and enable it through the console. |
| AsyncStorage | This adapter uses the AsyncStorage API that is exposed by the react-native library to store and read the debug or diagnostics storage items. |
| Loggers | By default it will log all messages to console.log in when the logger is enabled using the debug flag that is set using one of the adapters. |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.