[BUG] Title: CLAUDE.md project rules overridden by MCP server instructions — runaway token consumption
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The Figma MCP server's built-in instructions (generate_figma_design capture workflow) override explicit project-level CLAUDE.md guardrails. Despite CLAUDE.md containing clear rules prohibiting:
Injecting external scripts into source files
Using generate_figma_design without explicit request
Introducing unapproved external dependencies
The CLI session followed the Figma MCP's default capture workflow instead — injecting capture.js into index.html, spinning up a Python server, and consuming ~99% of daily token quota in a single prompt.
What Should Happen?
Expected behavior: CLAUDE.md project rules take priority over MCP server instructions.
Actual behavior: MCP server instructions took priority, violating every guardrail the user had defined.
Impact: Entire daily quota consumed. No useful work produced. User's source files modified without authorization.
Error Messages/Logs
Steps to Reproduce
Define guardrails in CLAUDE.md that conflict with a Figma MCP default workflow, then trigger a Figma-related task from CLI.
Claude Model
Not sure / Multiple models
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
2.1.63 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
<img width="1475" height="346" alt="Image" src="https://github.com/user-attachments/assets/b894c497-532f-41a0-8ac1-c9b5a5b01b15" />
This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗