Lion Cipher Lab

Defend an MCP client against tool poisoning and rug pulls: detect malicious tool descriptions and definition drift before the agent trusts them (offline, no API key)

Why it matters

The moment an agent can discover and call tools at runtime, the tool's DESCRIPTION becomes part of the model's prompt -- and a description you did not write is an untrusted input aimed straight at the model. A malicious MCP server can hide directives there (tool poisoning) or get a benign tool approved and mutate it later (a rug pull). The human who clicked approve never reads the description; the model reads it every time. Defenders who only check tool names miss both attacks. Learning to pin whole definitions, scan descriptions, and scope which servers may combine tools is what stands…

What you'll learn

Steps in this lab

  1. What MCP is, and the two attacks you will defend against
  2. Why the MODEL, not the user, is the victim
  3. Set up a folder (no API key, standard library only)
  4. Build the vulnerable tool surface
  5. Reproduce the failure: watch the poison reach the model
  6. Layer 1 -- pin the WHOLE definition and catch the rug pull
  7. Layer 2 -- scan descriptions for hidden instructions
  8. Layer 3 -- human approval (trust-on-first-use) and what it does NOT cover
  9. Layer 4 -- scope tool names so one server cannot shadow another
  10. Read the before/after table -- and what actually carries the load

Open the full interactive lab →