policy.json and mcp_protection.json files.dmint create-policy)dmint create-policy supports 3 completely offline modes (zero API keys required) plus AI-assisted compilation:# Mode A: Built-in Domain Templates (100% Offline — shell, filesystem, postgres, github, stripe, aws, kubernetes) dmint create-policy --template shell,filesystem,postgres -o policy.json # Mode B: Inline Rule Flags (100% Offline — repeatable -r <effect>:<tool>.<action>[:<resource>[:<kind>]]) dmint create-policy -r "allow:postgres.select:users" -r "approval_required:stripe.refund:*" -o policy.json # Mode C: Interactive Terminal Rule Builder (100% Offline step-by-step prompts) dmint create-policy --interactive -o policy.json # Mode D: Inline Natural-Language Prompt or Markdown Requirements File (AI-Assisted) dmint create-policy --prompt "Allow read-only SQL queries, require approval for schema updates" -o policy.json
access.md:# Database Access Security Requirements - The agent is permitted to run SELECT queries on any table. - Inserting or updating records in the 'users' table requires explicit human approval. - Dropping tables or executing administrative schema changes is strictly denied.
access.md into policy.json:dmint create-policy -f access.md -o policy.json -y
--provider:| Provider | Option | Environment Variable | Default Model |
| OpenAI | --provider openai | OPENAI_API_KEY | gpt-4o-mini |
| Gemini | --provider gemini | GEMINI_API_KEY | gemini-1.5-flash |
| Groq | --provider groq | GROQ_API_KEY | llama-3.1-70b-versatile |
| Custom / Ollama | --base-url http://localhost:11434/v1 | --api-key <KEY> | Provider-specific |
dmint create-mcp-policy)dmint create-mcp-policy connects to the server, queries tools/list, and generates both the runtime policy and the gateway configuration:dmint 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 \ --non-interactive -y # Or 100% Offline Auto-Classification (no LLM API key required): dmint create-mcp-policy \ --command npx \ --args "-y @modelcontextprotocol/server-postgres postgresql://localhost/mydb" \ --integration-id postgres \ --offline -y
dmint verify-policy)dmint verify-policy policy.json
✓ Verified policy.json: 3 rule(s) [ALLOW] tool='database', action='select', resource='*' [APPROVAL_REQUIRED] tool='database', action='update', resource='users' [DENY] tool='database', action='drop', resource='*'
verify-policyallow, approval_required, or deny.DENY rules.dmint policy-digest)dmint policy-digest policy.json
6a8b75f28c19a4e3...
DMINT_EXPECTED_POLICY_DIGEST in your deployment environment. If the file is altered on disk, Dmint will refuse to initialize.mcp_protection.json.