@dbx-app/mcp-server 0.4.96 → 0.4.98

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 (3) hide show
  1. package/README.md +38 -2
  2. package/package.json +7 -7
  3. package/server.json +2 -2
package/README.md CHANGED
@@ -157,6 +157,9 @@ Ask the MCP client to:
157
157
  | `dbx_open_session` | Open a stateful SQL query session pinned to one backend connection |
158
158
  | `dbx_close_session` | Close a session and release its pinned connection resources |
159
159
  | `dbx_execute_redis_command` | Execute a Redis command |
160
+ | `dbx_salesforce_current_user` | Show the Salesforce user and org behind a connection, including the "Modify All Data" flag |
161
+ | `dbx_salesforce_prepare_write` | Prepare one Salesforce record write and return a summary plus a single-use confirm token |
162
+ | `dbx_salesforce_apply_write` | Apply a prepared Salesforce write using its confirm token |
160
163
  | `dbx_peek_messages` | Read Kafka messages without committing consumer offsets |
161
164
  | `dbx_send_message` | Send a message to a supported message queue topic |
162
165
  | `dbx_open_table` | Open a table in the running DBX desktop application |
@@ -170,6 +173,21 @@ When connection scoping is enabled, mutating connection tools and desktop UI too
170
173
 
171
174
  `dbx_list_databases` returns only database names allowed by the selected connection's MCP database scope. `dbx_send_message` is available when message-queue support is included in the server build.
172
175
 
176
+ Salesforce connections take SOQL through `dbx_execute_query` and list objects through `dbx_list_tables`. `dbx_execute_batch` and `dbx_open_session` are refused: SOQL is read-only, and every call is a stateless REST request with no session to pin. A record write is a two-step confirmed operation — `dbx_salesforce_prepare_write` returns a summary plus a single-use `confirm_token` that expires after 5 minutes, a person approves that summary, and `dbx_salesforce_apply_write` sends exactly the prepared statement. Preparing needs the per-connection **Allow DML** switch in DBX Settings → MCP, which is off by default, and Salesforce cannot roll an applied write back.
177
+
178
+ ## Resources
179
+
180
+ Clients that support MCP Resources can read the connection catalog and expand templates for database metadata:
181
+
182
+ | Resource URI | Description |
183
+ | --- | --- |
184
+ | `dbx://connections` | Connections visible to the current MCP scope |
185
+ | `dbx://connections/{connection_id}/databases` | Databases visible through one connection |
186
+ | `dbx://connections/{connection_id}/tables{?database,schema}` | Tables and views in an optional database/schema |
187
+ | `dbx://connections/{connection_id}/table-schema{?database,schema,table}` | Column definitions for a table; `table` is required |
188
+
189
+ Resource discovery and reads reuse the corresponding Tool allowlist plus connection, group, database, and runtime scopes. Query parameter values must be URI encoded. SQL execution and all write-capable operations remain Tools.
190
+
173
191
  ## Execution Modes
174
192
 
175
193
  ### Local native mode
@@ -240,7 +258,7 @@ It listens on `http://127.0.0.1:5225/mcp` by default. Configure an HTTP-capable
240
258
 
241
259
  The default loopback address accepts only clients on the same computer. Binding to a non-loopback address requires all of the following: `DBX_MCP_HTTP_ALLOW_REMOTE=1`, the `--http-allow-remote` flag, and non-empty `DBX_MCP_HTTP_ALLOWED_HOSTS` plus `DBX_MCP_HTTP_ALLOWED_ORIGINS` allowlists. Use exact public Host authorities and browser Origins.
242
260
 
243
- DBX Web can host native Streamable HTTP on its existing listener, rather than opening a second port. Enable it with `DBX_WEB_MCP_TOKEN` (or `DBX_WEB_MCP_TOKEN_FILE`) and configure the public Host allowlist. For a container published as `4225:4224`, the endpoint is `http://localhost:4225/mcp`:
261
+ DBX Web can host native Streamable HTTP on its existing listener, rather than opening a second port. On a single password-protected Web instance, enable it in **Settings → MCP → HTTP Service** with the public Host allowlist; the generated token is encrypted in DBX's secret store and can be rotated there. For multi-instance or deployment-managed setups, set `DBX_WEB_MCP_TOKEN` (or `DBX_WEB_MCP_TOKEN_FILE`) and `DBX_WEB_MCP_ALLOWED_HOSTS` in the deployment. Deployment secrets take precedence and make the page read-only. For a container published as `4225:4224`, the endpoint is `http://localhost:4225/mcp`:
244
262
 
245
263
  ```yaml
246
264
  environment:
@@ -537,6 +555,9 @@ MCP 配置:
537
555
  | `dbx_open_session` | 为 SQL 连接打开固定后端连接的有状态查询会话 |
538
556
  | `dbx_close_session` | 关闭会话并释放固定连接资源 |
539
557
  | `dbx_execute_redis_command` | 执行 Redis 命令 |
558
+ | `dbx_salesforce_current_user` | 显示连接背后的 Salesforce 用户与组织,包括 “Modify All Data” 标志 |
559
+ | `dbx_salesforce_prepare_write` | 准备一条 Salesforce 记录写入,返回摘要和一次性确认令牌 |
560
+ | `dbx_salesforce_apply_write` | 使用确认令牌应用已准备的 Salesforce 写入 |
540
561
  | `dbx_peek_messages` | 读取 Kafka 消息,不提交消费位点 |
541
562
  | `dbx_send_message` | 向支持的消息队列 Topic 发送消息 |
542
563
  | `dbx_open_table` | 在 DBX 桌面端打开表 |
@@ -548,6 +569,21 @@ MCP 配置:
548
569
 
549
570
  `dbx_list_databases` 只返回该连接 MCP 数据库范围内允许访问的名称。`dbx_send_message` 仅在 Server 构建时包含消息队列支持时可用。
550
571
 
572
+ Salesforce 连接通过 `dbx_execute_query` 执行 SOQL,通过 `dbx_list_tables` 列出对象。`dbx_execute_batch` 与 `dbx_open_session` 会被拒绝:SOQL 只读,且每次调用都是无状态 REST 请求,没有可固定的会话。写入记录是两步确认操作——`dbx_salesforce_prepare_write` 返回摘要和一次性 `confirm_token`(5 分钟后过期),由人确认该摘要后,`dbx_salesforce_apply_write` 才会发送那条已准备好的语句。准备写入需要在 DBX 设置 → MCP 中为该连接开启 **允许 DML**(默认关闭),且 Salesforce 无法回滚已应用的写入。
573
+
574
+ ### Resources
575
+
576
+ 支持 MCP Resources 的客户端可以读取连接目录,并通过模板获取数据库元数据:
577
+
578
+ | Resource URI | 说明 |
579
+ | --- | --- |
580
+ | `dbx://connections` | 当前 MCP 范围内可见的连接 |
581
+ | `dbx://connections/{connection_id}/databases` | 指定连接中可见的数据库 |
582
+ | `dbx://connections/{connection_id}/tables{?database,schema}` | 可选数据库或 Schema 中的表和视图 |
583
+ | `dbx://connections/{connection_id}/table-schema{?database,schema,table}` | 指定表的字段定义;`table` 为必填参数 |
584
+
585
+ Resource 的发现和读取会复用对应 Tool 的白名单,以及连接、分组、数据库和运行时范围限制。查询参数值必须进行 URI 编码。SQL 执行和所有可写操作仍只通过 Tool 提供。
586
+
551
587
  ### 本地数据目录
552
588
 
553
589
  - macOS:`~/Library/Application Support/com.dbx.app/dbx.db`
@@ -598,7 +634,7 @@ DBX_MCP_HTTP_TOKEN=replace-with-a-long-random-secret dbx-mcp-server --http
598
634
 
599
635
  默认回环地址仅允许同一台电脑上的客户端访问。监听非回环地址时,必须同时设置 `DBX_MCP_HTTP_ALLOW_REMOTE=1`、传入 `--http-allow-remote`,并提供非空的 `DBX_MCP_HTTP_ALLOWED_HOSTS` 和 `DBX_MCP_HTTP_ALLOWED_ORIGINS` 白名单。Host authority 与浏览器 Origin 均应使用精确的公网值。
600
636
 
601
- DBX Web 可以通过现有 Web 监听器提供原生 Streamable HTTP,无需额外开放第二个端口。设置 `DBX_WEB_MCP_TOKEN`(或 `DBX_WEB_MCP_TOKEN_FILE`)并配置公网 Host 白名单即可启用。容器映射为 `4225:4224` 时,端点为 `http://localhost:4225/mcp`:
637
+ DBX Web 可以通过现有 Web 监听器提供原生 Streamable HTTP,无需额外开放第二个端口。单实例且启用 Web 登录密码时,可在 **设置 → MCP → HTTP 服务**配置公网 Host 白名单并启用;生成的 Token 存在加密 Secret 存储中,可在页面轮换。多实例或部署管理场景仍使用 `DBX_WEB_MCP_TOKEN`(或 `DBX_WEB_MCP_TOKEN_FILE`)和 `DBX_WEB_MCP_ALLOWED_HOSTS`;部署 Secret 优先,页面只读。容器映射为 `4225:4224` 时,端点为 `http://localhost:4225/mcp`:
602
638
 
603
639
  ```yaml
604
640
  environment:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dbx-app/mcp-server",
3
- "version": "0.4.96",
3
+ "version": "0.4.98",
4
4
  "description": "MCP server for DBX — query databases from Claude Code, Cursor, and other AI agents",
5
5
  "keywords": [
6
6
  "ai-agent",
@@ -28,12 +28,12 @@
28
28
  ],
29
29
  "type": "module",
30
30
  "optionalDependencies": {
31
- "@dbx-app/mcp-darwin-arm64": "0.4.96",
32
- "@dbx-app/mcp-darwin-x64": "0.4.96",
33
- "@dbx-app/mcp-linux-arm64-gnu": "0.4.96",
34
- "@dbx-app/mcp-linux-x64-gnu": "0.4.96",
35
- "@dbx-app/mcp-win32-arm64": "0.4.96",
36
- "@dbx-app/mcp-win32-x64": "0.4.96"
31
+ "@dbx-app/mcp-darwin-arm64": "0.4.98",
32
+ "@dbx-app/mcp-darwin-x64": "0.4.98",
33
+ "@dbx-app/mcp-linux-arm64-gnu": "0.4.98",
34
+ "@dbx-app/mcp-linux-x64-gnu": "0.4.98",
35
+ "@dbx-app/mcp-win32-arm64": "0.4.98",
36
+ "@dbx-app/mcp-win32-x64": "0.4.98"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^22.15.21",
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/t8y2/dbx",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.4.96",
9
+ "version": "0.4.98",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "@dbx-app/mcp-server",
14
- "version": "0.4.96",
14
+ "version": "0.4.98",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  }