Folder

Is ~/Library/Caches/claude-cli-nodejs safe to delete?

Yes: ~/Library/Caches/claude-cli-nodejs holds Claude Code's MCP server logs, so old logs are safe to delete and new sessions write new ones.

2 safe1 never

updated read 3 minfor Claude Code on macOS

The short answer

  1. 01

    Safe. It holds logs per project and per MCP server, nothing you configured.

  2. 02

    Claude Code writes it into mcp-logs folders named after each server.

  3. 03

    It can grow large. One public report put it and ~/.claude/debug together at 472 GB over 4 to 5 months.

  4. 04

    You lose only old log history that helps when debugging an MCP server.

  5. 05

    Check first: du -sh on the mcp-logs folders shows which project and server write the most.

See its real size on your Mac. Hoardless measures this folder and previews the delete.Download free trial

What is ~/Library/Caches/claude-cli-nodejs?

It is where Claude Code keeps logs of the MCP servers it starts. The public report anthropics/claude-code#18869 gives the layout as ~/Library/Caches/claude-cli-nodejs/<project>/--mcp-logs-<server>. On Claude Code 2.1.317, Hoardless saw mcp-logs-<server> without the leading dashes, with timestamped .jsonl files inside.

It is separate from the ~/.claude folder, which holds your settings and transcripts. This one holds logs only.

What writes it and why does it grow?

Claude Code writes log files for the MCP servers it connects to, grouped by the project folder it was started in. Nothing in the report names a cleanup. The reporter, on Claude Code 2.1.12, said they did not use --debug or --mcp-debug, had six MCP servers configured and two failed to connect. Together with ~/.claude/debug the folders took 472 GB after about 4 to 5 months of daily use. The report gives only that combined number, and it was closed as not planned.

How big does it get?

For most people it is small. Check yours:

du -sh ~/Library/Caches/claude-cli-nodejs

Prints the total. Removes nothing.

du -sh ~/Library/Caches/claude-cli-nodejs/*/*mcp-logs-* | sort -h | tail -10

Shows the ten project and server log folders with the most data. Removes nothing.

Is it safe to delete?

WhatVerdictWhat you lose
Log files older than a week in the mcp-logs foldersSafeOld log history. Claude Code writes new logs.
The claude-cli-nodejs folder as a wholeSafeAll MCP log history, including logs of a session still running. Quit Claude Code first.
~/.claude/settings.json and your MCP server configurationNeverThese are not in this folder, and deleting them removes your setup.

How do I clean up claude-cli-nodejs?

Quit Claude Code, then delete log files not written in the last 7 days:

find ~/Library/Caches/claude-cli-nodejs -path '*mcp-logs-*' -type f -mtime +6 -delete

Deletes old MCP log files permanently, without the Trash. Drop -delete to list them first. It matches both the mcp-logs- and --mcp-logs- folder names.

What Hoardless does: its Claude Code detector lists MCP logs as one Auto row: files older than 7 days in every mcp-logs-* folder, whether the folder name starts with dashes or not. A folder whose files are all old is listed as one item. Symlinks are skipped. It never touches settings, CLAUDE.md, memory, skills, plugins, hooks, ~/.claude.json or MCP server configuration. Everything goes to the Trash with an undo log.

What comes back and when?

New sessions write new MCP logs as soon as Claude Code connects to a server, so the folder grows again with use. Only log history is gone.

Old MCP logs, never your MCP setup

Hoardless lists Claude Code MCP logs older than 7 days as one Auto row, never settings or server configuration, and moves them to the Trash with an undo log.

14-day full trial. macOS 14 or later.

Questions

Does deleting claude-cli-nodejs remove my MCP servers?

No. MCP server settings live in your Claude Code configuration, not in this cache folder. This folder only holds logs.

Is it the same as ~/.claude/debug?

No. They are two folders. The public report that cites 472 GB lists both, and gives only the combined figure.

Can I stop Claude Code writing these logs?

The report's author set cleanupPeriodDays to 4 in ~/.claude/settings.json as a workaround. Check that your version applies that setting to this folder before relying on it.

Why are some folders named --mcp-logs and others mcp-logs?

The bug report writes the folder as --mcp-logs-NAME. Claude Code 2.1.317 names it mcp-logs-NAME, as Hoardless saw on a real Mac. Both hold the same kind of log.