Universal MCP server for multi-database access with SQL execution, health checks, optimization, and OAuth 2.0 support.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent ā or use 1-click editor setup below.
The install command below didn't complete successfully in our automated test.
uvx SmartDB-MCPDownloading cryptography (4.5MiB) Downloading pydantic-core (2.0MiB) Downloading pymssql (3.0MiB) Downloading psycopg2-binary (4.1MiB) Downloading sqlalchemy (3.2MiB) Downloading oracledb (2.6MiB) Downloaded pydantic-core Downloaded pymssql Downloaded oracledb Downloaded psycopg2-binary Downloaded cryptography Building cx-oracle==8.3.0 Downloaded sqlalchemy Ć Failed to build `cx-oracle==8.3.0` āāā¶ The build backend returned an error ā°āā¶ Call to `setuptools.build_meta.build_wheel`
This is an experimental automated check and can have false negatives ā missing environment variables, a slow cold install, etc. It doesnāt necessarily mean somethingās wrong. Last checked 1mo ago.
š” Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by SmartDB MCP.
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
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.
| Database | Support | Description |
|---|---|---|
| MySQL | ā | Supports MySQL 5.6+, MariaDB 10+ |
| PostgreSQL | ā | Supports PostgreSQL 9.6+, YMatrix |
| Oracle | ā | Oracle 12+ |
| SQL Server | ā | Microsoft SQL Server 2012+ |
| Dameng | ā | Dameng 8.0+ |
| Tool Name | Description |
|---|---|
| execute_sql | SQL execution tool that can execute ["SELECT", "SHOW", "DESCRIBE", "EXPLAIN", "INSERT", "UPDATE", "DELETE", "CREATE", "ALTER", "DROP", "TRUNCATE"] commands based on permission configuration |
| get_db_health | Analyzes database health status (connection status, transaction status, running status, lock detection) and outputs professional diagnostic reports and solutions |
| get_table_desc | Searches for table structures in the database based on table names, supports multi-table queries |
| get_table_index | Searches for table indexes in the database based on table names, supports multi-table queries |
| get_table_name | Database 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_version | Database version query tool |
| sql_creator | SQL query generation tool that generates corresponding SQL query statements based on different database types |
| sql_optimize | A professional SQL performance optimization tool that provides expert optimization suggestions based on execution plans, table structure information, table data volume, and table indexes. |
Note: If you adjust the client ID and key in the oauth configuration, please also modify the corresponding configuration in the static/config file in the previous code
The following table details the meaning and usage of each parameter in the database connection configuration file:
| Parameter | Required | Type | Description |
|---|---|---|---|
| host | Yes | string | Database server address |
| port | Yes | integer | Database server port number |
| user | Yes | string | Database username |
| password | Yes | string | Database user password |
| database | Yes | string | Database name to connect to |
| role | Yes | string | User role, such as "readonly" for read-only permissions |
| pool_size | Yes | integer | Connection pool size |
| max_overflow | Yes | integer | Maximum overflow connections in connection pool |
| pool_recycle | Yes | integer | Connection pool recycle time (seconds) |
| pool_timeout | Yes | integer | Connection pool timeout time (seconds) |
| type | Yes | string | Database type, such as "mysql", "postgresql", "oracle", "mssqlserver" |
| Parameter | Database Type | Required | Type | Description |
|---|---|---|---|---|
| schema | PostgreSQL, SQL Server | No | string | Database schema |
| service_name | Oracle | No | string | Oracle service name |
"default" is the default database connection configuration and must be configured. Other database configurations should be added as needed.
Add the following content to your MCP client tools, such as cursor, cline, etc.
MCP JSON as follows:
Start command:
Add the following content to your MCP client tools, such as cursor, cline, etc.
MCP JSON as follows:
Start command:
Add the following content to your MCP client tools, such as cursor, cline, etc.
Factual signals from GitHub, npm, and our automated checks ā not a rating.
No reviews yet ā be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/wenb1n-dev-smartdb-mcp)<a href="https://allmcps.com/mcp/wenb1n-dev-smartdb-mcp"><img src="https://allmcps.com/api/badge/wenb1n-dev-smartdb-mcp?style=directory" alt="SmartDB MCP on AllMCPs" /></a>