Atlas / MCP servers / mgorabbani / AskDB

AskDBBLOCK

mcp/mgorabbani/askdb

Give AI agents safe access to your database.

Verdict
BLOCK
Grade
D
Trust score
69 /100
Exposed tools
15 13r · 2w · 0d
Transport
streamable-http
License
MIT
Stars
73
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

AskDB — Give AI agents safe access to your database.

Your database, sandboxed. Your fields, controlled. One MCP endpoint for every AI tool.

https://github.com/user-attachments/assets/baa53f34-b0b4-41ee-89b3-60d133e8004d

Install · Try Locally · Connect AI · Security · FAQ

About AskDB

AskDB is a self-hosted bridge between your MongoDB or PostgreSQL database and any AI agent that speaks MCP. It clones your production data into an isolated sandbox, lets you control exactly which fields the AI can see, and exposes a single /mcp endpoint that plugs into Claude, ChatGPT, Cursor, and anything else.

No data masking. No fake

Read from source at commit ea8ba87e8161OBSERVED · 2026-10-07
Advertisement
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add ui --env BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET} --env BETTER_AUTH_URL=${BETTER_AUTH_URL} --env ENCRYPTION_KEY=${ENCRYPTION_KEY} --env MCP_OAUTH_ACCESS_TOKEN_TTL_SECONDS=${MCP_OAUTH_ACCESS_TOKEN_TTL_SECONDS} -- npx -y @askdb/[email protected]
claude-desktop
{
  "mcpServers": {
    "ui": {
      "command": "npx",
      "args": [
        "-y",
        "@askdb/[email protected]"
      ],
      "env": {
        "BETTER_AUTH_SECRET": "${BETTER_AUTH_SECRET}",
        "BETTER_AUTH_URL": "${BETTER_AUTH_URL}",
        "ENCRYPTION_KEY": "${ENCRYPTION_KEY}",
        "MCP_OAUTH_ACCESS_TOKEN_TTL_SECONDS": "${MCP_OAUTH_ACCESS_TOKEN_TTL_SECONDS}"
      }
    }
  }
}
03

Exposed tools (15)

13 read · 2 write · 0 destructive.

ToolRiskDescription
OrdersreadCustomer orders
aggregateread
collection-schemaread
countread
coursesreadCourse catalog metadata.
distinctread
execute-typescriptwrite
findread
list-collectionsread
list-databasesread
private_notesreadInternal notes.
queryread
sample-documentsread
save-insightwrite
usersreadUser accounts and enrollment state.
04

Trust audit

BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeFAIL
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (8 observation(s))
Network
declared (11 observation(s))
Shell
declared (3 observation(s))
Dependencies
not all pinned
Secrets in source
none-found

Findings (25)

HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
packages/shared/src/db/bootstrap.ts:2
exec(sql: string): unknown;
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
MEDIUMNetwork egress · net.raw_ip · CWE-200, CWE-319
Dockerfile:86
CMD wget -qO- http://127.0.0.1:3100/api/health >/dev/null || exit 1
LOWInventory / provenance · inv.hidden_file · CWE-1104
.oxfmtrc.json
.oxfmtrc.json
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
.oxlintrc.json
.oxlintrc.json
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
packages/shared/drizzle.config.ts:8
url: process.env.DATABASE_PATH || "../../data/askdb.db",
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
packages/shared/src/adapters/mongodb/introspect.ts:2
import { db } from "../../db/index.js";
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
packages/shared/src/adapters/mongodb/introspect.ts:3
import { schemaTables, schemaColumns } from "../../db/schema.js";
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
packages/shared/src/adapters/mongodb/introspect.ts:4
import { detectPii } from "../../pii/patterns.js";
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
packages/shared/src/adapters/mongodb/relationships.ts:1
import { db } from "../../db/index.js";
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
README.md:186
TRUSTED_ORIGINS=http://localhost:3100,http://127.0.0.1:3100
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
README.md:194
Create an admin account in the dashboard, add a database connection, and try the MCP URL at `http://127.0.0.1:3100/mcp`. Local MCP clients (Claude Code / Cursor with a fixed bearer token) work; remote
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
docs/plans/self-hosted-improvements.md:113
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:3100/api/health >/dev/null || exit 1"]
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
docs/plans/self-hosted-improvements.md:256
- Any URI is not `https://...` (except `http://localhost:*` / `http://127.0.0.1:*` for local Claude Code clients)
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
cli/package.json
chalk, commander, open, ora, @types/node, tsx, typescript
Why it matters. 7 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@types/node, husky, lint-staged, oxfmt, oxlint, tsx, typescript
Why it matters. 7 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
packages/mcp-server/package.json
@modelcontextprotocol/sdk, express, mongodb, pg, quickjs-emscripten, zod, @types/better-sqlite3, @types/express
Why it matters. 13 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
packages/shared/package.json
better-sqlite3, dockerode, drizzle-orm, mongodb, pg, @types/better-sqlite3, @types/dockerode, @types/node
Why it matters. 12 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
server/package.json
@modelcontextprotocol/sdk, better-auth, cookie-parser, dotenv, express, express-rate-limit, helmet, vite
Why it matters. 14 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
docs/plans/unify-mcp-server.md:96
**`packages/mcp-server/src/token-verifier.ts`** (new file) — extract the verifier so both the router and the main server can share it:
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
docs/plans/unify-mcp-server.md:262
| Body-parser ordering breaks better-auth or the SDK's token endpoint. | Mount `/api/auth` first (raw), then `createMcpOAuthRouter()` (handles its own urlencoded internally), then `/mcp` with its own
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
docs/plans/use-internet-for-best-resilient-eagle.md:152
- `curl -X POST https://<domain>/token` 15 times quickly → last ones 429.
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
docs/plans/use-internet-for-best-resilient-eagle.md:279
for i in {1..20}; do curl -sX POST https://<domain>/token; done | tail -5  # some 429s
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
INFOInventory / provenance · inv.oversize · CWE-1104
docs/site/assets/askdb-promo.mp4
docs/site/assets/askdb-promo.mp4
Why it matters. 4849694 bytes not read
INFOInventory / provenance · inv.oversize · CWE-1104
docs/site/assets/cover-github.png
docs/site/assets/cover-github.png
Why it matters. 1191953 bytes not read
INFOInventory / provenance · inv.oversize · CWE-1104
ui/public/askdb-promo.mp4
ui/public/askdb-promo.mp4
Why it matters. 4849694 bytes not read

Gates applied: no_behavioural_pass.

Audited 2026-10-07 · audit v0.4.1 · source sha ea8ba87e8161full audit observations/trust-audit/mcp-server/mgorabbani__askdb.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-07ea8ba87e8161BLOCKD69first audit
06

Questions

What is the AskDB MCP server?

Give AI agents safe access to your database.

What tools does AskDB expose?

15 in total: 13 read-only, 2 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is AskDB safe to connect to an agent?

No — not without reading the findings first. The audit graded it D (69/100) and found 1 critical or high issue in the source. Each one is listed on this page with the file and line it is on.

What credentials does AskDB need?

It reads BETTER_AUTH_SECRET, BETTER_AUTH_URL, ENCRYPTION_KEY, MCP_OAUTH_ACCESS_TOKEN_TTL_SECONDS, MCP_OAUTH_CODE_TTL_SECONDS, MCP_OAUTH_ISSUER_URL and MCP_OAUTH_REFRESH_TOKEN_TTL_SECONDS from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does AskDB run?

It speaks streamable-http, so it runs as a service you connect to over the network. It is published on npm as @askdb/ui at 0.1.0.

How current is this page?

The grade is for one exact copy of the source (ea8ba87e8161), read on 2026-10-07. The repository is watched and re-audited when it changes.

Advertisement