Back to feed
Dev.to
Dev.to
7/31/2026
Letting an agent write to my production CMS

Letting an agent write to my production CMS

Short summary

A detailed account of building an MCP server to let an AI agent write to a production CMS, focusing on authentication, audit logging, and safety boundaries. The author consolidated 18 audit-emitting modules into a single write-verb runner enforced by a CI grep check before adding the agent. Key lessons: authenticate the agent independently, consolidate write paths first, and make invariants tests rather than docstrings.

  • Built an MCP server with independent auth (no borrowed human tokens) for agent-to-CMS writes
  • Consolidated 18 audit-emitting modules into one write-verb runner, enforced by CI grep check
  • Field allowlists with Zod descriptions serve as prompt fragments — semantics of absence matter

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more