Skip to content
MCP server

cleaninstall-node

Diagnoses broken Node.js installs and applies the smallest fix, with an MCP server for AI

Runs locally

cleaninstall-node is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, macOS, Linux
Runs
Locally
Version
3.4.1
Listing updated

Similar MCP servers

Install

You install MCP servers on a computer. Send yourself the link.

Add with the CLI

Run in a terminal

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

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

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

Claude Code setup guide

Add to claude_desktop_config.json

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

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

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

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.json

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

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add cleaninstall-node -- npx -y cleaninstall-node

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.cleaninstall-node]
command = "npx"
args = ["-y", "cleaninstall-node"]

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "cleaninstall-node": {
      "command": "npx",
      "args": [
        "-y",
        "cleaninstall-node"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

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

    Or run: gemini mcp add -s user cleaninstall-node npx -- -y cleaninstall-node

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

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

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

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

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

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

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

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

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

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

    Junie

    Add to ~/.junie/mcp/mcp.json

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

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

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

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

About cleaninstall-node

Deleting node_modules and the lockfile is the usual response to a broken install, but most breakages have one specific cause. This CLI inspects the Node version, lockfile sync, dependency ranges, native addons and package manager, then proposes the least disruptive repair. Paste or pipe an error message and it explains what that error means for the project in question.

A git hook flags dependency changes right after a pull, branch switch or rebase, and stays silent when node_modules already matches. Cleanup is workspace-aware for monorepos, shows sizes before anything is removed, and keeps lockfiles unless told otherwise. It supports npm, pnpm, yarn, bun and Deno.

It is aimed at Node developers who work in monorepos or on shared branches, and at teams that use AI coding agents which would otherwise wipe dependencies by reflex. The MCP server exposes read-only diagnosis tools and gated fix tools that require a shown plan first.

Tools this server provides (5)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 1 of 5 tools reads data; 4 names don't say.

From the server's own tool labels and tool names; not verified by us.

explain_errorName suggests: reads
Explains an error message for the project and returns a fix plan.
diagnose
Runs the full doctor health check and returns a fix plan.
apply_fix
Runs the plan: targeted rebuild, install, or clean reinstall. Does not touch lockfiles.
plan_clean
Lists what a cleanup would delete, with sizes.
clean
Deletes what plan_clean listed; can reinstall.

What it does

Targeted install diagnosis
Checks Node version, lockfile sync, dependency ranges, native modules and installer, and suggests the smallest fix.
Error explanation
Pipe a failing command's output in and get what the error means for the current project.
Post-pull git hook
Warns or runs an install or rebuild after a checkout, merge or rebase changes dependency files.
Safe workspace cleanup
Finds workspaces, lists items with sizes, asks once, and keeps lockfiles by default.
MCP server for agents
Read-only diagnosis tools and fix tools that require a previously shown plan ID.
Agent guard hook
Blocks Claude Code Bash commands that delete node_modules or lockfiles.

Good for

  • Recover a project after git pull leaves node_modules out of sync with the lockfile
  • Rebuild a single native module after switching Node versions or sharing node_modules with Docker
  • Give an AI coding agent a safe way to fix install errors without deleting the lockfile
  • Run a CI-friendly install health check that exits with code 1 on errors
  • Clean build output and caches across a pnpm or npm monorepo before a fresh install

Pricing

Open source

Free and MIT-licensed; installed from npm.

Prices change. Check cleaninstall-node.ahusan.dev before you buy.

cleaninstall-node FAQ

Does cleaninstall-node delete my lockfile?

No. Lockfiles are kept by default and are only removed when you pass --lockfiles or set removeLockfiles in config.

Which package managers are supported?

The content lists npm, pnpm, yarn, bun and Deno, with the package manager detected from the packageManager field or the lockfile.

What Node version is required?

Node.js 20 or newer.

How do I connect cleaninstall-node to an AI agent?

Add it as an MCP server with npx -y cleaninstall-node mcp, using the setup commands for Claude Code, Cursor, VS Code or Claude Desktop.

Is cleaninstall-node free?

Yes. cleaninstall-node is open source, so you can use and self-host it for free.

How do I add cleaninstall-node to Claude Code?

Run this command in your terminal: claude mcp add cleaninstall-node -- npx -y cleaninstall-node

What are the best alternatives to cleaninstall-node?

The closest alternatives to cleaninstall-node are MCP Dependency Doctor, e18e, KarmaDue, npm why (who installs this package) and Freshdeps MCP.

Where this comes from

  • Description: written from the project's README, the project's website and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers