Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Letting AI agents query my databases without ever giving them the credentials

说明与用途

AI 代理在不接收连接字符串的情况下查询数据库,使用本地 MCP 服务器进行通信,凭据保存在 IDE 的安全存储中,并要求人工批准写操作。

问题

AI agents need database access but storing credentials in the agent’s config exposes passwords in plain text.

结果

Credentials stay secure in the IDE; agents can query databases with human‑in‑the‑loop approval, reducing risk of accidental data modification.

工作流

  • 1. Agent connects to the local MCP server over STDIO on loopback.
  • 2. Agent requests schema or table information via MCP calls (e.g., getSchemaSummary).
  • 3. Agent proposes SQL edits; the IDE shows a diff and requires user approval.
  • 4. Upon approval, the IDE executes the SQL, displaying the connection and query, and runs only after explicit consent that expires after 120 s.
  • 5. Results are limited to 100 rows (max 1,000) and 256 KiB per response.

证据

The IDE already holds my connections (passwords live in the OS keyring). It also runs a local MCP server, so the agent talks to the IDE, not to the database.

来源

Writes are never automatic. proposeSqlEdit shows a before/after diff in the desktop. executeSql shows the connection and the exact SQL, and runs only after I approve; the approval is bound to that request and expires after 120 s.

来源

Results are bounded (default 100 rows, max 1,000, 256 KiB per response).

来源

  • 记录日期: 2026-10-20T01:41:10.928Z