{"_id":"@arvoretech/db-diagram-mcp","_rev":"4-369dc08583a85cf9d66517cb9852b281","name":"@arvoretech/db-diagram-mcp","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@arvoretech/db-diagram-mcp","version":"1.0.0","keywords":["mcp","database","diagram","erd","mermaid","ddl","ai","arvore"],"author":{"name":"Arvore"},"license":"MIT","_id":"@arvoretech/db-diagram-mcp@1.0.0","maintainers":[{"name":"joao.barros.arvore","email":"joao.barros@arvore.com.br"},{"name":"ricardoraposorfox","email":"ricardorbxx1@gmail.com"},{"name":"vitor.piovezan","email":"vitor.piovezan@arvore.com.br"}],"homepage":"https://github.com/arvoreeducacao/arvore-mcp-servers#readme","bugs":{"url":"https://github.com/arvoreeducacao/arvore-mcp-servers/issues"},"bin":{"db-diagram-mcp":"dist/index.js"},"dist":{"shasum":"9d4d9f8160ef483e3d1197a8aab12ddde8a6be27","tarball":"https://registry.npmjs.org/@arvoretech/db-diagram-mcp/-/db-diagram-mcp-1.0.0.tgz","fileCount":43,"integrity":"sha512-jZTAeoO6M5T7vBeT2fJhjLP5nJVhqVWJ3yWIw4TMyBgb1f9rv+Jk+QAa5aeO0J6oYKH1DhXfoO553FjWrqeriw==","signatures":[{"sig":"MEUCIQDtkPehc0IY1c1vA+lTfzub2Ui/2QHwE9+ktK5dXFIftwIgTUDaJw1/Py0m87ih7Gez2ttSMWRfp+AAcI+49HUOm9k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":102908},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"8492dbef7f5b36387861bff75c4c488cc4f20209","scripts":{"dev":"tsx src/index.ts","lint":"eslint src/**/*.ts","test":"vitest","build":"tsc","start":"node dist/index.js","lint:fix":"eslint src/**/*.ts --fix","test:cov":"vitest --coverage"},"_npmUser":{"name":"ricardoraposorfox","email":"ricardorbxx1@gmail.com"},"repository":{"url":"git+https://github.com/arvoreeducacao/arvore-mcp-servers.git","type":"git","directory":"packages/db-diagram"},"_npmVersion":"11.13.0","description":"MCP Server that generates Mermaid ER diagrams from SQL DDL","directories":{},"_nodeVersion":"26.1.0","dependencies":{"zod":"^3.22.4","@modelcontextprotocol/sdk":"~1.22.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/db-diagram-mcp_1.0.0_1780685877101_0.34052971804273446","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-06-05T18:57:56.965Z","modified":"2026-06-16T21:13:10.718Z","1.0.0":"2026-06-05T18:57:57.284Z"},"bugs":{"url":"https://github.com/arvoreeducacao/arvore-mcp-servers/issues"},"author":{"name":"Arvore"},"license":"MIT","homepage":"https://github.com/arvoreeducacao/arvore-mcp-servers#readme","keywords":["mcp","database","diagram","erd","mermaid","ddl","ai","arvore"],"repository":{"url":"git+https://github.com/arvoreeducacao/arvore-mcp-servers.git","type":"git","directory":"packages/db-diagram"},"description":"MCP Server that generates Mermaid ER diagrams from SQL DDL","maintainers":[{"email":"joao.barros@arvore.com.br","name":"joao.barros.arvore"},{"email":"rafasouza@protonmail.com","name":"rafsouza"},{"email":"pedro.adas@gmail.com","name":"pedro.adas"},{"email":"guilhermebscontact@gmail.com","name":"guilhermebs"},{"email":"ricardorbxx1@gmail.com","name":"ricardoraposorfox"},{"email":"jvgcunha2002@gmail.com","name":"jott4"},{"email":"vitor.piovezan@arvore.com.br","name":"vitor.piovezan"}],"readme":"# @arvoretech/db-diagram-mcp\n\nMCP Server that generates Mermaid ER diagrams from SQL DDL.\n\n## Tools\n\n| Tool | Description |\n|------|-------------|\n| `generate_erd` | Full ER diagram from DDL. Optionally filter to specific tables. |\n| `generate_domain_map` | BFS from an entry table, showing all related tables within N hops. |\n| `explain_table` | Column details, incoming/outgoing FKs, and a mini neighborhood diagram. |\n| `trace_flow` | Find relationship paths between two tables with a connecting diagram. |\n\n## Usage\n\nAll tools accept DDL as input (no database connection required).\n\n```json\n{\n  \"ddl\": \"CREATE TABLE users (...); CREATE TABLE posts (...);\",\n  \"tables\": [\"users\", \"posts\"],\n  \"title\": \"User Domain\"\n}\n```\n\n## Output\n\nAll diagram output is Mermaid syntax, ready to render in GitHub, Notion, or any Mermaid-compatible viewer.\n\n## Running\n\n```bash\n# stdio transport (for MCP clients)\nnpx @arvoretech/db-diagram-mcp\n\n# or via pnpm in this monorepo\npnpm --filter @arvoretech/db-diagram-mcp dev\n```\n\n## Composable Pattern\n\nThis MCP doesn't connect to databases directly. Feed it DDL from your existing database MCPs:\n\n1. Use `mysql-mcp` or `postgresql-mcp` to get schema (`SHOW CREATE TABLE` or `pg_dump --schema-only`)\n2. Pass the DDL output to `generate_erd` or other tools\n3. Get Mermaid diagrams back\n","readmeFilename":"README.md"}