A deep-dive companion to Part 4: your first MCP server. Part of Claude Code, Beyond the Prompt.
Part 4 shipped a deliberately minimal MCP database tool — enough to give Claude safe, read-only hands on a database without turning the post into a security treatise. Then the comments did something better than any post could: readers took that sample apart and found every seam where "minimal and safe enough to learn on" isn't "safe enough for production."
This is the collected result. It's more advanced than Part 4 on purpose. If you haven't built your first MCP server yet, start there. If you have one and you're about to point it at a database that matters, this is the hardening pass.
One principle runs through all of it.
A boundary is only real if something structural enforces it






