Diogenes Database Intelligence, SQL Engine & Schema Guard MCP
Use this server for focused database and SQL intelligence via 12 read-only MCP tools.
Generate dialect-aware SQL SELECT queries from natural language and schema DDL.
Audit raw SQL for injection, tautologies, stacked statements, and second-order taint risks.
Analyze EXPLAIN plans to find bottlenecks and recommend query rewrites.
Compare schemas to detect breaking migrations and recommend safe rollout order.
Transpile SQL and DDL between PostgreSQL, MySQL, and SQLite.
Recommend B-tree/composite/BRIN/GIN indexes from slow-query workloads.
Validate 3NF/BCNF normalization and flag relational design issues.
Scrub PII, credentials, and literals from SQL telemetry logs.
Generate deterministic relational seed fixtures respecting foreign keys.
Calculate connection pool sizing, idle counts, timeouts, and memory headroom.
Audit transaction workflows for isolation hazards and deadlock risk.
Compile SQL DDL into Prisma, Drizzle, SQLAlchemy, or Zod models.
Accepts account-less micro-payments over the Bitcoin Lightning Network via the L402 protocol (10-15 sats per call) to unlock access to all database intelligence tools.
Target output of the ORM model compiler, which generates Drizzle ORM models from relational database schemas.
Accepts account-less micro-payments in native ETH on Base Ethereum via the MPP protocol to unlock access to all database intelligence tools.
One of the SQL dialects targeted by the polyglot SQL transpiler, allowing SQL statements to be converted to and from MySQL alongside other supported dialects.
One of the SQL dialects targeted by the polyglot SQL transpiler, and supported by the schema migration differ, query plan optimizer, index advisor, and other SQL tools.
Target output of the ORM model compiler, which generates Prisma schema models from relational database schemas.
Accepts account-less micro-payments in native SOL over the Solana blockchain via the x402 protocol to unlock access to all database intelligence tools.
One of the SQL dialects targeted by the polyglot SQL transpiler, allowing SQL statements to be converted to and from SQLite alongside other supported dialects.
Target output of the ORM model compiler, which generates Zod validation schemas from relational database schemas.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Diogenes Database Intelligence, SQL Engine & Schema Guard MCP Convert this to SQL: active users who signed up last month"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Diogenes Database Intelligence, SQL Engine & Schema Guard MCP (diogenes-database-intelligence-mcp)
Diogenes Database Intelligence, SQL Engine & Schema Guard MCP is a focused, zero-bloat Model Context Protocol (streamable-http) package powered by the Diogenes Microservice Gateway.
Instead of loading all 121 gateway endpoints into your LLM's context window, installing this package exposes only the 12 specialized database-intelligence tools needed for Database & SQL Intelligence:
12 deterministic database intelligence, AST SQL & schema reliability tools: natural language to SQL synthesizer, AST SQL injection & tautology auditor, query plan EXPLAIN optimizer, breaking schema migration differ, polyglot SQL transpiler (PostgreSQL/MySQL/SQLite), composite B-tree index advisor, relational 3NF/BCNF normalization validator, SQL telemetry PII scrubber, relational mock seed fixture generator, connection pool headroom calculator, transaction isolation hazard auditor, and ORM model compiler (Prisma/Drizzle/Zod).
⚡ 1-Click Install for Cursor & Claude Desktop
No API keys, user accounts, or local dependencies required. Zero setup — paste directly into your client config:
🖱️ Cursor IDE (.cursor/mcp.json)
Add to .cursor/mcp.json in your project root or global Cursor settings:
{
"mcpServers": {
"diogenes-database-intelligence": {
"transport": "streamable-http",
"url": "https://diogenesgateway.com/mcp/database-intelligence"
}
}
}🧠 Claude Desktop (claude_desktop_config.json)
Add to claude_desktop_config.json (Mac: ~/Library/Application Support/Claude/claude_desktop_config.json | Windows: %APPDATA%\Claude\claude_desktop_config.json):
{
"mcpServers": {
"diogenes-database-intelligence": {
"transport": "streamable-http",
"url": "https://diogenesgateway.com/mcp/database-intelligence"
}
}
}Prefer local stdio? Run via npx:
npx -y @stand-out-of-my-sun/diogenes-database-intelligence-mcp
Related MCP server: mcp-database-tools
Included Tools in database-intelligence (12 Tools)
MCP Tool Name | Underlying REST Route | Settlement | Capability |
|
| 15 sats (L402) | Translates natural language questions into dialect-accurate, optimized SQL SELECT queries with schema awareness and safety checks. Use when generating reporting queries or automated data analytics pipelines; for analyzing SQL execution performance and EXPLAIN plans, use analyze_query_plan instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'natural_language_request' and 'schema_ddl' ('sql_dialect' defaults to 'postgresql_dialect'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid. |
|
| Free Developer Tier (0 sats) | Statically parses SQL queries via AST lexical analysis to detect second-order injection, tautology conditions, and stacked queries. Use when auditing dynamic query parameters or untrusted user input before database execution; for sanitizing query strings for telemetry logging, use sanitize_sql_telemetry instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'raw_sql' ('audit_sensitivity' defaults to 'strict_zero_dynamic_taint'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid. |
|
| 15 sats (L402) | Analyzes SQL EXPLAIN execution plans to detect sequential table scans, high-cost cartesian joins, and buffer memory bottlenecks. Use when diagnosing slow queries, optimizing database performance, or evaluating query cost; for getting index recommendations, use recommend_database_indexes instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'explain_plan_or_query' ('optimization_target' defaults to 'eliminate_seq_scans'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid. |
|
| 15 sats (L402) | Compares source and target DDL schemas to identify breaking changes, destructive column drops, and lock-inducing mutations. Use when verifying CI/CD migration scripts before production deployment to prevent downtime; for verifying relational normal form, use validate_schema_normalization instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'current_schema' and 'target_schema' ('risk_tolerance' defaults to 'zero_downtime_strict'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid. |
|
| Free Developer Tier (0 sats) | Transpiles SQL queries and DDL schemas across PostgreSQL, MySQL, and SQLite dialects, rewriting functions and syntax quirks. Use when migrating application queries across database backends or testing against in-memory SQLite; for generating new queries from natural language, use synthesize_sql_query instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'sql_code' and 'source_dialect' ('target_dialect' defaults to 'sqlite'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid. |
|
| 15 sats (L402) | Recommends optimal single-column and composite B-Tree/BRIN indexes based on slow query WHERE, JOIN, and ORDER BY clauses. Use when optimizing database response times and eliminating full-table scans; for inspecting full execution plans, use analyze_query_plan instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'slow_queries_or_workload' ('index_type_preference' defaults to 'btree_and_composite'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid. |
|
| 10 sats (L402) | Audits database schemas for third normal form (3NF) compliance, transitive dependencies, and missing foreign key constraints. Use when reviewing database architectures, preventing update anomalies, or validating relational integrity; for detecting breaking schema migrations, use detect_breaking_migrations instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'schema_ddl' ('target_normal_form' defaults to 'third_normal_form_3nf'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid. |
|
| 15 sats (L402) | Masks PII, financial values, and credential literals from raw SQL query logs and slow-query dumps before telemetry storage. Use when scrubbing production database query logs before shipping to APM tools, Datadog, or external log collectors; for auditing SQL injection vulnerabilities, use audit_sql_injection_ast instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'query_logs' ('masking_policy' defaults to 'mask_pii_and_literals'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid. |
|
| 15 sats (L402) | Generates deterministic relational test seed fixtures respecting foreign key constraints, unique indexes, and data bounds. Use when provisioning mock database datasets for automated testing, staging environments, or sandbox demos; for compiling ORM models from schemas, use generate_orm_models instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'schema_ddl' ('fixture_volume' defaults to 'minimal_smoke_test_5'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid. |
|
| 10 sats (L402) | Calculates optimal connection pool sizing, idle timeouts, and client headroom based on server RAM and concurrency profile. Use when sizing PgBouncer, HikariCP, or Prisma connection pools to avoid server out-of-memory crashes; for checking transaction isolation hazards, use audit_transaction_isolation instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'server_ram_mb' and 'max_concurrent_clients' ('workload_profile' defaults to 'high_concurrency_oltp'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid. |
|
| 15 sats (L402) | Audits database transaction workflows for concurrency anomalies, dirty reads, non-repeatable reads, and deadlock risks. Use when reviewing financial transfer procedures, inventory decrement operations, or multi-step checkout workflows; for calculating connection pool headroom, use calculate_pool_headroom instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'transaction_steps' ('target_isolation_level' defaults to 'read_committed'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid. |
|
| 15 sats (L402) | Compiles SQL DDL schemas into type-safe ORM entities and TypeScript validation schemas (Prisma, Drizzle, SQLAlchemy, Zod). Use when scaffolding application models, generating TypeScript data layers, or synchronizing schemas; for translating raw SQL across dialects, use transpile_sql_dialect instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'schema_ddl' ('orm_target' defaults to 'drizzle_orm_typescript'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid. |
Free Account-Less Demo Mode: Append
?demo=trueto any REST endpoint above for an instant HTTP 200 schema preview at zero cost.
🚀 Upgrade to Frontier AI Models & Autonomous Agent Pipelines
Looking for multi-model reasoning or live web retrieval? Pair database-intelligence with our paid Gemini Suite & Frontier Reasoning packages (45 models including Gemini 2.5 Pro, Antigravity Agent, Deep Research Pro, and Web Scraping) starting at only 10 sats / 1 GRLC / $0.01 with account-less pay-per-call micropayments:
👉 Explore Full Gateway & Frontier AI Suite
Other Modular Diogenes MCP Packages
Install only the domain packages relevant to your workflow:
Package | Scoped MCP Endpoint | Spoke Repository |
1. EVE: Frontier Sui Move Suite (14 Tools) |
| |
2. Agent Guardrails & Sandbox (12 Tools) |
| |
3. Web3, DeFi & 402 Security (15 Tools) |
| |
4. Gemini Suite & AI Agents (15 Tools) |
| |
5. Context, Code & Solvers (15 Tools) |
| |
6. Dev, Data & Workflow Utilities (14 Tools) |
| |
7. Web Extraction, Readability & Markdown Engine (12 Tools) |
| |
8. Neural Search, Grounded Research & Deep Intelligence (12 Tools) |
| |
9. Database Intelligence, SQL Engine & Schema Guard (12 Tools) |
| |
10. Full Master Gateway (All 121 Services) |
|
TensorBlock & MCP Index Profile Metadata
Field | Value |
Category |
|
Transport |
|
Endpoint |
|
Manifest |
|
Health Check |
|
Auth |
|
Install Confidence |
|
License |
|
Verification |
|
Maintainer |
|
Docs |
|
Support |
|
Available Tools
12 toolsanalyze_query_planSQL Query Plan EXPLAIN Optimizer & Bottleneck DiagnosticsARead-onlyIdempotent
Analyzes SQL EXPLAIN execution plans to detect sequential table scans, high-cost cartesian joins, and buffer memory bottlenecks. Use when diagnosing slow queries, optimizing database performance, or evaluating query cost; for getting index recommendations, use recommend_database_indexes instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'explain_plan_or_query' ('optimization_target' defaults to 'eliminate_seq_scans'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid.
Inputs: explain_plan_or_query (required), database_engine, optimization_target. Returns: Deterministic execution response schema for analyze_query_plan.
audit_sql_injection_astDeterministic SQL AST Injection & Tautology Vulnerability AuditorARead-onlyIdempotent
Statically parses SQL queries via AST lexical analysis to detect second-order injection, tautology conditions, and stacked queries. Use when auditing dynamic query parameters or untrusted user input before database execution; for sanitizing query strings for telemetry logging, use sanitize_sql_telemetry instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'raw_sql' ('audit_sensitivity' defaults to 'strict_zero_dynamic_taint'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.
Inputs: raw_sql (required), allow_comments, audit_sensitivity. Returns: Deterministic execution response schema for audit_sql_injection_ast.
audit_transaction_isolationTransaction Concurrency Anomaly & Isolation Level Hazard AuditorARead-onlyIdempotent
Audits database transaction workflows for concurrency anomalies, dirty reads, non-repeatable reads, and deadlock risks. Use when reviewing financial transfer procedures, inventory decrement operations, or multi-step checkout workflows; for calculating connection pool headroom, use calculate_pool_headroom instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'transaction_steps' ('target_isolation_level' defaults to 'read_committed'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid.
Inputs: transaction_steps (required), strict_deadlock_check, target_isolation_level. Returns: Deterministic execution response schema for audit_transaction_isolation.
calculate_pool_headroomDatabase Connection Pool Sizing & Concurrency Headroom CalculatorARead-onlyIdempotent
Calculates optimal connection pool sizing, idle timeouts, and client headroom based on server RAM and concurrency profile. Use when sizing PgBouncer, HikariCP, or Prisma connection pools to avoid server out-of-memory crashes; for checking transaction isolation hazards, use audit_transaction_isolation instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'server_ram_mb' and 'max_concurrent_clients' ('workload_profile' defaults to 'high_concurrency_oltp'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.
Inputs: server_ram_mb (required), max_concurrent_clients (required), workload_profile. Returns: Deterministic execution response schema for calculate_pool_headroom.
detect_breaking_migrationsDatabase Schema Migration Differ & Breaking Change LinterARead-onlyIdempotent
Compares source and target DDL schemas to identify breaking changes, destructive column drops, and lock-inducing mutations. Use when verifying CI/CD migration scripts before production deployment to prevent downtime; for verifying relational normal form, use validate_schema_normalization instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'current_schema' and 'target_schema' ('risk_tolerance' defaults to 'zero_downtime_strict'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid.
Inputs: target_schema (required), current_schema (required), risk_tolerance. Returns: Deterministic execution response schema for detect_breaking_migrations.
generate_orm_modelsSQL DDL to Type-Safe ORM Entity Compiler (Prisma, Drizzle, Zod)ARead-onlyIdempotent
Compiles SQL DDL schemas into type-safe ORM entities and TypeScript validation schemas (Prisma, Drizzle, SQLAlchemy, Zod). Use when scaffolding application models, generating TypeScript data layers, or synchronizing schemas; for translating raw SQL across dialects, use transpile_sql_dialect instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'schema_ddl' ('orm_target' defaults to 'drizzle_orm_typescript'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid.
Inputs: schema_ddl (required), orm_target, include_relations. Returns: Deterministic execution response schema for generate_orm_models.
recommend_database_indexesDatabase Index Advisor & Composite B-Tree OptimizerARead-onlyIdempotent
Recommends optimal single-column and composite B-Tree/BRIN indexes based on slow query WHERE, JOIN, and ORDER BY clauses. Use when optimizing database response times and eliminating full-table scans; for inspecting full execution plans, use analyze_query_plan instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'slow_queries_or_workload' ('index_type_preference' defaults to 'btree_and_composite'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid.
Inputs: slow_queries_or_workload (required), max_new_indexes, index_type_preference. Returns: Deterministic execution response schema for recommend_database_indexes.
sanitize_sql_telemetrySQL Query Telemetry PII Scrubber & Parameterization MaskerARead-onlyIdempotent
Masks PII, financial values, and credential literals from raw SQL query logs and slow-query dumps before telemetry storage. Use when scrubbing production database query logs before shipping to APM tools, Datadog, or external log collectors; for auditing SQL injection vulnerabilities, use audit_sql_injection_ast instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'query_logs' ('masking_policy' defaults to 'mask_pii_and_literals'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.
Inputs: query_logs (required), hash_salt, masking_policy. Returns: Deterministic execution response schema for sanitize_sql_telemetry.
synthesize_seed_fixturesDeterministic Relational Seed Data & SQL Mock Fixture GeneratorARead-onlyIdempotent
Generates deterministic relational test seed fixtures respecting foreign key constraints, unique indexes, and data bounds. Use when provisioning mock database datasets for automated testing, staging environments, or sandbox demos; for compiling ORM models from schemas, use generate_orm_models instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'schema_ddl' ('fixture_volume' defaults to 'minimal_smoke_test_5'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid.
Inputs: schema_ddl (required), fixture_volume, deterministic_seed. Returns: Deterministic execution response schema for synthesize_seed_fixtures.
synthesize_sql_queryDeterministic NL-to-SQL Synthesizer & Dialect Query GeneratorARead-onlyIdempotent
Translates natural language questions into dialect-accurate, optimized SQL SELECT queries with schema awareness and safety checks. Use when generating reporting queries or automated data analytics pipelines; for analyzing SQL execution performance and EXPLAIN plans, use analyze_query_plan instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'natural_language_request' and 'schema_ddl' ('sql_dialect' defaults to 'postgresql_dialect'), supports '?demo=true' or L402 (15 sats), and returns HTTP 400 if invalid.
Inputs: schema_ddl (required), natural_language_request (required), sql_dialect, read_only_mode. Returns: Deterministic execution response schema for synthesize_sql_query.
transpile_sql_dialectPolyglot SQL Dialect Transpiler (PostgreSQL, MySQL, SQLite)ARead-onlyIdempotent
Transpiles SQL queries and DDL schemas across PostgreSQL, MySQL, and SQLite dialects, rewriting functions and syntax quirks. Use when migrating application queries across database backends or testing against in-memory SQLite; for generating new queries from natural language, use synthesize_sql_query instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'sql_code' and 'source_dialect' ('target_dialect' defaults to 'sqlite'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.
Inputs: sql_code (required), source_dialect (required), target_dialect (required). Returns: Deterministic execution response schema for transpile_sql_dialect.
validate_schema_normalizationRelational Schema Normalization Auditor (3NF, BCNF) & Integrity GuardARead-onlyIdempotent
Audits database schemas for third normal form (3NF) compliance, transitive dependencies, and missing foreign key constraints. Use when reviewing database architectures, preventing update anomalies, or validating relational integrity; for detecting breaking schema migrations, use detect_breaking_migrations instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'schema_ddl' ('target_normal_form' defaults to 'third_normal_form_3nf'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.
Inputs: schema_ddl (required), strict_keys, target_normal_form. Returns: Deterministic execution response schema for validate_schema_normalization.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool targets a distinct artifact-action pair: query synthesis, injection auditing, plan analysis, migration risk, dialect transpilation, index recommendation, normalization validation, telemetry masking, fixture generation, pool sizing, isolation auditing, and ORM generation. Descriptions explicitly cross-reference sibling tools ('for X, use Y instead'), eliminating the few plausible overlaps such as performance analysis vs. index recommendation.
Every name follows a strict verb_noun snake_case pattern (synthesize_sql_query, audit_sql_injection_ast, detect_breaking_migrations, calculate_pool_headroom). Verbs are semantically precise and non-duplicated, so the naming reads as a coherent taxonomy.
Twelve tools is squarely in the well-scoped range and each covers a distinct concern in the database-intelligence domain. No filler or redundant entries appear.
The surface covers schema validation, migration safety, query generation/optimization, security auditing, data provisioning, and ORM scaffolding—a full lifecycle for read-only DB intelligence. Minor gaps remain (e.g., no query-execution/EXPLAIN retrieval tool and no lock/deadlock inspection beyond isolation auditing), but agents can work around these.
Maintenance
Related MCP Connectors
Deterministic safety, correctness & cost gate that vets Postgres SQL before your AI agent runs it.
Supabase-compatible Postgres for agents: projects, branches, SQL, auth, storage, email.
JSON/YAML, regex, diff, JWT, SQL dialects — the keyless millisecond ops an agent needs mid-task.
Persistent memory, hybrid search and a goal graph for AI agents, over stdio or remote HTTP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to execute SQL queries and introspect PostgreSQL schemas, tables, and indexes with read-only safety by default. Supports optional write operations and works with Claude, LangChain, and other agents via stdio or HTTP transports.-
- AlicenseAqualityDmaintenanceEnables AI agents to format SQL, explain queries in plain English, analyze schemas, build queries from natural language, and generate migrations, all without requiring a database connection.551 npmMIT
- AlicenseAqualityCmaintenanceEnables AI agents to explore PostgreSQL schemas, run read-only queries, inspect execution plans, and receive evidence-backed SQL diagnostics with reproducible optimization benchmarks over local stdio.51MIT
- AlicenseNot gradedqualityBmaintenanceEnables local AI agents to work with SQL workspaces and databases by inspecting schemas, running bounded queries, and managing recoverable imports, previews, applies, diffs, and undos over stdio.1MIT