MCP Server for DBSKiter - Database monitoring, diagnosis, and SQL processing
Project description
DBSKiter MCP Server
A Model Context Protocol (MCP) server that exposes DBSKiter database skills to AI assistants.
Overview
DBSKiter MCP Server provides AI assistants with powerful database monitoring, diagnosis, SQL optimization, and security auditing capabilities through the Model Context Protocol. It exposes 74 tools across 8 categories.
Features
Diagnose Tools (12)
Performance diagnosis and analysis tools.
| Tool | Description |
|---|---|
| diagnose_realtime | Real-time database performance diagnosis |
| diagnose_sql | SQL statement analysis with execution plan |
| diagnose_slow_queries | Slow query analysis |
| diagnose_table | Table-level diagnosis |
| diagnose_bottleneck | Performance bottleneck analysis |
| diagnose_space | Tablespace usage analysis |
| diagnose_connections | Connection analysis |
| diagnose_replication | Replication status analysis |
| diagnose_bloat | Table bloat and fragmentation analysis |
| diagnose_index_usage | Index usage analysis |
| diagnose_vacuum | Vacuum requirements analysis |
| diagnose_indexes | Index recommendations |
Monitor Tools (9)
Health monitoring and capacity planning.
| Tool | Description |
|---|---|
| monitor_health | Database health checks |
| monitor_metrics | Performance metrics collection |
| monitor_anomalies | Anomaly detection |
| monitor_capacity | Capacity prediction |
| monitor_trend | Trend analysis |
| monitor_history | Historical metric data |
| monitor_alerts | Alert retrieval |
| monitor_baseline | Baseline comparison |
| monitor_degradation | Performance degradation detection |
SQL Tools (9)
SQL execution and data management.
| Tool | Description |
|---|---|
| sql_execute | Execute SQL statements |
| sql_rewrite | SQL optimization and rewriting |
| sql_batch | Batch SQL execution |
| sql_export | Export data to CSV/JSON/SQL |
| sql_import | Import data from file |
| sql_audit | SQL execution audit records |
| sql_quality | SQL quality analysis |
| sql_schema | Table schema information |
| sql_tables | List all tables |
Security Tools (12)
Security auditing and compliance.
| Tool | Description |
|---|---|
| security_sql_injection | SQL injection detection |
| security_score | Database security scoring |
| security_sensitive_data | Sensitive data scanning |
| security_permissions | Permission auditing |
| security_config | Configuration auditing |
| security_audit | Comprehensive security audit |
| security_password_policy | Password policy checking |
| security_weak_passwords | Weak password detection |
| security_login | Login security checking |
| security_high_risk | High risk operation detection |
| security_compliance | Compliance checking |
| security_audit_log | Audit log analysis |
Inspector Tools (8)
Intelligent inspection and analysis.
| Tool | Description |
|---|---|
| inspector_inspect | Comprehensive inspection |
| inspector_intelligent | AI-powered intelligent inspection |
| inspector_anomalies | Anomaly detection |
| inspector_root_cause | Root cause analysis |
| inspector_risks | Risk prediction |
| inspector_baseline_create | Performance baseline creation |
| inspector_baseline_compare | Baseline comparison |
| inspector_top_issues | Top issues retrieval |
Lock Analyzer Tools (6)
Lock analysis and deadlock detection.
| Tool | Description |
|---|---|
| lock_analyze | Current lock analysis |
| lock_deadlocks | Deadlock detection |
| lock_chains | Lock wait chain tracing |
| lock_statistics | Lock statistics |
| lock_report | Lock analysis report |
| lock_kill_transaction | Blocking transaction termination |
Scheduler Tools (10)
Backup, scheduling, and task management.
| Tool | Description |
|---|---|
| scheduler_backup | Database backup |
| scheduler_list_backups | List available backups |
| scheduler_restore | Backup restoration |
| scheduler_schedule_task | Task scheduling |
| scheduler_list_tasks | List scheduled tasks |
| scheduler_run_now | Immediate task execution |
| scheduler_dlq | Dead letter queue tasks |
| scheduler_dlq_retry | DLQ task retry |
| scheduler_task_logs | Task execution logs |
| scheduler_status | Scheduler status |
Auditor Tools (8)
SQL audit and quality analysis.
| Tool | Description |
|---|---|
| auditor_audit_sql | SQL statement auditing |
| auditor_ddl_impact | DDL impact analysis |
| auditor_optimize | SQL optimization |
| auditor_indexes | Index recommendations |
| auditor_explain | Execution plan analysis |
| auditor_cost | Cost estimation |
| auditor_rules | Audit rules listing |
| auditor_report | Audit report generation |
Installation
pip install dbskiter-mcp-server
Configuration
Environment Variables
Create a .env file with your database connections:
# MySQL Example
DB_DIALECT=mysql
DB_HOST=localhost
DB_PORT=3306
DB_USER=root
DB_PASSWORD=your_password
DB_NAME=your_database
# Oracle Example
ORACLE_DIALECT=oracle+oracledb
ORACLE_HOST=localhost
ORACLE_PORT=1521
ORACLE_USER=system
ORACLE_PASSWORD=your_password
ORACLE_SERVICE_NAME=ORCL
Claude Desktop Configuration
Add to your Claude Desktop configuration (claude_desktop_config.json):
{
"mcpServers": {
"dbskiter": {
"command": "dbskiter-mcp",
"env": {
"DB_DIALECT": "mysql",
"DB_HOST": "localhost",
"DB_PORT": "3306",
"DB_USER": "root",
"DB_PASSWORD": "your_password",
"DB_NAME": "your_database"
}
}
}
}
Usage
Running the Server
# Run directly
dbskiter-mcp
# Or with Python
python -m dbskiter_mcp
Using with Claude
Once configured, you can ask Claude to:
- "Check the health of my database"
- "Analyze this slow SQL query"
- "Show me the top 10 slow queries"
- "Execute this SQL: SELECT COUNT(*) FROM orders"
- "Run a comprehensive security audit"
- "Detect any deadlocks in my database"
- "List all scheduled tasks and their status"
- "Predict my disk space usage for the next 30 days"
Development
Prerequisites
- Python 3.10+
- dbskiter >= 2.1.0
Building from Source
# Clone the repository
git clone https://github.com/magicCzc/dbskiter-mcp-server.git
cd dbskiter-mcp-server
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/
# Build package
python -m build
License
MIT License
Author
MagiCzc - magiczc@139.com
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dbskiter_mcp_server-1.3.2.tar.gz.
File metadata
- Download URL: dbskiter_mcp_server-1.3.2.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59a31e2df4f51852d5685ed91f157a4920b7c6f441a9416c594cef5614923a3e
|
|
| MD5 |
4c552c93cf11d533100a2e7456b89a10
|
|
| BLAKE2b-256 |
6a7dcf27502fe825a954fc6bf6f3cf55bcd877668bdb3b5bb6a25629c1564492
|
File details
Details for the file dbskiter_mcp_server-1.3.2-py3-none-any.whl.
File metadata
- Download URL: dbskiter_mcp_server-1.3.2-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7add724b19bb61dfd16396c222c2053caed13c272eab3542efe9d5ab99420f4
|
|
| MD5 |
fc7ca7832df8aa54ec1cafbf438335ff
|
|
| BLAKE2b-256 |
34ad7f0db94166f2e19fa64057f3d5cd5778a97db619665503c09b9fb897a38a
|