// blog
Blog
Field notes on building secure MCP servers — the pitfalls that cost me a day, the guardrails the model can't be trusted to enforce itself, and the attack surface underneath it all. Written from shipping them for clients, not reading about them.
- Your MCP Server "Won't Connect"? Stop Printing to Stdout. In a stdio MCP server, stdout belongs to JSON-RPC. One stray log line and the client drowns you in unrecognized_keys errors.
- The Model Can't Police Itself: Put MCP Guardrails in the Server Prompt-level rules are decoration. The allowlist, the argument checks, the output scan — they have to live in code the model can't talk its way past.