SmartDB_MCP is a universal database gateway, implemented as a Model Context Protocol (MCP) server. Through this gateway, MCP-compatible clients can connect to and explore different databases.
[Purpose] As a universal database MCP server, it provides MCP clients with multi-database connection and operation capabilities, and on this basis provides safer and smarter database management and maintenance support.
[Main Capabilities]
- Supports multiple databases: MySQL, PostgreSQL, SQL Server, MariaDB, DM8 (Dameng), Oracle.
- Basic database connection and exploration.
- OAuth 2.0 authentication.
- Health check.
- SQL optimization.
- Index health detection.
- Role-based access control: readonly, writer, admin, corresponding to different database permissions.
- Multi-connection pool management, allowing separate queries of table data in the default connection pool and other connection pools, including other connection pools and other databases.
[Usage]
- Installation and configuration: supports pip installation and configuration. It is necessary to configure the environment variable file, the database connection configuration file, and the database connection parameters; different databases have additional specific parameters.
- Local development modes:
- Streamable Http mode: you can use uv to start the service, then add the corresponding configuration to the MCP JSON of an MCP client tool (such as cursor, cline, etc.).
- SSE mode.
- STDIO mode.
- OAuth 2.0 authentication: start the authentication service; by default, the built-in OAuth 2.0 password mode authentication is used, and you can modify your own authentication service address in the env file; access http://localhost:3000/login , the default account and password are configured in the env file; copy the token and add it to the request header.
- Connection configuration notes: "default" is the default database connection configuration and must be configured; other database configurations can be added as needed. If you adjust the client ID and secret in the oauth configuration, you must also modify the corresponding configuration in the static/config file in the code.
[Applicable Scenarios] Applicable to scenarios where multiple databases need to be uniformly connected, explored, and managed through an MCP client, such as cross-database queries in development tools, database health status checks, SQL optimization, and index health detection, as well as other operations and development work.
[Limitations] The materials do not provide more specific version compatibility requirements, performance metrics, or pricing information, and none is provided for now.