{
  "markdown": "<div align=\"center\">\n\n<img src=\"docs/images/data-studio-agent.svg\" width=\"96\" height=\"96\" alt=\"Data Studio Agent logo\" />\n\n# Data Studio Agent\n\n**Let your AI coding agent securely access all your databases, in plain language.**\n\n**Local-first. Enterprise-grade security. Open source.**\n\n[![Release](https://img.shields.io/github/v/release/geek-fun/data-studio-agent?color=orange&label=release&logo=github)](https://github.com/geek-fun/data-studio-agent/releases)\n[![Downloads](https://img.shields.io/github/downloads/geek-fun/data-studio-agent/total?color=orange&logo=docusign)](https://github.com/geek-fun/data-studio-agent/releases)\n[![npm](https://img.shields.io/npm/dt/@geek-fun/data-studio-mcp?color=orange&logo=npm)](https://www.npmjs.com/package/@geek-fun/data-studio-mcp)\n[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg&logo=apache)](LICENSE)\n[![Stars](https://img.shields.io/github/stars/geek-fun/data-studio-agent&logo=github)](https://github.com/geek-fun/data-studio-agent/stargazers)\n[![CI](https://github.com/geek-fun/data-studio-agent/actions/workflows/ci.yml/badge.svg)](https://github.com/geek-fun/data-studio-agent/actions/workflows/ci.yml)\n\n<p>\n  <img src=\"https://img.shields.io/badge/SQL-70%2B%20databases%20via%20SqlKit-336791\"/>\n  <img src=\"https://img.shields.io/badge/NoSQL-Elasticsearch%20%7C%20OpenSearch%20%7C%20MongoDB%20%7C%20DynamoDB-47A248\"/>\n  <img src=\"https://img.shields.io/badge/MCP-000000&logo=modelcontextprotocol&logoColor=white\"/>\n  <img src=\"https://img.shields.io/badge/Claude%20Code%20%7C%20Cursor%20%7C%20OpenCode%20%7C%20Codex%20%7C%20Cline-7C3AED\"/>\n</p>\n\n<p align=\"center\">\n  <img src=\"docs/images/data-studio-terminal.gif\" alt=\"Ask your database in plain language — live demo\" width=\"720\"/>\n</p>\n\n[📖 Product Page](https://www.geekfun.club/products/data-studio-agent/) · [npm](https://www.npmjs.com/package/@geek-fun/data-studio-mcp) · [dockit](https://github.com/geek-fun/dockit) · [sqlkit](https://github.com/geek-fun/sqlkit) · [Releases](https://github.com/geek-fun/data-studio-agent/releases)\n\nEnglish · [简体中文](README_zh.md)\n\n</div>\n\n---\n\nThis repository contains the **Data Studio MCP Server**, a [Model Context Protocol](https://modelcontextprotocol.io/) server that gives AI coding agents direct access to your databases through the [dockit](https://github.com/geek-fun/dockit) and [sqlkit](https://github.com/geek-fun/sqlkit) desktop apps.\n\n- **SQL** (via sqlkit): **70+ databases** (PostgreSQL, MySQL, SQL Server, Oracle, SQLite, DuckDB, ClickHouse, Snowflake, BigQuery, and more)\n- **NoSQL** (via dockit): Elasticsearch, OpenSearch, MongoDB, DynamoDB\n\n## Features\n\n- **Any AI coding agent.** Claude Code, Cursor, Windsurf, OpenCode, Codex, Cline, Pi, Qoder, GitHub Copilot, or any MCP client.\n- **Any OS.** macOS, Windows, Linux.\n- **Any LLM model.** Bring your own provider. No lock-in.\n- **One MCP server, one config.** Routes to both SqlKit (SQL) and DocKit (NoSQL) bridges over localhost.\n- **Enterprise-grade security.** See below.\n\n## Quick start\n\n### 1. Prerequisites\n\nInstall and launch [dockit](https://github.com/geek-fun/dockit) and/or [sqlkit](https://github.com/geek-fun/sqlkit), add a database connection, and make sure **Settings → MCP Bridge → Auto-start** is enabled (it is by default). Install both apps for the full SQL + NoSQL tool set.\n\n### 2. Install the MCP server\n\n```bash\nnpm install -g @geek-fun/data-studio-mcp\n```\n\nOr run it without installing (npx downloads it on first run):\n\n```bash\nnpx -y @geek-fun/data-studio-mcp\n```\n\n### 3. Add it to your AI tool\n\n**OpenAI Codex**, one command:\n\n```bash\ncodex mcp add data-studio -- npx -y @geek-fun/data-studio-mcp\n```\n\n**Claude Code**, one command:\n\n```bash\nclaude mcp add --transport stdio data-studio -- npx -y @geek-fun/data-studio-mcp\n```\n\n**Cursor.** Create `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):\n\n```json\n{\n  \"mcpServers\": {\n    \"data-studio\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@geek-fun/data-studio-mcp\"]\n    }\n  }\n}\n```\n\n**Windsurf.** Create `~/.codeium/windsurf/mcp_config.json` (global only):\n\n```json\n{\n  \"mcpServers\": {\n    \"data-studio\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@geek-fun/data-studio-mcp\"]\n    }\n  }\n}\n```\n\n**OpenCode.** Add to `opencode.json` (project) or `~/.config/opencode/opencode.json` (global):\n\n```json\n{\n  \"$schema\": \"https://opencode.ai/config.json\",\n  \"mcp\": {\n    \"data-studio\": {\n      \"type\": \"local\",\n      \"command\": [\"npx\", \"-y\", \"@geek-fun/data-studio-mcp\"],\n      \"enabled\": true\n    }\n  }\n}\n```\n\n**Any other MCP client.** Register a stdio server with command `npx` and args `-y @geek-fun/data-studio-mcp`.\n\n### 4. Tune permissions (optional)\n\nOpen **Settings → MCP Bridge** in dockit/sqlkit to control what the agent can do:\n\n| Permission mode | What the agent can do |\n|---|---|\n| **Read Only** (default) | Explore schemas, run SELECT queries. No writes. |\n| **Data Read/Write** | INSERT, UPDATE, index operations. No deletes/drops. |\n| **Full Access** | Everything, including DELETE, DROP, TRUNCATE. |\n\n### 5. Start asking\n\nUse plain language. The agent queries your databases for you:\n\n- \"List all tables in my PostgreSQL database\"\n- \"Show me the last 10 orders from the Elasticsearch index `orders*`\"\n- \"Find all users older than 30 in MongoDB\"\n- \"Run this query and explain the results\"\n\nThe agent reads schemas, runs queries, and explores your data, then shows you every query it executed.\n\n## Enterprise-grade security\n\nThe LLM gets broad access to your data, but it never sees your credentials. The policy model gates every capability by risk level.\n\n- **Credentials never leave the apps.** The LLM only ever sees an opaque `connection_id`. Real credentials are resolved inside dockit/sqlkit and never cross the MCP boundary. Your passwords and keys stay on your machine, in your app.\n- **ID-based resource access.** Agents access databases strictly by connection ID. Credentials never appear in prompts or tool arguments, so there is no path for the model to obtain or exfiltrate connection secrets.\n- **Three-tier permission model.** Read Only / Data Read-Write / Full Access modes gate every capability by risk level, with per-connection overrides. You can mark any connection read-only or allowlist specific actions.\n- **Explicit user confirmation.** Destructive operations (DELETE, DROP, TRUNCATE) surface as `Ask` in the policy. The client prompts the user for explicit confirmation before anything destructive runs.\n- **Action-level statement classification.** SQL is parsed and classified by statement kind (Read / Write / Delete / DDL) before execution. Write-only tools reject DELETE statements; delete tools reject DDL.\n- **Local-only bridge.** The bridge binds to `127.0.0.1` exclusively. It is unreachable from other machines, with no server to host and no API keys to manage.\n\n## Tools\n\nAll tools follow the `data_studio__{backend}__{action}` convention. The **User confirmation** column shows which operations surface an explicit confirmation prompt in your AI client before they run.\n\n| Tool | Backend | Risk | Requires permission | User confirmation |\n|---|---|---|---|---|\n| `data_studio__list_connections` | Server | 🟢 Safe | Read Only | No |\n| `data_studio__get_status` | Server | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__list_databases` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__list_schemas` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__list_tables` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__get_schema` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__describe_table` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__explain_query` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__list_indexes` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__list_foreign_keys` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__list_views` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__list_procedures` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__list_functions` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__list_triggers` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__get_table_info` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__get_foreign_keys` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__list_sessions` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__get_slow_queries` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__list_connections` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__execute_query` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__get_object_ddl` | sqlkit | 🟢 Safe | Read Only | No |\n| `data_studio__sqlkit__execute_write` | sqlkit | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__sqlkit__kill_session` | sqlkit | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__sqlkit__grant_privilege` | sqlkit | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__sqlkit__revoke_privilege` | sqlkit | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__sqlkit__execute_delete` | sqlkit | 🔴 Destructive | Full Access | Yes |\n| `data_studio__sqlkit__execute_ddl` | sqlkit | 🔴 Destructive | Full Access | Yes |\n| `data_studio__es__search` | dockit · Elasticsearch | 🟢 Safe | Read Only | No |\n| `data_studio__es__get_document` | dockit · Elasticsearch | 🟢 Safe | Read Only | No |\n| `data_studio__es__cat_indices` | dockit · Elasticsearch | 🟢 Safe | Read Only | No |\n| `data_studio__es__get_mapping` | dockit · Elasticsearch | 🟢 Safe | Read Only | No |\n| `data_studio__es__cat_aliases` | dockit · Elasticsearch | 🟢 Safe | Read Only | No |\n| `data_studio__es__get_alias` | dockit · Elasticsearch | 🟢 Safe | Read Only | No |\n| `data_studio__es__count` | dockit · Elasticsearch | 🟢 Safe | Read Only | No |\n| `data_studio__es__cluster_health` | dockit · Elasticsearch | 🟢 Safe | Read Only | No |\n| `data_studio__es__cat_nodes` | dockit · Elasticsearch | 🟢 Safe | Read Only | No |\n| `data_studio__es__cat_shards` | dockit · Elasticsearch | 🟢 Safe | Read Only | No |\n| `data_studio__es__list_snapshots` | dockit · Elasticsearch | 🟢 Safe | Read Only | No |\n| `data_studio__es__index_document` | dockit · Elasticsearch | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__es__update_document` | dockit · Elasticsearch | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__es__create_index` | dockit · Elasticsearch | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__es__put_mapping` | dockit · Elasticsearch | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__es__put_alias` | dockit · Elasticsearch | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__es__update_aliases` | dockit · Elasticsearch | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__es__bulk` | dockit · Elasticsearch | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__es__reindex` | dockit · Elasticsearch | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__es__restore_snapshot` | dockit · Elasticsearch | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__es__delete_document` | dockit · Elasticsearch | 🔴 Destructive | Full Access | Yes |\n| `data_studio__es__delete_by_query` | dockit · Elasticsearch | 🔴 Destructive | Full Access | Yes |\n| `data_studio__es__delete_index` | dockit · Elasticsearch | 🔴 Destructive | Full Access | Yes |\n| `data_studio__es__delete_alias` | dockit · Elasticsearch | 🔴 Destructive | Full Access | Yes |\n| `data_studio__mongo__list_databases` | dockit · MongoDB | 🟢 Safe | Read Only | No |\n| `data_studio__mongo__list_collections` | dockit · MongoDB | 🟢 Safe | Read Only | No |\n| `data_studio__mongo__find` | dockit · MongoDB | 🟢 Safe | Read Only | No |\n| `data_studio__mongo__collection_stats` | dockit · MongoDB | 🟢 Safe | Read Only | No |\n| `data_studio__mongo__database_stats` | dockit · MongoDB | 🟢 Safe | Read Only | No |\n| `data_studio__mongo__server_status` | dockit · MongoDB | 🟢 Safe | Read Only | No |\n| `data_studio__mongo__repl_set_status` | dockit · MongoDB | 🟢 Safe | Read Only | No |\n| `data_studio__mongo__shard_status` | dockit · MongoDB | 🟢 Safe | Read Only | No |\n| `data_studio__mongo__count_documents` | dockit · MongoDB | 🟢 Safe | Read Only | No |\n| `data_studio__mongo__list_indexes` | dockit · MongoDB | 🟢 Safe | Read Only | No |\n| `data_studio__mongo__sample_documents` | dockit · MongoDB | 🟢 Safe | Read Only | No |\n| `data_studio__mongo__distinct` | dockit · MongoDB | 🟢 Safe | Read Only | No |\n| `data_studio__mongo__get_slow_queries` | dockit · MongoDB | 🟢 Safe | Read Only | No |\n| `data_studio__mongo__list_users` | dockit · MongoDB | 🟢 Safe | Read Only | No |\n| `data_studio__mongo__aggregate` | dockit · MongoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__mongo__insert_one` | dockit · MongoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__mongo__update_many` | dockit · MongoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__mongo__create_database` | dockit · MongoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__mongo__create_collection` | dockit · MongoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__mongo__update_document` | dockit · MongoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__mongo__rename_collection` | dockit · MongoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__mongo__clone_collection` | dockit · MongoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__mongo__create_index` | dockit · MongoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__mongo__drop_index` | dockit · MongoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__mongo__insert_many` | dockit · MongoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__mongo__find_one_and_update` | dockit · MongoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__mongo__bulk_write` | dockit · MongoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__mongo__delete_many` | dockit · MongoDB | 🔴 Destructive | Full Access | Yes |\n| `data_studio__mongo__drop_database` | dockit · MongoDB | 🔴 Destructive | Full Access | Yes |\n| `data_studio__mongo__drop_collection` | dockit · MongoDB | 🔴 Destructive | Full Access | Yes |\n| `data_studio__mongo__delete_document` | dockit · MongoDB | 🔴 Destructive | Full Access | Yes |\n| `data_studio__mongo__truncate_collection` | dockit · MongoDB | 🔴 Destructive | Full Access | Yes |\n| `data_studio__dynamo__execute_query` | dockit · DynamoDB | 🟢 Safe | Read Only | No |\n| `data_studio__dynamo__describe_table` | dockit · DynamoDB | 🟢 Safe | Read Only | No |\n| `data_studio__dynamo__list_tables` | dockit · DynamoDB | 🟢 Safe | Read Only | No |\n| `data_studio__dynamo__query_table` | dockit · DynamoDB | 🟢 Safe | Read Only | No |\n| `data_studio__dynamo__scan_table` | dockit · DynamoDB | 🟢 Safe | Read Only | No |\n| `data_studio__dynamo__batch_get_items` | dockit · DynamoDB | 🟢 Safe | Read Only | No |\n| `data_studio__dynamo__describe_continuous_backups` | dockit · DynamoDB | 🟢 Safe | Read Only | No |\n| `data_studio__dynamo__describe_ttl` | dockit · DynamoDB | 🟢 Safe | Read Only | No |\n| `data_studio__dynamo__get_table_metrics` | dockit · DynamoDB | 🟢 Safe | Read Only | No |\n| `data_studio__dynamo__list_backups` | dockit · DynamoDB | 🟢 Safe | Read Only | No |\n| `data_studio__dynamo__describe_backup` | dockit · DynamoDB | 🟢 Safe | Read Only | No |\n| `data_studio__dynamo__describe_limits` | dockit · DynamoDB | 🟢 Safe | Read Only | No |\n| `data_studio__dynamo__list_tags` | dockit · DynamoDB | 🟢 Safe | Read Only | No |\n| `data_studio__dynamo__execute_write` | dockit · DynamoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__dynamo__create_item` | dockit · DynamoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__dynamo__batch_write_items` | dockit · DynamoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__dynamo__update_item` | dockit · DynamoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__dynamo__transact_write_items` | dockit · DynamoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__dynamo__create_gsi` | dockit · DynamoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__dynamo__update_gsi` | dockit · DynamoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__dynamo__create_table` | dockit · DynamoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__dynamo__update_table_config` | dockit · DynamoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__dynamo__update_ttl` | dockit · DynamoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__dynamo__update_pitr` | dockit · DynamoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__dynamo__update_streams` | dockit · DynamoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__dynamo__restore_table` | dockit · DynamoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__dynamo__create_backup` | dockit · DynamoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__dynamo__tag_resource` | dockit · DynamoDB | 🟡 Elevated | Data Read-Write | No |\n| `data_studio__dynamo__execute_delete` | dockit · DynamoDB | 🔴 Destructive | Full Access | Yes |\n| `data_studio__dynamo__delete_item` | dockit · DynamoDB | 🔴 Destructive | Full Access | Yes |\n| `data_studio__dynamo__delete_gsi` | dockit · DynamoDB | 🔴 Destructive | Full Access | Yes |\n| `data_studio__dynamo__delete_table` | dockit · DynamoDB | 🔴 Destructive | Full Access | Yes |\n| `data_studio__dynamo__truncate_table` | dockit · DynamoDB | 🔴 Destructive | Full Access | Yes |\n**116 tools total.** Read-only operations run automatically under **Read Only** mode. Elevated operations (writes, index/schema changes) require **Data Read-Write**. Destructive operations (DELETE, DROP, TRUNCATE) require **Full Access** and always surface an explicit **user confirmation** prompt.\n\n## How it works\n\n```\ncode agent (Claude Code / Cursor / OpenCode ...)\n    |\n    | MCP stdio protocol\n    v\n@geek-fun/data-studio-mcp   ← npm package (pure TypeScript)\n    |\n    | HTTP (localhost)\n    +----------------+----------------+\n    v                v                |\ndockit:9120    sqlkit:9121            |\n(NoSQL bridge)  (SQL bridge)          |\n    |                |                |\n    v                v                |\nElasticsearch    PostgreSQL           |\nMongoDB          MySQL                |\nDynamoDB         SQL Server           |\nOpenSearch       SQLite               |\n```\n\nThe MCP server is a thin routing layer. All database drivers, SSH tunnels, and connection management live in the desktop apps, which expose a local HTTP bridge (`127.0.0.1` only). The MCP server auto-discovers running backends via each app's port file.\n\n---\n\n## For developers\n\nThis repository also contains the **data-studio-agent Rust framework**, the shared AI agent loop (provider adapters, streaming, tool calling, context compaction) that powers the built-in assistants in [dockit](https://github.com/geek-fun/dockit) and [sqlkit](https://github.com/geek-fun/sqlkit).\n\nSee [crates/data-studio-agent/README.md](crates/data-studio-agent/README.md) for installation, architecture, and integration guides.\n\n## License\n\nApache 2.0. See [LICENSE](LICENSE).\n",
  "bytes": 19215,
  "sha": "ccd338ba328c82fd442ee7b5c1e0693ff10be52cffaba46e28e5b341bf28e449",
  "repo_slug": "geek-fun/data-studio-agent",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_geek_fun_data_studio_4f3cf810/readme"
}