Connect DeepSeek Harness Web to MySQL, MariaDB, PostgreSQL, SQL Server, Oracle and MongoDB for schema discovery and read-only queries through session-authorized MCP tools.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-database
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:blkpne/dsh-database
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
简体中文 · English · npm package
A DeepSeek Harness database plugin for session-authorized schema discovery and read-only queries.
Manage connections in DSH Web and let an agent inspect tables or collections before answering questions about your data. Supports MySQL, MariaDB, PostgreSQL, SQL Server, Oracle, and MongoDB. Agent access is off by default; you can restrict it to selected sessions or allow schema discovery without data queries.
Source: blkpne/dsh-database. npm package: dsh-database. To distinguish projects with similar names, check the repository owner and the npm package's Repository link.
Quick start · Access and data boundaries · Documentation · Contributing

View the full-size screenshot. The new-connection form contains no credentials. The screenshot shows the Chinese UI labels used in the steps below.
What it does
- Manage database connections: configure and test multiple database engines from one Web interface.
- Discover schemas on demand: search tables, views, and collections, then inspect fields, constraints, and indexes without loading the entire schema up front.
- Control agent access: keep access disabled until needed, restrict sessions, choose schema-only access, and set per-session call limits.
- Diagnose calls: inspect status, duration, error stage, and cancellation state. Plugin call records do not retain SQL, parameters, or business rows.
The plugin focuses on read-only data access. It does not provide database writes, result export, SQL history replay, or SSH tunnels. Use a database account with read-only permissions as well as the plugin's access controls.
Quick start
1. Install the plugin
If DSH is already installed, stop the running web Profile before installing or updating:
dsh plugin --profile web add dsh-database@latest --ignore-scripts
This installs the built package from npm. You do not need to clone the repository or build it locally. Use the same command to update, then restart DSH Web.
If DSH is not installed yet:
npm install --global @deepseek-ai/dsh@latest
See the compatibility matrix for Node.js requirements and tested DSH versions. On Windows PowerShell, you can use npm.cmd and dsh.cmd.
2. Start DSH Web
dsh --profile web --host 127.0.0.1 --port 3080 --no-open
DSH initializes the web Profile if needed. Open the login link printed in the terminal. The sidebar should include 数据库 (Database). On your first DSH run, follow the host's model setup prompts.
3. Authorize your first query
- Open 数据库 (Database), create a connection, and enter the database address, database name, and a read-only account.
- Select 测试连接 (Test connection). Save after the test succeeds. See TLS connections if you use a private certificate authority.
- In 授权规则 (Authorization rules), choose the session scope and capabilities, then save. Enable Agent 访问 (Agent access).
- After creating your first connection, the optional success guide lets you copy a starter question. Paste, review, and send it in an authorized conversation of your choice. Routine editing does not show this guide. Or ask your own question, for example:
Use the "Business analytics" connection to list the tables I can access. Inspect the relevant columns, count the orders, and explain which table you used.
A successful connection test does not save the settings, enable agent access, or verify model readiness. Configure the model API key separately under 设置 → 模型 (Settings → Models). Copying the question does not switch conversations, send it, or replace an existing draft. Query results and analysis appear in the agent conversation. 调用记录 (Call records) shows status, duration, and errors.
Access and data boundaries
- New connections start with agent access disabled. Before enabling access, review the session scope: its default is all sessions in the current DSH host, and you can narrow it to selected sessions and their child agents.
- Schema-only authorization allows structural inspection without exposing the query tool. Call limits apply to both inspection and queries.
- Database permissions determine which data is readable. Session authorization determines which sessions can use a connection; it does not replace database permissions or provide a SQL object allowlist.
- Use read-only database accounts and views to restrict access. SQL Server's
readOnlyIntentis a routing hint, not a write-permission boundary. SQL checks and read-only transactions do not make arbitrary database functions or extensions a safe sandbox. - Credentials are stored through DSH's credentials service. The default local provider uses permission-restricted files; the plugin does not promise encryption at rest. New Web connections default to not requiring encryption. TLS with certificate and hostname verification is available under Advanced settings and recommended for remote services. This is not a prefer-TLS mode. Existing connection settings are preserved.
- Query results enter the agent context and may be retained in host session records or sent to the configured model service. Plugin call records omitting business data does not mean that the host or model provider never processes or stores it. Return only the data needed, preferably aggregated in the database.
- Disabling or deleting a connection cannot retract data already returned. Review the data handling details before enabling access.
This package is installed and authorized through DSH. The MCP transport is part of that integration; this README does not claim compatibility with arbitrary standalone MCP clients.
Example: e-commerce analysis with PostgreSQL
Why is net revenue growing more slowly than order volume? The agent inspects the orders and refunds tables, aggregates data by month and channel in PostgreSQL, and uses those results for analysis.

View the full conversation screenshot. This is an actual agent conversation using synthetic data in an isolated PostgreSQL instance.
The plugin retrieves data through read-only queries. Charting and file output use the agent's host tools, not a charting or export feature in this plugin. The reproducible example includes the synthetic dataset, setup, and reference queries.
Troubleshooting
| Symptom | What to check |
|---|---|
| Installer cannot find pnpm | DSH CLI uses pnpm to manage plugins. Only if it is missing, run npm install --global pnpm@latest, then retry. |
| Database sidebar entry is missing | Install into the active Web Profile, restart it, and check the tested host versions. |
| TLS or certificate error | Check the certificate hostname and trusted CA. See TLS connections. |
| Agent cannot see the tools | Check the access switch, saved session scope, and current session. Schema-only mode does not expose queries. |
| Query rejected or results incomplete | Check read-only restrictions, call limits, and result limits. See troubleshooting. |
Documentation
The detailed guides below are currently in Chinese; code examples and tool names retain their original identifiers.
- Usage guide: connection management, authorization, troubleshooting, updates, and backups.
- Tool reference: inputs, results, and limits.
- Compatibility: host and database validation, including what has not been tested.
- E-commerce example: synthetic PostgreSQL data and reproducible queries.
- Contributing: local development, build, and tests.
- Changelog and release guide.
Feedback and contributions
Report bugs and requests through GitHub Issues. Include versions, minimal reproduction steps, and redacted errors. Do not include credentials or business data. Follow the security reporting guidance for security issues rather than posting vulnerability details in a public issue.
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 38796
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
DayuanJiang/next-ai-draw-io#dsh-plugin★ 37348
Draws draw.io diagrams in DeepSeek Harness through the next-ai-drawio MCP server: the link in the reply opens a live preview in the right sidebar, you can edit the diagram by hand, and each AI change is a version you can restore. Node.js 18+; npx downloads the MCP server on first use.
yikart/AiToEarn#dsh-plugin-aitoearn★ 29024
Generate copy, images and short videos, and publish with one click to Douyin, Kuaishou, Xiaohongshu, WeChat Official, Bilibili, Facebook, TikTok and more, covering the full content lifecycle from creation to publishing and monetization.
superdesigndev/treg★ 10192
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 6129
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
Hithink-Tech-Org/Financial-API#hithink-finance★ 4796
Query Hithink Finance data in DeepSeek Harness, view charts in chat, and save refreshable dashboards.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.