dmint-mcpdmint-mcp inserts a deterministic authorization gate between the agent and every downstream tool call:┌─────────────────┐ │ AI Client/Agent │ (Cursor, Claude Code, Antigravity, custom MCP client) └────────┬────────┘ │ JSON-RPC tools/list, tools/call ▼ ┌─────────────────────────────────┐ │ dmint-mcp Gateway │ │ │ │ ├─ tools/list aggregation │ │ ├─ tool schema hash pinning │ │ ├─ SSRF / DNS-rebinding guard │ │ ├─ deterministic policy gate │ │ └─ approval verification │ └────────┬────────────────────────┘ │ authorized calls only ▼ ┌─────────────────────────────────┐ │ Downstream MCP server(s) │ └─────────────────────────────────┘
stdio — local subprocesses, for example npx @modelcontextprotocol/server-postgres or uvx mcp-server-git.streamable-http (streamable_http is also accepted) — remote MCP endpoints with TLS, SSRF filtering, optional Bearer auth, and connection-level IP pinning.dmint create-mcp-policy \ --command npx \ --args "-y @modelcontextprotocol/server-postgres postgresql://localhost/mydb" \ --integration-id postgres \ --output policy.json \ --config-output mcp_protection.json
policy.json before deployment. Start with explicit allow rules for the tools you intend to expose, approval_required for sensitive mutations, and deny for operations that must never run. Precedence is always DENY > APPROVAL_REQUIRED > ALLOW.mcp_protection.json contains the policy path, approval database, and integration/tool bindings:{ "policy_file": "policy.json", "approval_db": "./approvals.sqlite3", "approval_ttl": 300, "disclosure_mode": "dog", "integrations": [ { "integration_id": "postgres", "transport": "stdio", "connection": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"] }, "tool_bindings": { "query": { "tool_name": "query", "capability": "postgres.query", "discovery": "exposed" } } } ] }
dmint-mcp --policy or dmint-mcp --db-path flags."disclosure_mode" in mcp_protection.json:| Mode | Name | Verbosity | Internal Fingerprints | Recommended For |
dog (Default) | Transparent | High | Included (request_fingerprint, approval_id) | Local development, trusted agent loops, debugging |
cat | Balanced | Medium | Omitted (workflow ID only) | Semi-trusted agents, multi-agent pipelines |
god | Zero-Knowledge | Minimal | Completely Redacted (DMT_403) | Hardened production, untrusted agents, high-risk tools |
┌────────────────────────────────────────────────────────────────────────┐ │ Disclosure Mode Responses Compared │ ├─────────┬──────────────────────────────────────────────────────────────┤ │ Mode │ Response Payload returned to AI Agent on APPROVAL_REQUIRED │ ├─────────┼──────────────────────────────────────────────────────────────┤ │ dog │ { │ │ │ "status": "approval_required", │ │ │ "code": "DMT_APPROVAL_REQUIRED", │ │ │ "request_id": "7b8e1a2f-...", │ │ │ "approval_id": "c4d3e2f1-...", │ │ │ "request_fingerprint": "a3f5... (sha256 hex)", │ │ │ "message": "Trusted approval is required for this request."│ │ │ } │ ├─────────┼──────────────────────────────────────────────────────────────┤ │ cat │ Dmint enforcement [DMT_APPROVAL_REQUIRED]: approval requested│ │ │ (workflow 7b8e1a2f-...) │ ├─────────┼──────────────────────────────────────────────────────────────┤ │ god │ Dmint enforcement [DMT_403]: access denied │ └─────────┴──────────────────────────────────────────────────────────────┘
"disclosure_mode": "dog")approval_id and request_id, pause execution, and present the reviewer with actionable metadata."disclosure_mode": "cat")request_id), but omits the cryptographic SHA-256 request_fingerprint. This prevents the agent from attempting to tamper with or correlate internal hashes."disclosure_mode": "god")Dmint enforcement [DMT_403]: access denied
DMT_MCP_SCHEMA_MISMATCH until an operator deliberately re-pins it.streamable-http integrations the gateway:.internal/.local hosts, trailing-dot hostnames, and empty labels;api.internal.company.com is rejected by the guard.DMT_MCP_PROTOCOL_ERROR, preventing parser-differential attacks such as {"id": 1, "id": 2}.APPROVAL_REQUIRED, the gateway persists a pending record (apr_...) and returns the approval ID. Once a human approves the request via dmint approve <approval_id> or the web dashboard, there are two ways to retry:APPROVED assertion matching the request's RFC 8785 fingerprint in the approval store, verifies the Ed25519 signature, atomically transitions the record from APPROVED to CONSUMED, and forwards the clean call downstream. The LLM never needs to see or copy-paste the cryptographic token._dmint_approval, dmint_approval, or approval_credential). The gateway strips the reserved key before forwarding arguments downstream and consumes the assertion once.dmint-mcp -c mcp_protection.json
dmint-mcp \ -c mcp_protection.json \ --transport http \ --host 127.0.0.1 \ --port 8000 \ --auth-token "replace-with-a-long-random-token"
dmint policy-digest policy.json dmint-mcp -c mcp_protection.json --expected-policy-digest <sha256-hex>
dmint-mcp, not at the downstream server. Example Cursor/Claude Code configuration:{ "mcpServers": { "protected-postgres": { "command": "dmint-mcp", "args": [ "-c", "/absolute/path/to/mcp_protection.json" ] } } }
tools/list and tools/call now passes through Dmint’s deterministic policy evaluator. A DENY or unresolved APPROVAL_REQUIRED never reaches the downstream server.Dmint) itself does not dispatch webhooks.mcp_protection.json field.