Universal database MCP server for MySQL, PostgreSQL, SQL Server, MariaDB,Oracle

xuwenbinxuwenbin
2 min read

Image description

You may visit this Github link: https://github.com/wenb1n-dev/SmartDB_MCP

SmartDB is a universal database gateway that implements the Model Context Protocol (MCP) server interface. This gateway allows MCP-compatible clients to connect and explore different databases.

Compared to similar products, SmartDB not only provides basic database connection and exploration capabilities but also adds advanced features such as OAuth 2.0 authentication , health checks, SQL optimization, and index health detection, making database management and maintenance more secure and intelligent.

Image description

Currently Supported Databases

DatabaseSupportDescription
MySQLSupports MySQL 5.6+, MariaDB 10+
PostgreSQLSupports PostgreSQL 9.6+, YMatrix
OracleOracle 12+
SQL ServerMicrosoft SQL Server 2012+

Tool List

Tool NameDescription
execute_sqlSQL execution tool that can execute ["SELECT", "SHOW", "DESCRIBE", "EXPLAIN", "INSERT", "UPDATE", "DELETE", "CREATE", "ALTER", "DROP", "TRUNCATE"] commands based on permission configuration
get_db_healthAnalyzes database health status (connection status, transaction status, running status, lock detection) and outputs professional diagnostic reports and solutions
get_table_descSearches for table structures in the database based on table names, supports multi-table queries
get_table_indexSearches for table indexes in the database based on table names, supports multi-table queries
get_table_nameDatabase table name query tool. Used to query all table names in the database or search for corresponding table names based on Chinese table names or table descriptions
get_db_versionDatabase version query tool
sql_creatorSQL query generation tool that generates corresponding SQL query statements based on different database types
sql_optimizeA professional SQL performance optimization tool that provides expert optimization suggestions based on execution plans, table structure information, table data volume, and table indexes.

Usage Examples

  1. Query the table data of the default connection pool

Image description

  1. Query the table data of the others connection pool

Image description

  1. Query data from tables in other connection pools and other databases

Image description

  1. Query database health status

Image description

  1. Sql Optimize

Image description

1
Subscribe to my newsletter

Read articles from xuwenbin directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

xuwenbin
xuwenbin