Skip to content

Commit 2c0969b

Browse files
committed
feat: Enhance database interaction with connection pooling, transaction support, and query analysis tools
- Introduced connection pooling for PostgreSQL, MySQL, and MSSQL with configurable settings - Added transaction management features: `begin_transaction`, `commit_transaction`, `rollback_transaction`, and `execute_in_transaction` - Implemented query analysis tool `explain_query` for execution plan insights - Added schema comparison tool `compare_schemas` for diffing schemas between connections - Included pool statistics tool `get_pool_stats` for monitoring connection pool health - Updated documentation in README and CHANGELOG to reflect new features
1 parent d7ef8a1 commit 2c0969b

11 files changed

Lines changed: 1640 additions & 105 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1616
- Pre-commit hooks via Husky
1717
- Vitest test framework
1818
- Issue and PR templates
19+
- Connection pooling for PostgreSQL, MySQL, and MSSQL with configurable pool settings
20+
- Transaction support with `begin_transaction`, `commit_transaction`, `rollback_transaction`, and `execute_in_transaction` tools
21+
- Query explain tool (`explain_query`) for analyzing query execution plans
22+
- Schema comparison tool (`compare_schemas`) for diffing schemas between connections
23+
- Pool statistics tool (`get_pool_stats`) for monitoring connection pool health
1924

2025
### Changed
2126
- Upgraded `@modelcontextprotocol/sdk` from 1.9.0 to 1.25.2 (security fix)

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ MCP server that provides AI assistants access to databases through DBeaver conne
1515
- Uses existing DBeaver connections (no separate config needed)
1616
- Native query execution for PostgreSQL, MySQL/MariaDB, SQLite, SQL Server
1717
- Falls back to DBeaver CLI for other database types
18+
- Connection pooling with configurable pool size and timeouts
19+
- Transaction support (BEGIN/COMMIT/ROLLBACK)
20+
- Query execution plan analysis (EXPLAIN)
21+
- Schema comparison between connections
1822
- Read-only mode and tool filtering
1923
- Query validation to block dangerous operations
2024
- Data export to CSV/JSON
@@ -54,6 +58,10 @@ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_
5458
| `DBEAVER_DEBUG` | Enable debug logging | `false` |
5559
| `DBEAVER_READ_ONLY` | Disable write operations | `false` |
5660
| `DBEAVER_DISABLED_TOOLS` | Comma-separated tools to disable | None |
61+
| `DBEAVER_POOL_MIN` | Minimum connections per pool | `2` |
62+
| `DBEAVER_POOL_MAX` | Maximum connections per pool | `10` |
63+
| `DBEAVER_POOL_IDLE_TIMEOUT` | Idle connection timeout (ms) | `30000` |
64+
| `DBEAVER_POOL_ACQUIRE_TIMEOUT` | Connection acquire timeout (ms) | `10000` |
5765

5866
### Read-Only Mode
5967

@@ -104,6 +112,17 @@ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_
104112
- `alter_table` - Modify tables
105113
- `drop_table` - Drop tables (requires confirmation)
106114

115+
### Transactions
116+
- `begin_transaction` - Start a new transaction
117+
- `execute_in_transaction` - Execute query within a transaction
118+
- `commit_transaction` - Commit a transaction
119+
- `rollback_transaction` - Roll back a transaction
120+
121+
### Query Analysis
122+
- `explain_query` - Analyze query execution plan
123+
- `compare_schemas` - Compare schemas between two connections
124+
- `get_pool_stats` - Get connection pool statistics
125+
107126
### Other
108127
- `get_database_stats` - Database statistics
109128
- `append_insight` - Store analysis notes

0 commit comments

Comments
 (0)