Skip to content

Add --prefer-online to prevent stale MCP server cache#7

Merged
critesjosh merged 2 commits intomainfrom
fix/npx-prefer-online
Mar 4, 2026
Merged

Add --prefer-online to prevent stale MCP server cache#7
critesjosh merged 2 commits intomainfrom
fix/npx-prefer-online

Conversation

@critesjosh
Copy link
Copy Markdown
Owner

Summary

  • Adds --prefer-online flag to npx args in .mcp.json so npx checks the npm registry before falling back to its local cache
  • Without this, users get stuck on old @aztec/mcp-server versions because npx resolves @latest once and caches it indefinitely

Context

After @aztec/mcp-server@1.11.0 was published (with sync metadata from AztecProtocol/mcp-server#8), users with a cached 1.10.0 never see the update unless they manually clear ~/.npm/_npx/.

Test plan

  • Verified npx --prefer-online -y @aztec/mcp-server@latest launches correctly on npm 11.6.2 / Node 24
  • Confirm plugin picks up new MCP server versions without manual cache clearing

Closes #6

🤖 Generated with Claude Code

npx resolves @latest once, caches it, and reuses indefinitely. This
means users can get stuck on an old @aztec/mcp-server version without
knowing. Adding --prefer-online forces npx to check the registry
before falling back to cache.

Closes #6

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@critesjosh critesjosh merged commit 4794f0f into main Mar 4, 2026
@critesjosh critesjosh deleted the fix/npx-prefer-online branch March 4, 2026 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --prefer-online to npx args to prevent stale MCP server cache

1 participant