Module 3 · Running servers in production · Lesson 7
Securing MCP servers
Defend an MCP server as a target (inputs, authorization, tokens, handles, local exposure) and as a channel that carries untrusted text into a model, then measure the defences on your own server with harmless canaries.
By the end of this lesson you can
- Separate attacks on a server (the server as a target) from attacks that travel through it (the server as a channel), and name a control for each
- Explain token passthrough and the confused deputy problem for proxy servers, and why a server accepts only tokens issued for it
- Explain how indirect prompt injection, tool poisoning and rug pulls reach a model, and why tool annotations can't stop them
- Build server-side controls that hold whatever the model decides, and say which defences are only probabilistic
- Red-team your own server with harmless canaries and report compliance and unwanted writes with honest uncertainty
