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:
```bash
npm install
```
Build the project:
```bash
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:
```json
{
"name": "database-explorer",
"command": "node /path/to/project/dist/index.js",
"description": "Database Explorer MCP Tool"
}
```
Note: Replace `/path/to/project` with 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 `!pg` with connection details
- For MySQL: Use `!mysql` with connection details
- For Firestore: Use `!firestore` with connection details
Once connected, you can use various database operations:
- `!tables` to list all tables
- `!triggers` to view triggers
- `!functions` to list functions
- `!query` to execute SQL queries
- `!export-db` to export table schemas
- `!export-data` to export table data
See the Commands section below for detailed usage examples.