TL;DR: Anthropic’s accidental Claude Code source map leak exposed 512,000 lines of TypeScript, revealing permission boundaries, protected file logic, and unreleased autonomous agent modes after 3,800 developers had already downloaded it, according to Obot. The incident shows that MCP governance fails when trusted build defaults, developer distribution, and background agent assumptions outrun visibility and credential control.
Editorial analysis by NHI Mgmt Group, based on content published by Obot: “The Claude Leak Crisis: A Masterclass in MCP Security”.
By the numbers:
- 3,800 developers had already downloaded the leaked package before the source map was removed.
Key questions
Q: What breaks when source maps expose MCP tool logic in production packages?
A: The main failure is that attackers no longer need to guess how the tool enforces permission boundaries.
Q: Why do exposed MCP permissions create a bigger risk than ordinary code leakage?
A: Because MCP permissions define what an agent or tool can do, not just how the software is written.
Q: How should teams govern background agents that keep running after a session ends?
A: They should treat them as persistent non-human identities with lifecycle, scope and revocation requirements, not as temporary developer conveniences.
Practitioner guidance
- Audit published build artefacts for source-map leakage Check npm packages, bundles and release artefacts for readable source maps, embedded paths and other implementation details that expose permission logic or protected files.
- Inventory MCP servers and package sources Create a tracked inventory of which MCP servers, registries and repositories developers are using, then tie each source to an owner and approval state.
- Separate tool approval from developer convenience Require explicit governance for tool exposure, approval conditions and protected actions instead of assuming local developer settings are sufficient.
Bottom line: A source-map leak can turn a routine package into a readable map of MCP permission logic, protected files and approval boundaries.
Explore further
View Full Forum → | NHI Foundation Course → | Our Services → | Read the full analysis →
MCP source exposure is an authorisation problem as much as a code disclosure problem: The security value in the leaked Claude Code source was not only intellectual property. It was the visibility it gave into permission boundaries, protected paths and approval triggers. Once those controls are readable at package level, attackers do not need to guess how the tool behaves. The practitioner lesson is to govern published artefacts as part of the access model, not as an afterthought to release engineering.
A few things that frame the scale:
- Only 44% of developers are reported to follow security best practices for secrets management, exposing a significant developer behaviour gap, according to the State of Secrets in AppSec.
A question worth separating out:
Q: What should security teams do when developer tools spread through trusted registries and forks?
A: They should verify provenance, monitor secondary distribution and reduce reliance on local trust decisions that bypass central oversight. Trusted channels can still deliver dangerous artefacts, so inventory and provenance controls need to extend to package sources, repository forks and copied configuration files.
👉 Read our full editorial: Claude Code source map leak exposes MCP governance blind spots