{"slug": "how-to-let-ai-agents-manage-your-database-schema-with-mcp", "title": "How to let AI agents manage your database schema (with MCP)", "summary": "A developer has built ERD Online, an open-source database design tool that integrates MCP to let AI agents read and suggest changes to database schemas. The tool combines Git-like versioning with collaboration features, allowing agents to create versions that humans review and approve. The developer demonstrates how to configure Cursor, Claude, or Cline to interact with schemas via MCP, emphasizing control and versioning.", "body_md": "AI agents are becoming first-class citizens in developer workflows. They can read code, run tests, and deploy apps. But one thing they struggle with is understanding database schemas.\n\nDatabase design tools haven't changed in 20 years. You either use a heavyweight desktop app (Navicat, PDManer) or a pretty but closed web app (dbdiagram). Neither supports versioning, real-time collaboration, or AI agent integration.\n\nI built ERD Online to solve this. It's an open-source database design tool that combines Git-like versioning with Figma-like collaboration, plus MCP integration for AI agents.\n\nIn this article, I'll show you how to let Cursor, Claude, or Cline read and write your database schema through MCP, while you keep full control.\n\nDatabase schema changes are hard to track:\n\nAnd now with AI agents, there's a new problem: how do you let an AI agent suggest schema changes without giving it a black box that generates random ER diagrams?\n\nThe wrong approach: ask AI to \"generate an ER diagram for an e-commerce app.\" You get a diagram, but it has no connection to your actual project, no versioning, and no approval flow.\n\nThe right approach: let the AI agent read your existing schema, suggest changes, and submit them as a version that you review and approve.\n\nThat's what ERD Online + MCP does.\n\nMCP (Model Context Protocol) is a protocol for AI agents to interact with external tools. Think of it as a USB-C port for AI applications. It standardizes how agents discover and call tools.\n\nMCP has three main primitives:\n\n`list_projects`\n\nor `create_version`\n\n)`project.json`\n\n)ERD Online exposes MCP tools that let AI agents:\n\n`list_projects`\n\n: List all your ERD projects`get_project`\n\n: Get a project's projectJSON`create_version`\n\n: Suggest a new version of your schemaThe key boundary: AI agents read/write the same projectJSON the human designer uses. They don't generate ER diagrams from a sentence. You stay in control.\n\n**Step 1: Mint a PAT in ERD Online**\n\nSign in to ERD Online and go to Account Settings → Personal Access Tokens. Create a new token (read-only is enough to start).\n\n**Step 2: Add MCP config to Cursor**\n\nOpen `~/.cursor/mcp.json`\n\nand add:\n\n**1. AI agents become useful, not dangerous**\n\nBy giving AI agents structured access to your schema, they can make useful suggestions. But because they go through `create_version`\n\nand you review the diff, they can't silently break your database.\n\n**2. Versioning becomes the source of truth**\n\nEvery AI-suggested change creates a version. You can see exactly what changed, when, and why. This is essential for database schema management.\n\n**3. Collaboration improves**\n\nMultiple people (and agents) can work on the same schema. Changes are merged, versioned, and reviewed.\n\n**4. No vendor lock-in**\n\nprojectJSON is an open format. You can export your schema, self-host ERD Online, or build your own tools on top of it.\n\n**ERD Online**\n\n**What would you build?**\n\nI'd love to hear what AI + database schema workflows you'd want. Drop a comment or open an issue on GitHub.", "url": "https://wpnews.pro/news/how-to-let-ai-agents-manage-your-database-schema-with-mcp", "canonical_source": "https://dev.to/erdonline/how-to-let-ai-agents-manage-your-database-schema-with-mcp-12k1", "published_at": "2026-08-29 06:07:07+00:00", "updated_at": "2026-08-29 06:48:52.597694+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "ai-tools"], "entities": ["ERD Online", "MCP", "Cursor", "Claude", "Cline"], "alternates": {"html": "https://wpnews.pro/news/how-to-let-ai-agents-manage-your-database-schema-with-mcp", "markdown": "https://wpnews.pro/news/how-to-let-ai-agents-manage-your-database-schema-with-mcp.md", "text": "https://wpnews.pro/news/how-to-let-ai-agents-manage-your-database-schema-with-mcp.txt", "jsonld": "https://wpnews.pro/news/how-to-let-ai-agents-manage-your-database-schema-with-mcp.jsonld"}}