Loading video player...
MCP servers make it easy to extend agents and chatbots—but the moment you add authentication, things get messy fast. In this walkthrough, we build a minimal MCP server using FastMCP, wire it into Codex, and then add real authentication using WorkOS AuthKit. No abstractions. No hand-waving. Just the actual steps—including the parts that usually break. This isn’t a “perfect demo.” It’s the version after failed attempts, debugging dead ends, and figuring out what actually matters. What you’ll learn: • How to scaffold a FastMCP server from scratch • STDIO vs HTTP MCP servers (and why it matters) • How to connect your MCP server to an agent client (Codex) • Where auth actually breaks in MCP setups • How to implement WorkOS AuthKit with minimal code • How to gate tools behind authentication • Why agent-assisted coding changes the dev workflow If you’re building agent tools, internal extensions, or anything MCP-based—this is the part you don’t want to figure out the hard way. Timestamps: 00:00 MCP vs CLI: what actually changes 00:00 Scaffolding a FastMCP server 00:00 Switching to HTTP + wiring into Codex 00:00 Adding tools + debugging failures 00:00 Adding auth with WorkOS AuthKit