@zz1996/dbhub-dameng 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +42 -2
  2. package/package.json +2 -1
package/README.md CHANGED
@@ -5,6 +5,10 @@
5
5
  > This package is a local Dameng/DM8 connector fork of Bytebase DBHub. Use
6
6
  > `npx -y @zz1996/dbhub-dameng --transport stdio --config ./dbhub.dameng.toml`
7
7
  > for Dameng MCP usage.
8
+ >
9
+ > Dameng DSN format: `dameng://user:password@host:5236/schema`. Prefer a
10
+ > least-privilege read-only Dameng account for production or shared databases,
11
+ > even when the `execute_sql` tool is configured with `readonly = true`.
8
12
 
9
13
  <p align="center">
10
14
  <a href="https://dbhub.ai/" target="_blank">
@@ -30,6 +34,7 @@
30
34
  | | | | | |
31
35
  | Copilot CLI +--->+ +--->+ MariaDB |
32
36
  | | | | | |
37
+ | +--->+ +--->+ Dameng / DM8 |
33
38
  | | | | | |
34
39
  +------------------+ +--------------+ +------------------+
35
40
  MCP Clients MCP Server Databases
@@ -38,14 +43,14 @@
38
43
  DBHub is a zero-dependency, token efficient MCP server implementing the Model Context Protocol (MCP) server interface. This lightweight gateway allows MCP-compatible clients to connect to and explore different databases:
39
44
 
40
45
  - **Local Development First**: Zero dependency, token efficient with just two MCP tools to maximize context window
41
- - **Multi-Database**: PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite through a single interface
46
+ - **Multi-Database**: PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, and Dameng/DM8 through a single interface
42
47
  - **Multi-Connection**: Connect to multiple databases simultaneously with TOML configuration
43
48
  - **Guardrails**: Read-only mode, row limiting, and query timeout to prevent runaway operations
44
49
  - **Secure Access**: SSH tunneling and SSL/TLS encryption
45
50
 
46
51
  ## Supported Databases
47
52
 
48
- PostgreSQL, MySQL, SQL Server, MariaDB, and SQLite.
53
+ PostgreSQL, MySQL, SQL Server, MariaDB, SQLite, and Dameng/DM8.
49
54
 
50
55
  ## MCP Tools
51
56
 
@@ -85,6 +90,41 @@ docker run --rm --init \
85
90
  npx @bytebase/dbhub@latest --transport http --port 8080 --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"
86
91
  ```
87
92
 
93
+ **Dameng / DM8 fork:**
94
+
95
+ ```bash
96
+ npx -y @zz1996/dbhub-dameng --transport stdio --config ./dbhub.dameng.toml
97
+ ```
98
+
99
+ Minimal Dameng TOML configuration:
100
+
101
+ ```toml
102
+ [[sources]]
103
+ id = "dm8_readonly"
104
+ description = "Dameng DM8 database for schema discovery and read-only SQL queries"
105
+ dsn = "dameng://${DM8_USER}:${DM8_PASSWORD}@${DM8_HOST}:5236/${DM8_SCHEMA}"
106
+ query_timeout = 30
107
+ lazy = true
108
+
109
+ [[tools]]
110
+ name = "search_objects"
111
+ source = "dm8_readonly"
112
+
113
+ [[tools]]
114
+ name = "execute_sql"
115
+ source = "dm8_readonly"
116
+ readonly = true
117
+ max_rows = 100
118
+ ```
119
+
120
+ To verify the local Dameng connector against a real DM8 instance without
121
+ committing credentials, set `DAMENG_DSN` or point to a local TOML file:
122
+
123
+ ```bash
124
+ DAMENG_DSN="dameng://user:password@host:5236/schema" pnpm verify:dameng
125
+ pnpm verify:dameng -- --config ./dbhub.dameng.toml --source dm8_readonly
126
+ ```
127
+
88
128
  **Demo Mode:**
89
129
 
90
130
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zz1996/dbhub-dameng",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "mcpName": "io.github.zuozh11/dbhub-dameng",
5
5
  "description": "Local fork of DBHub with Dameng/DM8 database connector support",
6
6
  "repository": {
@@ -41,6 +41,7 @@
41
41
  "test:watch": "vitest",
42
42
  "test:integration": "vitest run --project integration",
43
43
  "test:build": "node scripts/smoke-test-build.mjs",
44
+ "verify:dameng": "tsx scripts/verify-dameng.mjs",
44
45
  "prepublishOnly": "npm run build:backend"
45
46
  },
46
47
  "engines": {