Lion Cipher Lab
Secure the Model Context Protocol (MCP): connecting AI to tools safely
- AI Security
- Beginner
- ~35 min
- Free · no account required
Why it matters
The Model Context Protocol is fast becoming the standard way AI assistants reach the outside world: instead of every app inventing its own bespoke plugin format, an MCP server advertises a set of tools and resources, and any MCP-speaking client can call them. That is a genuine leap in usefulness — one assistant can suddenly read your files, query a database, open pull requests, or hit an internal API. But every one of those connections is also a new door into systems you care about, opened on the strength of text a model chose to act on. A malicious or sloppily over-privileged server can hand…
What you'll learn
- understanding what MCP is (servers expose tools and resources to an AI client)
- seeing the MCP connection as a trust boundary
- recognising a malicious or over-privileged MCP server
- spotting prompt injection carried in tool results and tool poisoning in tool descriptions
- vetting and pinning trusted MCP servers
- applying least-privilege scopes to MCP tools
- keeping a human in the loop for consequential MCP tools and validating tool outputs
Steps in this lab
- What MCP is, in one breath
- The MCP connection is a trust boundary
- Risk: a malicious or over-privileged server
- Risk: prompt injection through tool results, and tool poisoning
- Defense: connect only MCP servers you trust
- Defense: least-privilege scopes for every tool
- Defense: human-in-the-loop and validated outputs
- If you connect AI to tools with MCP, do this