@xcr1234/dbhub-fork 1.0.0

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 (34) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +139 -0
  3. package/dist/chunk-6O5I6UAW.js +2150 -0
  4. package/dist/chunk-BRXZ5ZQB.js +127 -0
  5. package/dist/chunk-C7WEAPX4.js +485 -0
  6. package/dist/chunk-FAIJPBT5.js +40 -0
  7. package/dist/chunk-JFWX35TB.js +34 -0
  8. package/dist/chunk-RTB262PR.js +60 -0
  9. package/dist/chunk-WVVMH6FJ.js +49 -0
  10. package/dist/demo/employee-sqlite/employee.sql +117 -0
  11. package/dist/demo/employee-sqlite/load_department.sql +10 -0
  12. package/dist/demo/employee-sqlite/load_dept_emp.sql +1103 -0
  13. package/dist/demo/employee-sqlite/load_dept_manager.sql +17 -0
  14. package/dist/demo/employee-sqlite/load_employee.sql +1000 -0
  15. package/dist/demo/employee-sqlite/load_salary1.sql +9488 -0
  16. package/dist/demo/employee-sqlite/load_title.sql +1470 -0
  17. package/dist/demo-loader-WKQAEFSX.js +48 -0
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.js +1584 -0
  20. package/dist/mariadb-QHRMVK47.js +468 -0
  21. package/dist/mysql-GOLPG2Q6.js +475 -0
  22. package/dist/oracle-3V2T7ZWF.js +27739 -0
  23. package/dist/postgres-CK6N5BXI.js +520 -0
  24. package/dist/public/assets/index-BiTHVJQj.js +144 -0
  25. package/dist/public/assets/index-CfPYb3wl.css +1 -0
  26. package/dist/public/assets/postgres-BpcazhJg.svg +22 -0
  27. package/dist/public/assets/sqlserver-ByfFYYpV.svg +11 -0
  28. package/dist/public/favicon.svg +57 -0
  29. package/dist/public/index.html +14 -0
  30. package/dist/public/logo-full-light.svg +58 -0
  31. package/dist/registry-KI3KJMRY.js +13 -0
  32. package/dist/sqlite-P6NXTMYE.js +2473 -0
  33. package/dist/sqlserver-5RM44GWI.js +493 -0
  34. package/package.json +99 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Bytebase
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,139 @@
1
+ # My fork version
2
+
3
+ Remove better-sqlite3
4
+
5
+ Add oracle support, example:
6
+
7
+ ```toml
8
+ [[sources]]
9
+ id = "oracle_db"
10
+ dsn = "oracle://SYSTEM:MyStrongPassword123@localhost:1521/FREEPDB1"
11
+ ```
12
+
13
+
14
+ > > [!NOTE]
15
+ > Brought to you by [Bytebase](https://www.bytebase.com/), open-source database DevSecOps platform.
16
+
17
+ <p align="center">
18
+ <a href="https://dbhub.ai/" target="_blank">
19
+ <picture>
20
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/bytebase/dbhub/main/docs/images/logo/full-dark.svg" width="75%">
21
+ <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/bytebase/dbhub/main/docs/images/logo/full-light.svg" width="75%">
22
+ <img src="https://raw.githubusercontent.com/bytebase/dbhub/main/docs/images/logo/full-light.svg" width="75%" alt="DBHub Logo">
23
+ </picture>
24
+ </a>
25
+ </p>
26
+
27
+ ```bash
28
+ +------------------+ +--------------+ +------------------+
29
+ | | | | | |
30
+ | | | | | |
31
+ | Claude Desktop +--->+ +--->+ PostgreSQL |
32
+ | | | | | |
33
+ | Claude Code +--->+ +--->+ SQL Server |
34
+ | | | | | |
35
+ | Cursor +--->+ DBHub +--->+ SQLite |
36
+ | | | | | |
37
+ | VS Code +--->+ +--->+ MySQL |
38
+ | | | | | |
39
+ | Copilot CLI +--->+ +--->+ MariaDB |
40
+ | | | | | |
41
+ | | | | | |
42
+ +------------------+ +--------------+ +------------------+
43
+ MCP Clients MCP Server Databases
44
+ ```
45
+
46
+ 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:
47
+
48
+ - **Local Development First**: Zero dependency, token efficient with just two MCP tools to maximize context window
49
+ - **Multi-Database**: PostgreSQL, MySQL, MariaDB, SQL Server, and SQLite through a single interface
50
+ - **Multi-Connection**: Connect to multiple databases simultaneously with TOML configuration
51
+ - **Guardrails**: Read-only mode, row limiting, and query timeout to prevent runaway operations
52
+ - **Secure Access**: SSH tunneling and SSL/TLS encryption
53
+
54
+ ## Supported Databases
55
+
56
+ PostgreSQL, MySQL, SQL Server, MariaDB, and SQLite.
57
+
58
+ ## MCP Tools
59
+
60
+ DBHub implements MCP tools for database operations:
61
+
62
+ - **[execute_sql](https://dbhub.ai/tools/execute-sql)**: Execute SQL queries with transaction support and safety controls
63
+ - **[search_objects](https://dbhub.ai/tools/search-objects)**: Search and explore database schemas, tables, columns, indexes, and procedures with progressive disclosure
64
+ - **[Custom Tools](https://dbhub.ai/tools/custom-tools)**: Define reusable, parameterized SQL operations in your `dbhub.toml` configuration file
65
+
66
+ ## Workbench
67
+
68
+ DBHub includes a [built-in web interface](https://dbhub.ai/workbench/overview) for interacting with your database tools. It provides a visual way to execute queries, run custom tools, and view request traces without requiring an MCP client.
69
+
70
+ ![workbench](https://raw.githubusercontent.com/bytebase/dbhub/main/docs/images/workbench/workbench.webp)
71
+
72
+ ## Installation
73
+
74
+ See the full [Installation Guide](https://dbhub.ai/installation) for detailed instructions.
75
+
76
+ ### Quick Start
77
+
78
+ **Docker:**
79
+
80
+ ```bash
81
+ docker run --rm --init \
82
+ --name dbhub \
83
+ --publish 8080:8080 \
84
+ bytebase/dbhub \
85
+ --transport http \
86
+ --port 8080 \
87
+ --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"
88
+ ```
89
+
90
+ **NPM:**
91
+
92
+ ```bash
93
+ npx @bytebase/dbhub@latest --transport http --port 8080 --dsn "postgres://user:password@localhost:5432/dbname?sslmode=disable"
94
+ ```
95
+
96
+ **Demo Mode:**
97
+
98
+ ```bash
99
+ npx @bytebase/dbhub@latest --transport http --port 8080 --demo
100
+ ```
101
+
102
+ See [Command-Line Options](https://dbhub.ai/config/command-line) for all available parameters.
103
+
104
+ ### Multi-Database Setup
105
+
106
+ Connect to multiple databases simultaneously using TOML configuration files. Perfect for managing production, staging, and development databases from a single DBHub instance.
107
+
108
+ See [Multi-Database Configuration](https://dbhub.ai/config/toml) for complete setup instructions.
109
+
110
+ ## Development
111
+
112
+ ```bash
113
+ # Install dependencies
114
+ pnpm install
115
+
116
+ # Run in development mode
117
+ pnpm dev
118
+
119
+ # Build and run for production
120
+ pnpm build && pnpm start --transport stdio --dsn "postgres://user:password@localhost:5432/dbname"
121
+ ```
122
+
123
+ See [Testing](.claude/skills/testing/SKILL.md) and [Debug](https://dbhub.ai/config/debug).
124
+
125
+ ## Contributors
126
+
127
+ <a href="https://github.com/bytebase/dbhub/graphs/contributors">
128
+ <img src="https://contrib.rocks/image?repo=bytebase/dbhub" />
129
+ </a>
130
+
131
+ ## Star History
132
+
133
+ <a href="https://www.star-history.com/?repos=bytebase%2Fdbhub&type=date&legend=top-left">
134
+ <picture>
135
+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=bytebase/dbhub&type=date&theme=dark&legend=top-left" />
136
+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=bytebase/dbhub&type=date&legend=top-left" />
137
+ <img alt="Star History Chart" src="https://api.star-history.com/chart?repos=bytebase/dbhub&type=date&legend=top-left" />
138
+ </picture>
139
+ </a>