Skip to main content

Overview

Two DNS Surfaces

The MCP tools follow the same split: naive_resend_setup_records (verification view) vs naive_list_dns_records / naive_set_dns_record / naive_delete_dns_record (live zone).

List Domains

app_connect_status is null/disconnected for fresh domains, connected once the apex points at a Naive app, agent_managed_pending while an apex A/AAAA write is in flight, and agent_managed once an agent has taken over apex DNS.

Connect Domain (BYOD)

Returns the email-provider DNS records to add at your registrar. After adding them, run naive domains verify <id>.

Verify Domain

Triggers an immediate verification check. Once all records propagate, the domain transitions to active and can be used for email sending.

Search and Purchase Domains

search returns availability and price. purchase creates a hosted checkout session — open the returned checkout_url to complete payment. The domain is registered automatically after payment.

Zone Records (live DNS zone)

If the response includes mock: true, the API is in DOMAIN_MOCK mode and the records came from an in-memory store instead of the live DNS zone.

Set Record (create or replace)

Options

Output

path is one of:
  • patch — A single matching record was updated in place (atomic, no race window)
  • add-then-delete — Multiple matching records existed; the new record was added first, then the old ones were best-effort deleted
  • add — No matching record existed; a fresh row was created
ownership is naive for clean writes and unowned-acknowledged when --acknowledge-unowned was used to override an existing non-Naive record.

Delete Record

The record ID comes from naive domains zone-records. Protected records (DMARC, DKIM, inbound MX/TXT) and system domains cannot be deleted — the API returns 403 forbidden with reason: "PROTECTED_RECORD" or "SYSTEM_DOMAIN".

Safety Rules (enforced by the API)


Mock Mode

If the API is configured with DOMAIN_MOCK=true (or VERCEL_REGISTRAR_TOKEN is unset), DNS edits are simulated against an in-memory store and the response includes mock: true. Useful for local development and CI; real DNS is not touched. The feature flag AGENT_DNS_EDIT_ENABLED defaults to on. Flip it to false only as an emergency kill switch. When disabled the endpoints return 501 feature_not_configured with reason: "FEATURE_DISABLED".

Apex A/AAAA flips app_connect_status

naive domains set-record <id> --type A --name @ --value ... (and the AAAA equivalent) atomically transitions the domain to app_connect_status = "agent_managed":
  1. Pre-flip the row to agent_managed_pending and clear connected_app_id.
  2. Write to the DNS zone.
  3. On success, commit the flip to agent_managed and emit a domain.updated live event with payload.action = "agent_managed".
  4. On failure, roll back to the previous status (best-effort).
Reapers and connect sweeps skip agent_managed/agent_managed_pending rows, so the agent’s record won’t be reverted. To re-enable Naive app routing the user must explicitly disconnect and reconnect the domain from the dashboard — the agent cannot reverse this automatically.

Audit log + live events

Every successful or rejected DNS edit appends a row to activity_log: The same event also fans out on the Server-Sent Events stream (GET /v1/events) as domain.updated (and activity.logged) so dashboards and supervising agents can react in real time.

Workflow: Editing Apex DNS for a New Web App