Introduction

In the DeepSeek Harness (DSH) ecosystem, enabling large models to interact directly with databases requires solving security and controllability issues. The xby-db plugin provides a solution for secure database access through the MCP protocol. As an MCP Database Server, it aims to provide standardized database access interfaces for AI assistants and LLM-based tools.

Core Features

The plugin provides the following main capabilities:

  • set_xby_apikey: Sets the API key in the chat context. The key is automatically persisted and remains valid after restart.
  • db_tables: Lists all tables in the database. Supports filtering by schema and returns qualified table names.
  • db_describe_table: Retrieves column information for a specific table, including column names, data types, and nullability.
  • db_execute: Executes SQL statements. Supports SELECT (read operations), INSERT/UPDATE/DELETE (write operations; must be enabled in the configuration), and DDL (must be enabled in the configuration). Supports named parameters using :param syntax.
  • db_explain: Uses EXPLAIN to obtain the query execution plan and performance information, used for analyzing query efficiency and optimization opportunities.

Installation

Install the plugin using the following command:

dsh plugin --profile web add github:xby_skill/xby-db

Configuration and Permissions

Before use, complete the following configuration:

  1. Get the key: Go to the Xiaobenyang official website to register and obtain an API key.
  2. Enable write operations: To execute INSERT, UPDATE, DELETE, or DDL statements, you must enable the corresponding permissions in the DSH configuration.
  3. Database support: The plugin supports SQLite, PostgreSQL, MySQL, and MariaDB.

Security and Ecosystem

The plugin includes built-in query validation, audit logs, and security controls to ensure the safety of database operations. As part of the DSH ecosystem, it follows the “everything is a plugin” philosophy. It is recommended to review the source code and MIT license before installation.