MCP Resources and Prompts, Not Just Tools
Tools are only one of three things an MCP server can offer. Here are the other two, and the one default that stopped a file leak.
Video #29 ยท AI agents and MCP
Steps in the video
Files
- attack.py (23 lines)
- client.py (26 lines)
- docs/returns.txt (2 lines)
- docs/warranty.txt (2 lines)
- server.py (36 lines)
- staff_pay.txt (1 lines)
- unsafe_server.py (17 lines)
Tested with
Python 3.12.15 | mcp==2.3.0
What this does not show
The shop and every file are made up, including the private one. Tested with the SDK's own client only, one template form and one transport. The path check covers template arguments, not other ways to build a path.
Sources
Learning IT by Example.