Back to feed
Dev.to
Dev.to
7/8/2026
The original title is: "My MCP token-cost auditor caught a live npx/PyPI namesquat"

The original title is: "My MCP token-cost auditor caught a live npx/PyPI namesquat"

Original: My MCP token-cost auditor caught a live npx/PyPI namesquat

Short summary

While building mcp-tollbooth, a CLI that audits MCP server token costs, the author discovered that the package name 'mcp-server-fetch' exists on both PyPI (official) and npm (a security research canary), meaning a config using npx instead of uvx silently runs an entirely different, unaudited package. The author fixed their tool to split registry lookups so trust and cost data never cross-pollinate between npm and PyPI. Anyone with hand-edited or copy-pasted MCP configs should verify that every npx-invoked entry is actually meant to be npx.

  • mcp-tollbooth CLI audits MCP server token costs across Claude Desktop, Claude Code, Cursor, and VS Code
  • Same package name 'mcp-server-fetch' on npm vs PyPI resolves to completely different code — a supply chain namesquat risk
  • Tool updated to separate npm and PyPI lookup tables so trust data never cross-pollinates between registries

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more