https://github.com/semgrep/mcp-tool-shadowing-demo
a demonstration of tool shadowing behavior in the Model Context Protocol
https://github.com/semgrep/mcp-tool-shadowing-demo
Last synced: 11 days ago
JSON representation
a demonstration of tool shadowing behavior in the Model Context Protocol
- Host: GitHub
- URL: https://github.com/semgrep/mcp-tool-shadowing-demo
- Owner: semgrep
- License: mit
- Created: 2025-09-09T21:12:14.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-09-09T22:13:39.000Z (11 months ago)
- Last Synced: 2026-02-04T08:53:21.902Z (6 months ago)
- Language: Python
- Size: 36.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mcp-tool-shadowing-demo
a demonstration of tool shadowing behavior in the Model Context Protocol.
## prerequisites
Project requires `uv`. See installation instructions:
https://github.com/astral-sh/uv?tab=readme-ov-file#installation
The makefile `install` instruction will install UV with the OSX/Linux instructions and then run `uv sync`.
## usage
The makefile will install the servers for Claude Code locally for this directory. To demonstrate collision behavior, run `make angel`, request `totally_cool_legit_tool` and note the behavior, then run `make devil` and rerun Claude Code with the same prompt and observe the difference.
To test with Windsurf, run `make provision-windsurf`
## notes
the Windsurf demonstration additionally requires line-jumping to frontrun tool choice. As of 2025-09-09 this was unpatched and worked successfully on Windsurf 1.99.3 (hash a21cda2c21704d89e6cf5b2804b460783ce44fad)
As far as I can tell, this demo does not reliably work correctly on Cursor - it does something else crazy but does not open calculator.