- Explore MCP Servers
- db-mcp-tool
Db Mcp Tool
What is Db Mcp Tool
db-mcp-tool is a powerful Model Context Protocol (MCP) tool designed for exploring and managing various types of databases, including PostgreSQL, MySQL, and Firestore.
Use cases
Use cases include database exploration, schema management, data export, and executing SQL queries for analysis or application development.
How to use
To use db-mcp-tool, first clone the repository and install dependencies using npm. After building the project, add the tool to Cursor by configuring the settings and connecting to your desired database using specific commands for each database type.
Key features
Key features include support for multiple databases (PostgreSQL, MySQL, Firestore), various database operations such as connecting to databases, listing tables, viewing triggers, executing SQL queries, and exporting table schemas and data.
Where to use
db-mcp-tool can be used in software development, data analysis, and database management environments where interaction with different database systems is required.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Db Mcp Tool
db-mcp-tool is a powerful Model Context Protocol (MCP) tool designed for exploring and managing various types of databases, including PostgreSQL, MySQL, and Firestore.
Use cases
Use cases include database exploration, schema management, data export, and executing SQL queries for analysis or application development.
How to use
To use db-mcp-tool, first clone the repository and install dependencies using npm. After building the project, add the tool to Cursor by configuring the settings and connecting to your desired database using specific commands for each database type.
Key features
Key features include support for multiple databases (PostgreSQL, MySQL, Firestore), various database operations such as connecting to databases, listing tables, viewing triggers, executing SQL queries, and exporting table schemas and data.
Where to use
db-mcp-tool can be used in software development, data analysis, and database management environments where interaction with different database systems is required.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Database Explorer MCP Tool
A powerful Model Context Protocol (MCP) tool for exploring and managing different types of databases including PostgreSQL, MySQL, and Firestore.
Features
-
Multiple Database Support
- PostgreSQL
- MySQL
- Firestore
-
Database Operations
- Connect to databases
- List tables
- View triggers
- List functions
- Execute SQL queries (PostgreSQL and MySQL)
- Export table schemas
- Export table data
Integration with Cursor
Before adding the tool to Cursor, you need to build the project:
- Clone the repository
- Install dependencies:
npm install - Build the project:
npm run build
To add the tool to Cursor:
- Open Cursor settings
- Navigate to “Model Context Protocol (MCP)” section
- Click “Add New Tool”
- Fill in the following details:
Note: Replace{ "name": "database-explorer", "command": "node /path/to/project/dist/index.js", "description": "Database Explorer MCP Tool" }/path/to/projectwith the actual path to your project directory. - Save the settings
- Restart Cursor
Using the Tool:
-
After setup, you can connect to your database using one of these commands:
- For PostgreSQL: Use
!pgwith connection details - For MySQL: Use
!mysqlwith connection details - For Firestore: Use
!firestorewith connection details
- For PostgreSQL: Use
-
Once connected, you can use various database operations:
!tablesto list all tables!triggersto view triggers!functionsto list functions!queryto execute SQL queries!export-dbto export table schemas!export-datato export table data
See the Commands section below for detailed usage examples.
Commands
Connection Commands
-
!pg- Connect to PostgreSQL database{ "connection": { "host": "hostname", "port": 5432, "database": "dbname", "user": "username", "password": "password" } } -
!mysql- Connect to MySQL database{ "connection": { "host": "hostname", "port": 3306, "database": "dbname", "user": "username", "password": "password" } } -
!firestore- Connect to Firestore database{ "connection": { "projectId": "your-project-id", "keyFilename": "path/to/keyfile.json" } }
Database Operation Commands
!tables- List all tables in the connected database!triggers- List all triggers in the connected database!functions- List all functions in the connected database!query- Execute SQL query (PostgreSQL and MySQL only){ "query": "SELECT * FROM table_name" }!export-db- Export table schema{ "table": "table_name" }!export-data- Export table data as INSERT statements{ "table": "table_name" }
Requirements
- Node.js
- Required database drivers:
pgfor PostgreSQLmysql2for MySQL@google-cloud/firestorefor Firestore
Usage
- Make sure you have the necessary database credentials
- Connect to your database using the appropriate connection command
- Use the available commands to explore and manage your database
Error Handling
- The tool includes comprehensive error handling for:
- Connection failures
- Query execution errors
- Schema and data export issues
- Invalid database operations
Notes
- Firestore support is limited to basic operations due to its NoSQL nature
- SQL operations are only available for PostgreSQL and MySQL
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










