Plugin cache installation skips dotfiles (.mcp.json, .npmrc, etc.)
Description
When Claude Code copies a plugin's files into its cache directory (~/.claude/plugins/cache/), it skips all dotfiles and dotdirectories (files and directories whose names begin with .). This means plugin-critical files like .mcp.json, .npmrc, .env, and .gitignore are silently omitted from the cached copy.
This is a significant problem because .mcp.json is the standard MCP server configuration file — without it, a plugin's MCP servers are never discovered or started.
Reproduction steps
- Create or install a plugin from a Git repository that includes dotfiles (e.g.
.mcp.json,.npmrc) committed to the repo (not gitignored). - Start a Claude Code session so the plugin is cached.
- Inspect the cache directory at
~/.claude/plugins/cache/<plugin-name>/. - Observe that all dotfiles from the source repo are missing from the cached copy.
Expected behaviour
All committed files from the plugin repository — including dotfiles — should be copied into the cache directory. Dotfiles are a normal and expected part of a project's file tree, and many serve critical configuration roles (.mcp.json for MCP server discovery, .npmrc for registry configuration, .env.example for environment templates, etc.).
Actual behaviour
Dotfiles are silently skipped. The plugin appears to install successfully, but any functionality that depends on dotfiles (e.g. MCP server configuration via .mcp.json) is broken.
Workaround
Manually copy the missing dotfiles from the plugin source into the cache directory after installation:
cp /path/to/plugin-source/.mcp.json ~/.claude/plugins/cache/<plugin-name>/
cp /path/to/plugin-source/.npmrc ~/.claude/plugins/cache/<plugin-name>/
This must be repeated each time the cache is rebuilt.
Environment
- Claude Code: latest (as of 2026-04-02)
- Platform: Linux (Ubuntu 24)
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗