Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/data-studio/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions external_plugins/data-studio/.mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"mcpServers": {
"data-studio": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@geek-fun/data-studio-mcp@0.1.12"
],
"enabled": true,
"timeoutMs": 60000
}
}
}
25 changes: 25 additions & 0 deletions external_plugins/data-studio/.zcode-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "data-studio",
"version": "0.1.12",
"description": "Secure database access for AI agents via the data_studio__* MCP tools: 70+ SQL databases through SqlKit, Elasticsearch/OpenSearch/MongoDB/DynamoDB through DocKit. Credentials never leave your desktop apps.",
"description_i18n": {
"en": "Secure database access for AI agents via the data_studio__* MCP tools: 70+ SQL databases through SqlKit, Elasticsearch/OpenSearch/MongoDB/DynamoDB through DocKit. Credentials never leave your desktop apps.",
"zh-CN": "让 AI 编码助手通过 data_studio__* MCP 工具安全访问数据库:经 SqlKit 支持 70+ 种 SQL 数据库,经 DocKit 支持 Elasticsearch/OpenSearch/MongoDB/DynamoDB。凭据永不离开桌面应用。"
},
"author": {
"name": "GeekFun",
"url": "https://github.com/geek-fun"
},
"homepage": "https://www.geekfun.club/products/data-studio-agent/",
"repository": "https://github.com/geek-fun/data-studio-agent",
"license": "Apache-2.0",
"keywords": [
"database",
"sql",
"nosql",
"elasticsearch",
"mongodb",
"dynamodb",
"mcp"
]
}
37 changes: 37 additions & 0 deletions external_plugins/data-studio/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Data Studio — ZCode Plugin

**Let your AI coding agent securely access all your databases, in plain language.**

A ZCode plugin that bundles the [Data Studio MCP server](https://www.npmjs.com/package/@geek-fun/data-studio-mcp) (`data_studio__*` tools, 117 total) with agent usage guidance.

- **SQL** (via [sqlkit](https://github.com/geek-fun/sqlkit)): 70+ databases (PostgreSQL, MySQL, SQL Server, Oracle, SQLite, DuckDB, ClickHouse, Snowflake, BigQuery, and more).
- **NoSQL** (via [dockit](https://github.com/geek-fun/dockit)): Elasticsearch, OpenSearch, MongoDB, DynamoDB.

简体中文说明见 [README_CN.md](README_CN.md)。

## Prerequisites

1. Install and launch [dockit](https://github.com/geek-fun/dockit) and/or [sqlkit](https://github.com/geek-fun/sqlkit); add a database connection.
2. Keep **Settings → MCP Bridge → Auto-start** enabled in the desktop apps (on by default).
3. Node.js ≥ 18 on PATH (the MCP server is started via `npx -y @geek-fun/data-studio-mcp@0.1.12`).

## Disclosure

| Item | Detail |
|---|---|
| MCP server | One stdio server: `npx -y @geek-fun/data-studio-mcp@0.1.12` (npm package `@geek-fun/data-studio-mcp`) |
| Network access | `127.0.0.1` only: talks to the dockit/sqlkit local bridges (ports 9120/9121). npm registry access during the first `npx` download. No other endpoints; no telemetry. |
| Credentials | Never collected, stored, or transmitted. The LLM only sees opaque `connection_id`s; real credentials are resolved inside the desktop apps. |
| Command execution | Spawns the MCP server process (Node.js). No shell scripts, no hooks. |
| File writes | None by the plugin itself. |
| External services | None. |

## Security model

- Credentials never leave the desktop apps: tools accept `connection_id` only.
- Three-tier permissions, configured in dockit/sqlkit: Read Only / Data Read-Write / Full Access.
- Destructive operations (DELETE, DROP, TRUNCATE) always surface an explicit confirmation prompt in the client.

## License

Apache 2.0. See [LICENSE](../../LICENSE) in the repository root.
37 changes: 37 additions & 0 deletions external_plugins/data-studio/README_CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Data Studio — ZCode 插件

**让 AI 编码助手用自然语言安全地访问你的所有数据库。**

本插件打包了 [Data Studio MCP server](https://www.npmjs.com/package/@geek-fun/data-studio-mcp)(117 个 `data_studio__*` 工具)与 agent 使用指引。

- **SQL**(经 [sqlkit](https://github.com/geek-fun/sqlkit)):70+ 种数据库(PostgreSQL、MySQL、SQL Server、Oracle、SQLite、DuckDB、ClickHouse、Snowflake、BigQuery 等)。
- **NoSQL**(经 [dockit](https://github.com/geek-fun/dockit)):Elasticsearch、OpenSearch、MongoDB、DynamoDB。

English documentation in [README.md](README.md)。

## 前置条件

1. 安装并启动 [dockit](https://github.com/geek-fun/dockit) 和/或 [sqlkit](https://github.com/geek-fun/sqlkit),并添加数据库连接。
2. 保持桌面应用 **Settings → MCP Bridge → Auto-start** 开启(默认开启)。
3. PATH 中需有 Node.js ≥ 18(MCP server 通过 `npx -y @geek-fun/data-studio-mcp@0.1.12` 启动)。

## 披露信息

| 项目 | 说明 |
|---|---|
| MCP server | 一个 stdio server:`npx -y @geek-fun/data-studio-mcp@0.1.12`(npm 包 `@geek-fun/data-studio-mcp`) |
| 网络访问 | 仅 `127.0.0.1`,与 dockit/sqlkit 本地 bridge 通信(端口 9120/9121);首次 `npx` 下载会访问 npm registry;无其他端点,无遥测 |
| 凭据 | 不收集、不存储、不传输;LLM 只能看到不透明的 `connection_id`,真实凭据在桌面应用内部解析 |
| 命令执行 | 仅启动 MCP server 进程(Node.js);无 shell 脚本,无 hooks |
| 文件写入 | 插件本身不写入任何文件 |
| 外部服务 | 无 |

## 安全模型

- 凭据永不离开桌面应用:工具只接受 `connection_id`。
- 三级权限,在 dockit/sqlkit 中配置:Read Only / Data Read-Write / Full Access。
- 破坏性操作(DELETE、DROP、TRUNCATE)始终在客户端弹出显式确认。

## 许可证

Apache 2.0,见仓库根目录 [LICENSE](../../LICENSE)。
52 changes: 52 additions & 0 deletions external_plugins/data-studio/skills/data-studio/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
name: data-studio
description: >-
Query and explore the user's databases through the data_studio__* MCP tools:
70+ SQL databases (PostgreSQL, MySQL, SQL Server, Oracle, SQLite, DuckDB,
ClickHouse, Snowflake and more) via SqlKit, plus Elasticsearch, OpenSearch,
MongoDB and DynamoDB via DocKit. Use when the user asks to list tables or
schemas, run SQL or queries, inspect indexes/mappings/collections, analyze or
visualize stored data, troubleshoot slow queries, or mentions
数据库/查询/表结构/索引/集合. Credentials stay inside the desktop apps; tools
take a connection_id only. Requires dockit and/or sqlkit running locally with
the MCP bridge enabled.
---

# Data Studio

MCP tools prefixed `data_studio__*` route to the user's local [dockit](https://github.com/geek-fun/dockit) (NoSQL) and [sqlkit](https://github.com/geek-fun/sqlkit) (SQL) desktop apps over a localhost-only bridge (127.0.0.1). This skill explains how to use them well.

## Prerequisites

- dockit and/or sqlkit installed and running, with at least one database connection added.
- **Settings → MCP Bridge → Auto-start** enabled in the desktop apps (on by default).

If tools fail to connect, tell the user to launch the desktop apps and check Settings → MCP Bridge. Never ask the user for credentials: real credentials are resolved inside the apps, and tools only ever accept an opaque `connection_id`.

## Workflow

1. Start with `data_studio__list_connections` (or `data_studio__get_status`) to discover running backends and connection IDs. These two tools have no app segment; all others are four-segment names.
2. Route by app + backend; tool names follow `data_studio__{app}__{backend}__{action}`:
- SQL databases: `data_studio__sqlkit__sqlkit__*` (e.g. `data_studio__sqlkit__sqlkit__execute_query`)
- Elasticsearch/OpenSearch: `data_studio__dockit__es__*`
- MongoDB: `data_studio__dockit__mongo__*`
- DynamoDB: `data_studio__dockit__dynamo__*`
3. Explore before querying: `list_databases` → `list_tables` / `cat_indices` / `list_collections` → `describe_table` / `get_mapping` → then `execute_query` / `search` / `find`.
4. Reference connections strictly by a `connection_id` returned by the listing tools; never fabricate IDs.
5. Show the user every statement executed, with row/record counts and a short interpretation.

## Permission tiers

| Tier | Examples | Behavior |
|---|---|---|
| Safe (Read Only) | schema reads, `execute_query`, `search`, `find` | run freely under the default Read Only mode |
| Elevated | `execute_write`, index/mapping/alias changes, `insert_*`, `update_*` | allowed only when the app is in Data Read-Write mode |
| Destructive | `execute_delete`, `execute_ddl`, `drop_*`, `delete_*`, `truncate_*` | require Full Access AND explicit user confirmation in the client |

Before any destructive call, state exactly what will be deleted or dropped and wait for the user's confirmation. Never chain destructive operations into batch scripts. If a call is rejected by the policy, explain which permission mode it requires instead of retrying.

## Conventions

- The documented matrix is 117 tools; the runtime set depends on the apps' permission mode and configured connections. Prefer the most specific tool: `explain_query` for plan analysis, `get_slow_queries` for performance troubleshooting, `es__count` before broad `search` calls.
- Results are capped. Use limit/pagination arguments for large datasets instead of unbounded scans.
- Prefer read-only tools unless the user explicitly asks for changes.
74 changes: 62 additions & 12 deletions marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
"url": "https://z.ai"
},
"unlistedPlugins": [
{ "name": "openpencil", "source": "./external_plugins/openpencil" }
{
"name": "openpencil",
"source": "./external_plugins/openpencil"
}
],
"plugins": [
{
Expand Down Expand Up @@ -827,7 +830,9 @@
},
{
"name": "excalidraw",
"componentTypes": ["ui"],
"componentTypes": [
"ui"
],
"displayName": "Excalidraw",
"displayName_i18n": {
"en": "Excalidraw",
Expand All @@ -850,7 +855,9 @@
"name": "photocraft",
"icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/photocraft/icon.png",
"source": "./external_plugins/photocraft",
"componentTypes": ["ui"],
"componentTypes": [
"ui"
],
"displayName": "PhotoCraft",
"displayName_i18n": {
"en": "PhotoCraft",
Expand All @@ -877,7 +884,9 @@
"name": "vectorcraft",
"icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/vectorcraft/icon.png",
"source": "./external_plugins/vectorcraft",
"componentTypes": ["ui"],
"componentTypes": [
"ui"
],
"displayName": "VectorCraft",
"displayName_i18n": {
"en": "VectorCraft",
Expand All @@ -904,7 +913,9 @@
"name": "pdfcraft",
"icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/pdfcraft/icon.png",
"source": "./external_plugins/pdfcraft",
"componentTypes": ["ui"],
"componentTypes": [
"ui"
],
"displayName": "PdfCraft",
"displayName_i18n": {
"en": "PdfCraft",
Expand All @@ -931,7 +942,9 @@
"name": "designcraft",
"icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/designcraft/icon.png",
"source": "./external_plugins/designcraft",
"componentTypes": ["ui"],
"componentTypes": [
"ui"
],
"displayName": "DesignCraft",
"displayName_i18n": {
"en": "DesignCraft",
Expand All @@ -958,7 +971,9 @@
"name": "wordcraft",
"icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/wordcraft/icon.png",
"source": "./external_plugins/wordcraft",
"componentTypes": ["ui"],
"componentTypes": [
"ui"
],
"displayName": "WordCraft",
"displayName_i18n": {
"en": "WordCraft",
Expand All @@ -985,7 +1000,9 @@
"name": "gridcraft",
"icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/gridcraft/icon.png",
"source": "./external_plugins/gridcraft",
"componentTypes": ["ui"],
"componentTypes": [
"ui"
],
"displayName": "GridCraft",
"displayName_i18n": {
"en": "GridCraft",
Expand All @@ -1012,7 +1029,9 @@
"name": "deckcraft",
"icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/deckcraft/icon.png",
"source": "./external_plugins/deckcraft",
"componentTypes": ["ui"],
"componentTypes": [
"ui"
],
"displayName": "DeckCraft",
"displayName_i18n": {
"en": "DeckCraft",
Expand All @@ -1039,7 +1058,9 @@
"name": "cadcraft",
"icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/cadcraft/icon.png",
"source": "./external_plugins/cadcraft",
"componentTypes": ["ui"],
"componentTypes": [
"ui"
],
"displayName": "CADCraft",
"displayName_i18n": {
"en": "CADCraft",
Expand All @@ -1066,7 +1087,9 @@
"name": "soundcraft",
"icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/soundcraft/icon.png",
"source": "./external_plugins/soundcraft",
"componentTypes": ["ui"],
"componentTypes": [
"ui"
],
"displayName": "SoundCraft",
"displayName_i18n": {
"en": "SoundCraft",
Expand Down Expand Up @@ -1149,7 +1172,9 @@
},
"category": "developer-tools",
"icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/kicad/icon.png",
"componentTypes": ["ui"],
"componentTypes": [
"ui"
],
"displayName": "KiCad",
"displayName_i18n": {
"en": "KiCad",
Expand Down Expand Up @@ -1443,6 +1468,31 @@
"mcp",
"verification"
]
},
{
"name": "data-studio",
"source": "./external_plugins/data-studio",
"description": "Secure database access for AI agents via the data_studio__* MCP tools: 70+ SQL databases through SqlKit, Elasticsearch/OpenSearch/MongoDB/DynamoDB through DocKit. Credentials never leave your desktop apps.",
"description_i18n": {
"en": "Secure database access for AI agents via the data_studio__* MCP tools: 70+ SQL databases through SqlKit, Elasticsearch/OpenSearch/MongoDB/DynamoDB through DocKit. Credentials never leave your desktop apps.",
"zh-CN": "让 AI 编码助手通过 data_studio__* MCP 工具安全访问数据库:经 SqlKit 支持 70+ 种 SQL 数据库,经 DocKit 支持 Elasticsearch/OpenSearch/MongoDB/DynamoDB。凭据永不离开桌面应用。"
},
"version": "0.1.12",
"author": {
"name": "GeekFun",
"url": "https://github.com/geek-fun"
},
"category": "developer-tools",
"keywords": [
"database",
"sql",
"nosql",
"elasticsearch",
"mongodb",
"dynamodb",
"mcp"
],
"icon": "https://cdn-zcode.z.ai/zcode/official-plugin/assets/data-studio/icon.png"
}
]
}