MCP server offering SQL and database tools for AI agents

MCP server offering SQL and database tools for AI agents

mcp-database-tools•byrog0x

An MCP server that supplies AI agents with SQL formatting, explanation, schema analysis, query building, and migration generation tools, all working directly on SQL text with no database connection required.

License: MIT•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Formats and prettifies SQL queries with indentation, uppercased keywords, and aligned columns, supporting MySQL, PostgreSQL, and SQLite syntax.
  • •Explains a SQL query in plain English step by step, identifying query type, tables, columns, and conditions, and offering optimization tips.
  • •Parses CREATE TABLE statements to extract tables, columns, types, constraints, foreign keys, and indexes, and generates an ER diagram in Mermaid format.
  • •Builds SQL queries from natural language descriptions and generates up and down ALTER TABLE migrations by comparing two schemas.

BEST FOR

  • •Developers who want an AI agent to clean up and format SQL queries without connecting to a database.
  • •Teams needing quick schema analysis and ER diagram generation from CREATE TABLE statements.
  • •Engineers who want automated up and down migration scripts from schema changes.

ABOUT MCP-DATABASE-TOOLS

MCP server offering SQL and database tools for AI agents is cataloged as an MCP server attributed to rog0x. An MCP server that supplies AI agents with SQL formatting, explanation, schema analysis, query building, and migration generation tools, all working directly on SQL text with no database connection required. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP server offering SQL and database tools for AI agents are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does the server need a live database connection to work?

No. All analysis is performed on SQL text, so no actual database connection is required.

Which SQL dialects does the formatting tool support?

The sql_format tool supports MySQL, PostgreSQL, and SQLite syntax.

Upstream README

View this exact version on GitHub

README.md · 1d008641e97d · Fetched 2026-11-13 13:37:44 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

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

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP server offering SQL and database tools for AI agents from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-database-tools)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage