Designing Safe Database Access for AI Agents using MCP

How an eight-hour coding challenge became an architecture exercise.