Prototype · Preview: every server in the official registry, synced every 30 minutes. Sign in with Google to write reviews.Prototype · updated every 30 min
PopNx MCPMCP servers for people who use AI · explained in plain words Sign in

cleaninstall-node

by ahusanversion 3.4.1i★ 0iRuns on your computerOfficial site ↗

How to install

What it does

Diagnose and fix broken Node.js/Deno installs instead of rm -rf node_modules and the lockfile

  • Connects Runs on your computer
  • Account or key No key needed
  • Category Other

Why it ranks here

Lists are ordered by a usage score (out of 100) built from these parts

Popularity0/80GitHub stars or weekly downloads: the larger counts 60, the smaller 20
Freshness12/12Full marks for a release or code change within 30 days
Still answering0/8The cloud endpoint answered at the last check
Usage score12/100

Quality: Passed 3/3 basic checks (shown, not used for ordering) · Momentum: No data yet (Used only on the Trending tab)

Install

Pick the AI app you use, then copy the settings.

Let your AI install it with one sentence

Please install cleaninstall-node. Follow https://mcp.popnx.com/i/ahusan-cleaninstall-node.md, show me the commands and wait for my OK before running them.

Paste it into an AI that can work on your computer (such as Claude Code or Cursor). It reads our steps, shows you the commands and waits for your OK. No key, no sign-up. · See the full text your AI reads

Passed 3/3 checks · Runs on your computer · ✓ Commands checked Nov 25, 2026

First: which AI do you use?

Pick your app and the steps appear below.

Works with Claude, with some setup first

Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone

Let AI install it

Copy this message into a Claude chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server cleaninstall-node for Claude on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "cleaninstall-node": { "command": "npx", "args": [ "-y", "cleaninstall-node", "mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the cleaninstall-node tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Open the Claude desktop app’s settings file

    SettingsDeveloperEdit Config

  3. Paste these settings and save the file

    {
      "mcpServers": {
        "cleaninstall-node": {
          "command": "npx",
          "args": [
            "-y",
            "cleaninstall-node",
            "mcp"
          ]
        }
      }
    }
  4. Quit Claude and open it again

  5. Try it

    Use cleaninstall-node and tell me what you can do for me, then show me one thing

    ✓ If Claude says it is using cleaninstall-node or shows a cleaninstall-node tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

ChatGPT cannot connect cleaninstall-node yet

cleaninstall-node runs on your computer, but ChatGPT can only connect servers that run on the web

What you can do instead

A · Use an app that can connect cleaninstall-node

  • Install Node.js on your computer first (one time) · Only the Claude desktop app (Windows or Mac), not the web or phone
  • Install Node.js on your computer first (one time)
  • Install Node.js on your computer first (one time)
  • Install Node.js on your computer first (one time)

B · Others in Other that work with ChatGPT

Picked from the most used in the same category, only ones that connect by address with no key

Works with Claude Code, with some setup first

Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a Claude Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server cleaninstall-node for Claude Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): claude mcp add --scope user cleaninstall-node -- npx -y cleaninstall-node mcp 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the cleaninstall-node tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Open Terminal

    Mac: press Command+Space and type Terminal · Windows: open PowerShell

  3. Paste this command and press Enter

    claude mcp add --scope user cleaninstall-node -- npx -y cleaninstall-node mcp
  4. Type /mcp in Claude Code

    You should see cleaninstall-node listed as connected

  5. Try it

    Use cleaninstall-node and tell me what you can do for me, then show me one thing

    ✓ If Claude Code says it is using cleaninstall-node or shows a cleaninstall-node tool in the answer, you are connected

Menu names checked against Anthropic’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with Cursor, with some setup first

Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a Cursor chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server cleaninstall-node for Cursor on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "mcpServers": { "cleaninstall-node": { "command": "npx", "args": [ "-y", "cleaninstall-node", "mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the cleaninstall-node tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Click this button to open Cursor

    Open in Cursor

    Cursor asks you to confirm; click Install

  3. Open the AI chat in Cursor in Agent mode

  4. Try it

    Use cleaninstall-node and tell me what you can do for me, then show me one thing

    ✓ If Cursor says it is using cleaninstall-node or shows a cleaninstall-node tool in the answer, you are connected

Menu names checked against Cursor’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Works with VS Code, with some setup first

Install Node.js on your computer first (one time)

Let AI install it

Copy this message into a VS Code chat. The AI checks your computer, tells you which file it will change, and waits for your OK every time.

Please install the MCP server cleaninstall-node for VS Code on this computer, in this order: 1) Check Node.js with node -v. If it is missing, tell me to install it from https://nodejs.org/en/download; do not install it yourself. 2) Use only this config (already checked by PopNx MCP): { "servers": { "cleaninstall-node": { "type": "stdio", "command": "npx", "args": [ "-y", "cleaninstall-node", "mcp" ] } } } 3) Tell me the full path of the file you will change, or the command you will run, and wait for my OK. 4) No key is needed. 5) Do what we agreed, then check that the cleaninstall-node tools really show up.

This message has no key in it. If a key is needed, the AI will ask you to paste it yourself into the file or the app’s field.

  1. Install Node.js (if you don’t have it)

    Already installed? Check first · Open Terminal, type this command and press Enter

    node -v
    • A version number such as v26.13.1 = installed, skip this step
    • "command not found" (on Windows: "is not recognized") = not installed yet, or installed but Terminal needs to be closed and reopened
    How to open Terminal

    Mac: press ⌘ + Space, type Terminal, press Enter

    Windows: open Start, type Windows PowerShell, then Open

    Not installed: Open the official download page, pick the LTS version and the click-through installer: .pkg on Mac · .msi on Windows. Double-click and follow it to the end. No curl command needed

    Open the Node.js download page ↗

    When it’s done, close Terminal, open it again and run the same command. You should see a version number: node -v

    Install once; it works for everything that needs Node.js

  2. Click this button to open VS Code

    Open in VS Code

    VS Code asks you to confirm; click Install

  3. Open the AI chat in VS Code in Agent mode

  4. Try it

    Use cleaninstall-node and tell me what you can do for me, then show me one thing

    ✓ If VS Code says it is using cleaninstall-node or shows a cleaninstall-node tool in the answer, you are connected

Menu names checked against VS Code’s help page on Nov 11, 2026 · your screen may differ slightly by app version

Other apps that use MCP, such as Windsurf, Zed or Gemini CLI, each add servers differently. See how in the app list.

See every app that uses MCP →

JSON settings are under “For developers” below

Stuck? Ask people who use cleaninstall-node💬 Discussion →
For developers: Terminal commands and JSON settings

Installed on your computer

Claude Code

claude mcp add --scope user cleaninstall-node -- npx -y cleaninstall-node mcp

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "cleaninstall-node": {
      "command": "npx",
      "args": [
        "-y",
        "cleaninstall-node",
        "mcp"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "cleaninstall-node": {
      "command": "npx",
      "args": [
        "-y",
        "cleaninstall-node",
        "mcp"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "cleaninstall-node": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "cleaninstall-node",
        "mcp"
      ]
    }
  }
}

These settings are generated from the maker’s registry entry. If the README says otherwise, follow the README.

At a glance

Registry name
io.github.ahusan/cleaninstall-node
Downloads per weeki
20/wk
Connection
Runs on your computer
Latest versioni
3.4.1
Categoryi
Other
Published to registryi
Nov 25, 2026
Code last changedi
Nov 25, 2026
Maker
ahusan
Packages
npm: cleaninstall-node
Registry status
Active

Which apps can use it

Based on how this server connects and on each app’s own docs, checked Nov 10, 2026.

Run on your computer in

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

All apps, with pros and cons →

Related guides

What it can do

Runs on your computer; the tool list appears in your AI app after you install it.

Basic checksi

We check information anyone can see; we have not read the code. Checks that do not apply are left out of the count. · Checked Nov 26, 2026

  • ✓ Pass

    Maker matches the repo

    The registry name was verified with the GitHub account ahusan, which owns the repo

  • ✓ Pass

    Still maintained

    Code last changed yesterday

  • ✓ Pass

    Has a licence

    Uses MIT

  • – Not applicable

    Endpoint responds

    This one runs on your computer; there is no internet endpoint

  • – Not applicable

    Sign-in with OAuth

    Runs on your computer and uses local settings instead

  • … Not checked yet

    No hidden instructions in tool descriptions

    Runs on your computer; we can only read tool lists from internet endpoints

Published vulnerabilities (OSV.dev)

No entries on OSV.dev for cleaninstall-node@3.4.1

Checks only this package version, not every dependency · checked Nov 25, 2026

What we check → · JSON

Makers: ask for a re-check or report wrong info
For makers: add a badge to your README

If you made this, paste this code into your README. The badge links back to this page.

[![Featured on PopNx MCP](https://mcp.popnx.com/badge/ahusan-cleaninstall-node.svg)](https://mcp.popnx.com/en/servers/ahusan-cleaninstall-node)

Discussion

Ask, share a tip or report that it does not work. Sorted by what people marked helpful.

No posts yet. Be the first to ask or share.

Posts here are written by users, not the PopNx team.

Sign in to post

User reviews

No reviews yet

Sign in to write a review

Compared with others in Otheri

  • More stars than 0% of the other 22222 servers in this category
  • Published to the registry more recently than 98% of the other 22222 servers in this category
  • Basic checks equal to or better than 99% of the other 22222 servers in this category

Compared with every active server in this category in the registry. Stars count only when the publisher owns the repo.

Common questions

Is cleaninstall-node safe?

It passed 3 of 3 applicable basic checks. We have not read the code. Before adding a key or token, see what access the server asks for and use a key with only the permissions you need.

What keys or codes does it need?

The registry does not list a required key, though some servers ask you to sign in on first use.

Does it run on my computer or in the cloud?

It runs on your computer. Your AI app starts it when needed, and data does not pass through the maker’s servers (unless it calls an online service itself).

Is it still maintained?

The GitHub repo last changed yesterday, and the latest version (3.4.1) reached the registry yesterday.

Which apps can use it?

Apps that support MCP, such as Claude Desktop, Claude Code, Cursor and VS Code. You also need Node.js on your computer.

What can I use instead?

In the same category: World Monitor, openstatus, Oh My Posh Validator, Strata, Jitsu

Similar alternatives

Same category, other makers, commands already checked. Official ones first, then by stars.

Reading a card:↓ Downloads per weeki★ GitHub starsiThree pillars: reviews · checks · usageiUpdated = latest version published to the registryi

World Monitor

Real-time global intelligence on conflict, markets, energy, trade, shipping and cyber. 100 tools.

by koala73Widely used★ 91.2KUpdated 10 days ago

Connect now (has URL) · sign-in✓ service owner · worldmonitor.app

openstatus

Manage monitors, status pages, incidents and maintenances in your openstatus workspace.

by openstatusHQWidely used★ 9.3KUpdated 3 months ago

Connect now (has URL) · sign-in✓ service owner · openstatus.dev

Oh My Posh Validator

Validate oh-my-posh configurations and segment snippets against the official schema.

by JanDeDobbeleerWidely used★ 23.8K Stars for the whole repoUpdated 37 days ago

Connect now (has URL)2 tools · light✓ service owner · ohmyposh.dev

Strata

MCP server for progressive tool usage at any scale (see https://klavis.ai)

by Klavis-AIGrowing★ 5.8KUpdated 14 months ago

Connect now (has URL) · needs a keyRepo archived✓ klavis.ai

Jitsu

Manage Jitsu data pipelines: destinations, streams, connections, functions, live events.

by jitsucomWidely used★ 5.1KUpdated 4 months ago

Connect now (has URL) · sign-in✓ service owner · jitsu.com
Compared with similar ones
This one
cleaninstall-node
World MonitoropenstatusOh My Posh ValidatorStrataJitsu
Runs whereInstalls on your computerRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to installRuns in the cloud, nothing to install
Needs a keyNoNoNoNoNoNo
Add with + in ClaudeNoNoNoNoNoNo
Basic checks3/34/44/44/41/44/4
LicenseMITAGPL-3.0AGPL-3.0MITApache-2.0MIT
PriceNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registryNo cost listed in the registry

README from the maker

Open the README

Copied from the maker’s repo as written. PopNx MCP has not reviewed or endorsed it. HTML, images and scripts are removed. Links lead off this site.

CleanInstall Node

Stop deleting `node_modules` blindly. cleaninstall-node finds out *why* an install is broken and applies the smallest fix, warns you right after a git pull changes your dependencies, and cleans safely when you really do want a fresh start. Works with npm, pnpm, yarn, bun and Deno, in single projects and monorepos.

[Website](https://cleaninstall-node.ahusan.dev/) · npm · Changelog

npx cleaninstall-node doctor         # what's wrong? (and --fix to repair it)

npm run dev 2>&1 | npx cleaninstall-node doctor --from-error # explain this error npx cleaninstall-node hook install # warn after pull/checkout/rebase npx cleaninstall-node --install # clean + reinstall, safely

Using an AI coding agent? Give it the MCP server so it diagnoses broken installs instead of running rm -rf node_modules package-lock.json:

claude mcp add cleaninstall -- npx -y cleaninstall-node mcp   # tools for the agent

npx cleaninstall-node agent install # guidance + a guard hook

Upgrading from 2.x? Lockfiles are now kept unless you pass --lockfiles, the CLI asks once before deleting (use -y in scripts), and Node.js 20+ is required. See the changelog.

Features

  • Removes common clutter (node_modules, build output, etc.)
  • Workspace Aware: Automatically detects workspaces defined in package.json or pnpm-workspace.yaml.
  • Glob Pattern Support: Use glob patterns (e.g., *.log, dist-*) in configuration for flexible matching.
  • Dry Run Mode: See what would be deleted without actually removing anything.
  • `doctor`: Diagnoses *why* an install is broken (stale lockfile, wrong Node, native ABI mismatch, mixed package managers) and applies the smallest fix.
  • `doctor --from-error`: Paste or pipe an error; get what it means for *this* project and the fix.
  • Agent setup: agent install adds guidance to AGENTS.md / CLAUDE.md and a Claude Code hook that blocks rm -rf node_modules and lockfile deletion.
  • MCP server for AI agents: Claude Code, Cursor, VS Code and others can diagnose and fix installs through structured tools.
  • Git hook: Warns (or reinstalls) right after a pull, branch switch or rebase changes your dependencies.
  • Safe by default: Shows what will be removed and asks once before deleting (skip with -y). Lockfiles are kept unless you pass --lockfiles.
  • Interactive Mode: Confirm each deletion individually.
  • Auto-Install: Runs npm, yarn, pnpm or bun install after cleanup, detected from the packageManager field or your lockfile.
  • Configurable via CLI, package.json, or .cleaninstallnoderc.

Why CleanInstall Node?

Compared to manual deletion or other tools:

  • vs `rm -rf node_modules && npm install`: Workspace-aware, handles monorepos automatically, safer with dry-run mode
  • vs `npx rimraf`: Built-in monorepo support, auto-reinstall, interactive mode, glob patterns
  • vs manual deletion: Cross-platform, configurable, preview before deletion, handles multiple workspaces

Quick Start

# Clean and reinstall dependencies in one command

npx cleaninstall-node --install

Full reset, including lockfiles (resolves fresh dependency versions!)

npx cleaninstall-node --lockfiles --install

Non-interactive (CI / scripts): skip the confirmation prompt

npx cleaninstall-node -y

Preview what would be deleted (dry run)

npx cleaninstall-node --dry-run

Interactive mode - confirm each deletion

npx cleaninstall-node -i

doctor: find out *why* before you delete

Most "nuke node_modules" moments have a specific cause. doctor finds it and applies the smallest fix that works:

npx cleaninstall-node doctor          # diagnose

npx cleaninstall-node doctor --fix # apply the smallest fix npx cleaninstall-node doctor --json # machine-readable, exit code 1 on errors

🩺 cleaninstall-node doctor — ~/code/app (npm)

✖ node_modules is out of sync with package-lock.json (1 difference) ms: installed 2.1.3, lockfile 2.1.2 Usually happens after git pull / switching branches without reinstalling. ✖ 1 native module was built for a different Node version better-sqlite3: built for ABI 115, this Node needs 127 ✔ Node v22.11.0 matches .nvmrc (22)

2 errors, 0 warnings.

Smallest fix (run with --fix to apply): → npm install → npm rebuild better-sqlite3

CheckDetectsFix
Node versionRunning Node vs .nvmrc, .node-version, .tool-versions, volta.node, engines.nodeManual (nvm use). Blocks --fix so nothing is rebuilt for the wrong Node
Lockfile syncnode_modules doesn't match the lockfile, e.g. after a git pull (npm, pnpm, yarn v1)install
Direct dependenciesA dependency is missing or installed outside its package.json range (all package managers, workspaces included)install
Native modulesA .node addon was built for another Node ABI, or for another OS/CPU (Docker volume, Rosetta)rebuild
Installernode_modules was written by a different package manager than the project usesremove node_modules + install
LockfilesMore than one package manager's lockfile, a mismatch with packageManager, no lockfile at allManual
pnpm buildspnpm 10 skipped a package's build scripts (ignoredBuilds)Manual (pnpm approve-builds)
yarn systemyarn v1 installed under a different Node ABI or platforminstall

Native addons are loaded in a separate short-lived process, so a crashing addon can't take doctor down. Skip that check with --no-native.

Paste the error: --from-error

Start from the error you actually got. doctor --from-error explains what it means for this project and folds it into the fix plan:

npm run dev 2>&1 | npx cleaninstall-node doctor --from-error     # pipe it in

npx cleaninstall-node doctor --from-error "Cannot find module 'axios'" npx cleaninstall-node doctor --from-error --fix # and fix it

🩺 cleaninstall-node doctor --from-error — ~/code/app (npm)

What the error means ✖ axios is in package.json but not installed axios (^1.7.0) is declared, but node_modules doesn't have it: the install is missing or out of date.

In this project ✖ 2 dependencies are not installed ← likely related ✔ 1 other check passed

Smallest fix (run with --fix to apply): → npm install

The same error can need different fixes. Cannot find module 'x' gets a different answer when x is declared but not installed (install it), only present through another package (add it to package.json), installed at the wrong version, a relative import (a code problem, so no reinstall), or a Node built-in. Recognised errors:

ErrorExampleWhat it suggests
Native module, wrong NodeNODE_MODULE_VERSION 115 … requires 127Rebuild that one package
Native module, wrong OS/CPUinvalid ELF headerRebuild that package, and stop sharing node_modules with Docker
Platform binary missingrollup, esbuild, sharp, swc …-linux-x64Clean reinstall
Module not foundNode CJS/ESM, Vite, webpack, Next.js, TS2307Depends on the project (see above)
Command not foundsh: vite: not found, 'tsc' is not recognizedInstall, npx, or which package to add
ESM-only packageERR_REQUIRE_ESMNewer Node, import(), or pin the old major
Subpath not exportedERR_PACKAGE_PATH_NOT_EXPORTEDCheck the installed major
Lockfile out of syncnpm ci, ERR_PNPM_OUTDATED_LOCKFILE, yarn --frozen-lockfileInstall locally and commit the lockfile
Peer conflictERESOLVEAlign versions (--legacy-peer-deps only as a last resort)
Wrong Node for a dependencyEBADENGINE, yarn/pnpm engine errorsSwitch Node (blocks --fix)
Wrong package managerCorepack mismatch, npm on workspace:Use the declared package manager
Broken installENOTEMPTY, interrupted installsClean reinstall
OtherEINTEGRITY, EACCES, disk full vs. file-watcher ENOSPC, gyp ERR!Specific steps

With --json, the report includes error.matches for agents and scripts. An error it doesn't recognise still gets the normal doctor checks.

Use it from AI agents (MCP)

When an install breaks, AI coding agents tend to run rm -rf node_modules package-lock.json && npm install. That throws away the lockfile, quietly upgrades dependencies, and often doesn't fix the real cause. cleaninstall-node mcp is a Model Context Protocol server that gives the agent the diagnosis and the smallest fix instead.

It's listed on the official MCP Registry as io.github.ahusan/cleaninstall-node and on Glama.

ToolWhat it doesChanges files
explain_errorExplains an error message for this project (everything --from-error knows) and returns a fix planNo
diagnoseFull doctor health check and fix planNo
apply_fixRuns the plan: targeted rebuild, install, or (rarely) a clean reinstall. Never touches lockfilesYes
plan_cleanLists what a cleanup would delete, with sizesNo
cleanDeletes exactly what plan_clean listed; can reinstallYes

Built-in safety:

  • Plans must be shown first. apply_fix and clean only run with the plan_id from a preceding read-only call. If the project changed in between, they refuse and the agent has to re-plan, so it can't delete or install something nobody was shown.
  • Hard limits. The tools refuse to run on /, your home folder, or a folder without a package.json. Lockfiles are only removed when asked, and fixes are blocked while you're on the wrong Node version.
  • Guidance for the agent. The server's instructions tell it to call explain_error before deleting node_modules.
  • No extra install weight. The server adds no runtime dependencies.
Setup

Claude Code (add --scope project to share it with your team via .mcp.json):

claude mcp add cleaninstall -- npx -y cleaninstall-node mcp

Cursor (.cursor/mcp.json), Windsurf, Claude Desktop (claude_desktop_config.json) and other clients using the mcpServers format:

{

"mcpServers": { "cleaninstall": { "command": "npx", "args": ["-y", "cleaninstall-node", "mcp"] } } }

VS Code (.vscode/mcp.json):

{

"servers": { "cleaninstall": { "type": "stdio", "command": "npx", "args": ["-y", "cleaninstall-node", "mcp"] } } }

Tools default to the folder the client starts the server in, which is normally your project. Every tool also takes a dir argument, and mcp --dir changes the default; use one of these with clients that don't start in a project, such as Claude Desktop. On Windows, if a client can't find npx, use `"command": "cmd", "args": ["/c", "npx", "-

Only the beginning is shown; read the rest in the repo