dmint hook): Intercepts native IDE terminal commands (run_terminal_cmd, Bash), file reads/edits (Read, Write, Edit), and MCP calls via .cursor/hooks.json, .windsurf/hooks.json, and .clinerules/hooks.json.dmint-mcp): Wraps external Model Context Protocol servers (PostgreSQL, GitHub, Stripe, custom tools) in a fail-closed proxy.dmint init)dmint init in your repository root to generate keys, a starter policy.json (shell + filesystem templates), and IDE hook configs:# Configure Cursor, Windsurf, and Cline hooks in one command: dmint init --harness cursor,windsurf,cline # Or configure all supported harnesses at once: dmint init --harness all
dmint check --tool filesystem.read_file --resource "src/app.py" # -> ALLOW dmint check --tool filesystem.read_file --resource ".env" # -> DENY dmint check --tool shell.execute --resource "git push origin main" # -> APPROVAL_REQUIRED
dmint-mcp)@modelcontextprotocol/server-postgres) inside Cursor:policy.json and mcp_protection.jsondmint create-mcp-policy \ --command npx \ --args "-y @modelcontextprotocol/server-postgres postgresql://localhost/mydb" \ --integration-id postgres \ -f access.md \ -o policy.json \ --config-output mcp_protection.json \ -y
.cursor/mcp.json.cursor/mcp.json:{ "mcpServers": { "dmint-protected-gateway": { "command": "dmint-mcp", "args": [ "run", "--config", "/absolute/path/to/mcp_protection.json" ] } } }
.cursor/mcp.json so Cursor can locate the configuration regardless of which subfolder is open.APPROVAL_REQUIRED rule (via either dmint hook or dmint-mcp):PENDING record (apr_...) is written to .dmint/approvals.sqlite3 (or your configured approval_db).# Option A: Terminal CLI dmint pending dmint approve apr_abc123... --by dev@company.com # Option B: Local Web Dashboard dmint dashboard
APPROVED -> CONSUMED), and executes the call once.