Loading...

The DB MCP Server provides a unified interface for AI models to interact with multiple databases (MySQL, PostgreSQL, SQLite, TimescaleDB) simultaneously, enabling SQL queries, schema exploration, and transaction management.
Boost this tool
Subscribe to listing upgrades or segmented pushes.
The DB MCP Server provides a unified interface for AI models to interact with multiple databases (MySQL, PostgreSQL, SQLite, TimescaleDB) simultaneously, enabling SQL queries, schema exploration, and transaction management.
The DB MCP Server offers a convenient way to interact with multiple databases, but it's crucial to secure the configuration file and implement robust input validation to prevent SQL injection attacks. Using read-only connections where possible significantly reduces risk. The server's safety depends heavily on the security practices of the user and the AI agent interacting with it.
Performance depends on the underlying database systems and the complexity of the queries. Consider using connection pooling and query optimization techniques to improve performance.
Cost depends on the resources consumed by the database systems and the complexity of the queries. Consider using cost-effective database solutions and optimizing queries to reduce resource consumption.
{
"mcpServers": {
"stdio-db-mcp-server": {
"command": "/path/to/db-mcp-server/server",
"args": ["-t", "stdio", "-c", "/path/to/config.json"]
}
}
}TRANSPORT_MODECONFIG_PATHDB_CONFIGquery_<db_id>Executes SELECT queries and returns results as a tabular dataset.
Read-only operation, no data modification.
execute_<db_id>Runs data manipulation statements (INSERT, UPDATE, DELETE).
Modifies database content, potential for data loss or corruption.
transaction_<db_id>Manages database transactions (BEGIN, COMMIT, ROLLBACK).
Improper transaction handling can lead to data inconsistency.
schema_<db_id>Retrieves information about database schema (tables, columns, indexes).
Read-only operation, no data modification.
performance_<db_id>Analyzes query performance and provides optimization suggestions.
Read-only operation, no data modification.
create_hypertable_<db_id>Converts a standard table to a TimescaleDB hypertable.
Modifies database schema, potential for data loss if not handled correctly.
time_series_query_<db_id>Executes optimized time-series queries with bucketing.
Read-only operation, no data modification.
None
hybrid
The DB MCP Server offers a convenient way to interact with multiple databases, but it's crucial to secure the configuration file and implement robust input validation to prevent SQL injection attacks. Using read-only connections where possible significantly reduces risk. The server's safety depends heavily on the security practices of the user and the AI agent interacting with it.
Autonomy level is highly dependent on the configured permissions and the AI agent's ability to construct safe and valid SQL queries. It's crucial to implement input validation and limit write access to prevent unintended consequences.
Production Tip
Implement robust input validation and query sanitization to prevent SQL injection attacks. Regularly review and update database credentials to minimize the risk of unauthorized access.
MySQL, PostgreSQL, SQLite, and TimescaleDB are fully supported.
Create a `config.json` file with the connection details for each database.
Lazy loading mode defers connection establishment until the first use, which is recommended for setups with 10+ databases.
Implement robust input validation and query sanitization techniques.
Store the configuration file in a secure location and restrict access to authorized users only.
Yes, the server is fully compatible with the OpenAI Agents SDK.
STDIO and SSE (Server-Sent Events) are the available transport modes.