Database MCP
Paste the following prompt into your AI chat to install this skill:
Install @user_16c0d092/database-mcp by following https://skillhub.cn/install/skillhub.md.
About this skill
Problem
Database tooling often treats “connected” as success, but real work usually starts from unclear schema, unknown column types, and write statements without a safe preview. database-mcp addresses this by exposing a bounded set of MCP tools: connection testing, table listing, schema inspection, read-only queries, and controlled writes, aimed at engineers who need to inspect and maintain data from an MCP client.
How It Works
It provides five tools: connect_db, list_tables, describe_table, query, and execute. A practical workflow is connect → explore → query → confirm write. First, use connect_db to validate host, port, credentials, and database name. Then use list_tables and describe_table to learn table names, fields, types, and constraints. Use query to preview effects before calling execute for writes.
Risk-based execution is the key control. Low-risk statements such as SELECT, SHOW, and DESCRIBE can run directly. Medium-risk statements such as INSERT, UPDATE, DELETE, and RENAME require explicit confirm: true. High-risk statements such as DROP, TRUNCATE, and ALTER should be treated as destructive. Configuration is driven by environment variables such as DB_TYPE, DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, and DB_NAME, with support for MySQL, MariaDB, TiDB, PostgreSQL, SQLite, Oracle, and SQL Server. Queries should be parameterized and select only needed columns.
Boundaries
This skill is useful for local debugging, database inspection, small maintenance tasks, and MCP client integration. In production, prefer backup first, preview impact, and execute only after review. Deletions should include explicit WHERE conditions. If connection fails, check network, port, authentication, and database name. If a table is missing, verify it with list_tables. If parameterization fails, check parameter types against column types. Blocked writes are usually a safety mechanism, not a bug.
Use Cases
- Check local database connectivity by validating host, port, and credentials
- Explore an unfamiliar database by listing tables and inspecting field types
- Preview the impact of an update before applying it in a shared environment
- Confirm table schema and sample rows before inserting or deleting records
Best For
- Engineers debugging local database connectivity and SQL execution failures
- Application developers inspecting legacy database schema and constraints
- Backend engineers running controlled data maintenance through an MCP client
- Database operators reviewing write statements by risk level
Related Skills
A systematic code error fixing skill that follows a five-step workflow: Reproduce, Isolate, Understand, Fix, Verify, to help developers resolve code errors.
Supports inline SVG/HTML rendering and Mermaid code output, covering common technical diagram creation like architecture and flow diagrams.
Publish HTML, static assets, or build output as a public link, with account management, update, deletion, and AI safety review.
A comprehensive browser automation guide covering navigation, interaction, multi-tab management, and data collection, tailored for domestic web ecosystems and tools like Playwright/Selenium.