Secure Your MCP Servers With OAuth, JWT, SPIFFE and More
summary
A tiny echo MCP server built with fast‑mcp Python library runs over HTTP on port 8000 then gets a 401 when protected; adding OAuth via Keycloak OAuth / JWT yields an access token with issuer, audience and expiry and the MCP Inspector completes the auth flow so the server works without code changes. An MCP gateway enforcing auth and role‑based routing fronts multiple backends (echo vs time), accepts JWTs or SPIFFE identities, and successfully secures and multiplexes traffic.
AI-written summary · about
chapters (8)
- 0:00Introduction and welcome
- 1:05Authentication and authorization for MCP servers
- 4:58Live demo of a simple MCP server
- 8:12Adding OAuth to the MCP server
- 13:36Introducing MCP gateway for governance
- 17:26Using JWT tokens with MCP gateway
- 22:09Securing MCP servers in Kubernetes
- 24:19Key takeaways and closing
