fix(mcp): document portable data directory
This commit is contained in:
parent
1499008ba8
commit
c2b687b271
|
|
@ -156,6 +156,8 @@ Add to your `.mcp.json`:
|
|||
}
|
||||
```
|
||||
|
||||
Windows portable builds need `DBX_DATA_DIR` in the MCP config, pointing to the `data` directory next to `DBX.exe` (the folder that contains `dbx.db`).
|
||||
|
||||
Works with Claude Code, Cursor, Windsurf, and any MCP-compatible agent. Supports listing connections, browsing tables, executing SQL, and opening tables directly in DBX's UI.
|
||||
|
||||
DBX also provides a dedicated CLI package for terminal, script, and Codex workflows:
|
||||
|
|
|
|||
|
|
@ -157,6 +157,8 @@ npx @dbx-app/mcp-server
|
|||
}
|
||||
```
|
||||
|
||||
Windows 便携版需要在 MCP 配置中设置 `DBX_DATA_DIR`,指向 `DBX.exe` 同级的 `data` 目录(即包含 `dbx.db` 的文件夹)。
|
||||
|
||||
支持 Claude Code、Cursor、Windsurf 等 MCP 兼容的 AI 助手。可列出连接、浏览表、执行 SQL,还能直接在 DBX 界面中打开表。
|
||||
|
||||
DBX 也提供独立 CLI 包,适合终端、脚本和 Codex 工作流:
|
||||
|
|
|
|||
|
|
@ -44,6 +44,22 @@ AI 助手 → MCP Server → 你的数据库 → 返回结果
|
|||
}
|
||||
```
|
||||
|
||||
Windows 便携版需要额外设置 `DBX_DATA_DIR`,指向 `DBX.exe` 同级的 `data` 目录:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"dbx": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "@dbx-app/mcp-server"],
|
||||
"env": {
|
||||
"DBX_DATA_DIR": "D:\\DBX_x64-portable\\data"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</Step>
|
||||
<Step>
|
||||
### 开始使用
|
||||
|
|
@ -205,6 +221,8 @@ MCP Server 从 DBX 的 SQLite 数据库读取连接信息:
|
|||
| Linux | `~/.local/share/com.dbx.app/dbx.db` |
|
||||
| Windows | `%APPDATA%\com.dbx.app\dbx.db` |
|
||||
|
||||
Windows 便携版的数据通常在 `DBX.exe` 同级的 `data\dbx.db`。如果 MCP 列出的连接不是当前 DBX 中的最新连接,请在 MCP 配置中设置 `DBX_DATA_DIR`,值为包含 `dbx.db` 的 `data` 文件夹,例如 `D:\DBX_x64-portable\data`。不要手工复制 `dbx.db` 到默认目录,否则两个连接库会分叉。
|
||||
|
||||
### UI 联动
|
||||
|
||||
`dbx_open_table` 和 `dbx_execute_and_show` 通过本地 HTTP 接口与运行中的 DBX 应用通信:
|
||||
|
|
|
|||
|
|
@ -44,6 +44,22 @@ AI Agent → MCP Server → Your Database → Results
|
|||
}
|
||||
```
|
||||
|
||||
Windows portable builds need `DBX_DATA_DIR` set to the `data` directory next to `DBX.exe`:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"dbx": {
|
||||
"command": "npx",
|
||||
"args": ["-y", "@dbx-app/mcp-server"],
|
||||
"env": {
|
||||
"DBX_DATA_DIR": "D:\\DBX_x64-portable\\data"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</Step>
|
||||
<Step>
|
||||
### Start Using
|
||||
|
|
@ -205,6 +221,8 @@ The MCP Server reads DBX's SQLite database:
|
|||
| Linux | `~/.local/share/com.dbx.app/dbx.db` |
|
||||
| Windows | `%APPDATA%\com.dbx.app\dbx.db` |
|
||||
|
||||
Windows portable builds usually store data in `data\dbx.db` next to `DBX.exe`. If MCP lists older connections than the running DBX app, set `DBX_DATA_DIR` in the MCP config to the `data` folder that contains `dbx.db`, for example `D:\DBX_x64-portable\data`. Do not copy `dbx.db` into the default directory, because that creates two diverging connection stores.
|
||||
|
||||
### UI Integration
|
||||
|
||||
`dbx_open_table` and `dbx_execute_and_show` communicate with the running DBX app via a local HTTP interface:
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ Configure `.mcp.json` to let AI agents query databases through DBX connections:
|
|||
}
|
||||
}
|
||||
```
|
||||
For Windows portable builds, set DBX_DATA_DIR to the portable data directory that contains dbx.db, for example D:\DBX_x64-portable\data.
|
||||
|
||||
## Key Links
|
||||
- Documentation: https://dbxio.com/en/docs/what-is-dbx
|
||||
|
|
|
|||
|
|
@ -41,6 +41,21 @@ Add to your project's `.mcp.json`:
|
|||
}
|
||||
```
|
||||
|
||||
For Windows portable builds, set `DBX_DATA_DIR` to the portable data directory that contains `dbx.db`:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"dbx": {
|
||||
"command": "dbx-mcp-server",
|
||||
"env": {
|
||||
"DBX_DATA_DIR": "D:\\DBX_x64-portable\\data"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Or for development (from source):
|
||||
|
||||
```json
|
||||
|
|
@ -123,6 +138,8 @@ The MCP server reads your database connections from DBX's SQLite database:
|
|||
- **Linux**: `~/.local/share/com.dbx.app/dbx.db`
|
||||
- **Windows**: `%APPDATA%\com.dbx.app\dbx.db`
|
||||
|
||||
Windows portable builds store data next to `DBX.exe`, usually in `data\dbx.db`. Set `DBX_DATA_DIR` to that `data` folder instead of copying `dbx.db` into the default directory.
|
||||
|
||||
## DBX UI Integration
|
||||
|
||||
The `dbx_open_table` tool communicates with the running DBX app to open tables directly in the UI. This requires DBX to be running. If DBX is not running, the tool will return an error message.
|
||||
|
|
@ -181,6 +198,21 @@ npx @dbx-app/mcp-server
|
|||
}
|
||||
```
|
||||
|
||||
Windows 便携版需要在 MCP 配置中设置 `DBX_DATA_DIR`,指向包含 `dbx.db` 的便携版数据目录:
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"dbx": {
|
||||
"command": "dbx-mcp-server",
|
||||
"env": {
|
||||
"DBX_DATA_DIR": "D:\\DBX_x64-portable\\data"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### 3. 使用
|
||||
|
||||
在 Claude Code 中直接说:
|
||||
|
|
@ -243,6 +275,8 @@ MCP Server 从 DBX 的 SQLite 数据库读取连接信息:
|
|||
- **Linux**: `~/.local/share/com.dbx.app/dbx.db`
|
||||
- **Windows**: `%APPDATA%\com.dbx.app\dbx.db`
|
||||
|
||||
Windows 便携版的数据通常在 `DBX.exe` 同级的 `data\dbx.db`。请把 `DBX_DATA_DIR` 设置为这个 `data` 文件夹,不要手工复制 `dbx.db` 到默认目录。
|
||||
|
||||
### DBX UI 联动
|
||||
|
||||
`dbx_open_table` 工具通过本地 HTTP 接口与运行中的 DBX 应用通信,直接在 UI 中打开表。需要 DBX 正在运行。
|
||||
|
|
|
|||
Loading…
Reference in New Issue