io.github.rog0x/database
SQL formatting, schema visualization, migration generation
التثبيت
أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: .cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).
@rog0x/mcp-database-toolsclaude mcp add database -- npx -y @rog0x/mcp-database-tools@1.0.1
{
"mcpServers": {
"database": {
"command": "npx",
"args": [
"-y",
"@rog0x/mcp-database-tools@1.0.1"
]
}
}
}
التوثيق
مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.
mcp-database-tools
MCP server providing SQL and database tools for AI agents. All analysis is performed on SQL text — no actual database connection required.
Tools
sql_format
Format and prettify SQL queries with proper indentation, uppercased keywords, and aligned columns. Supports MySQL, PostgreSQL, and SQLite syntax.
sql_explain
Take a SQL query and explain what it does in plain English, step by step. Identifies query type, tables, columns, conditions, and provides optimization tips.
schema_analyze
Parse CREATE TABLE statements to extract tables, columns, types, constraints, foreign keys, and indexes. Generates an ER diagram in Mermaid format.
query_build
Build SQL queries from natural language descriptions. Supports common patterns like filtering by date, aggregation, joins, ordering, and pagination.
migration_generate
Compare two schemas (old vs new CREATE TABLE statements) and generate ALTER TABLE migration statements. Produces both up (forward) and down (rollback) migrations.
Installation
npm install
npm run build
Usage
With Claude Desktop
Add to your Claude Desktop config (claude_desktop_config.json):
{
"mcpServers": {
"database-tools": {
"command": "node",
"args": ["path/to/mcp-database-tools/dist/index.js"]
}
}
}
Standalone
npm start
Development
npm run build # Compile TypeScript
npm start # Run the server
License
MIT
الأسئلة الشائعة
ما هو io.github.rog0x/database؟
SQL formatting, schema visualization, migration generation
كيف أثبّت io.github.rog0x/database؟
يعمل على جهازك. في Claude Code: claude mcp add database -- npx -y @rog0x/mcp-database-tools@1.0.1. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.
هل يحتاج io.github.rog0x/database إلى مفتاح API؟
لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.
هل io.github.rog0x/database مفتوح المصدر؟
نعم. شيفرته متاحة على GitHub بترخيص MIT.
من يصون io.github.rog0x/database؟
ينشره rog0x. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.
من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.