MCP auth and security
Notebook· 05.05· 120–150 min· Lesson 44 of 129
The notebook opens in your lab, in a new tab. If your server is stopped, it starts first (a few seconds).
By the end you can
- Protect an HTTP MCP server with bearer tokens and scopes, and give each user their own credentials and data.
- Explain OAuth 2.1 for MCP (discovery, PKCE, audience-bound tokens) and why token passthrough is forbidden.
- Detect tool poisoning and "rug pulls" (descriptions that change) with scans and fingerprints.
- Gate side-effecting MCP tools behind human approval, without trusting a third party's annotations.
- Compare Groq remote MCP (the provider calls the server) with client-side MCP.
Before you start
Lessons 05.03–05.04, 04.05 (prompt injection), 04.06 (human-in-the-loop).
Python in this lesson
Python guideNew heresecrets
