# Nextdns — how to use (mcp.ai)

Connect your Nextdns account and use 68 tools for security and identity straight from your AI agent. Connect with your own API key. NextDNS is a DNS service that enhances internet security and privacy by blocking malicious websites, tracking scripts, and ads before they reach your device.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_nextdns?ms=1787293440000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `nextdns_add_allowlist_entry`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/nextdns`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/nextdns/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/nextdns/add/allowlist/entry` — Tool to add a domain to the allowlist of a NextDNS profile. Use when allowing specific domains under a profile after obtaining its ID.
  - body: { active?: boolean, domain: string, profile: string }
- `POST https://api.mcp.ai/api/nextdns/add/blocked/tld` — Tool to add a top-level domain to the security blocklist for a NextDNS profile. Use after listing current security settings to ensure the TLD is not already blocked.
  - body: { tld: string, config: string }
- `POST https://api.mcp.ai/api/nextdns/add/denylist/domain` — Tool to add a domain to the denylist of a NextDNS profile. Use when blocking specific domains under a profile after obtaining its ID.
  - body: { active?: boolean, config: string, domain: string }
- `POST https://api.mcp.ai/api/nextdns/add/parental/control/category` — Tool to add a content category to the parental control categories list. Use when you need to add a new category to block or allow specific content types like pornography, gambling, or social networks.
  - body: { active?: boolean, profile: string, category_id: string }
- `POST https://api.mcp.ai/api/nextdns/add/parental/control/service` — Tool to add a service to the parental control services list of a NextDNS profile. Use when blocking specific services (like social media platforms) under a profile.
  - body: { id: string, active?: boolean, profile: string }
- `POST https://api.mcp.ai/api/nextdns/add/privacy/blocklist` — Tool to add a blocklist to the privacy blocklists for a NextDNS profile. Use when enabling additional privacy blocklists for a profile.
  - body: { id: string, config: string }
- `POST https://api.mcp.ai/api/nextdns/add/privacy/native` — Tool to add a native tracking service to the blocked list for a NextDNS profile. Use when blocking native trackers from specific vendors.
  - body: { id: string, profile: string }
- `POST https://api.mcp.ai/api/nextdns/add/rewrite` — Tool to add a DNS rewrite rule to a NextDNS profile. Use when you need to configure custom DNS resolution for specific domains.
  - body: { name: string, content: string, profile: string }
- `POST https://api.mcp.ai/api/nextdns/clear/logs` — Tool to clear DNS logs for a NextDNS profile. Use when you want to remove all existing query logs for a given profile. Note: this operation cannot be undone.
  - body: { profile_id: string }
- `POST https://api.mcp.ai/api/nextdns/create/profile` — This tool allows users to create a new NextDNS profile. It uses the POST method at the endpoint https://api.nextdns.io/profiles. A profile is a distinct configuration set for DNS filtering and securit
  - body: { name: string, privacy?: object, denylist?: object[], security?: object, settings?: object, allowlist?: object[], parentalControl?: object }
- `POST https://api.mcp.ai/api/nextdns/delete/allowlist/entry` — Tool to remove a domain from a NextDNS profile's allowlist. Use when you need to stop allowing a previously whitelisted domain.
  - body: { domain: string, profile: string }
- `POST https://api.mcp.ai/api/nextdns/delete/config` — Tool to delete a NextDNS configuration profile. Use when you need to remove an existing profile by its ID. Use after confirming the profile exists.
  - body: { profile: string }
- `POST https://api.mcp.ai/api/nextdns/delete/parental/control/category` — Tool to remove a category from parental control blocked categories. Use when you need to unblock a content category that was previously blocked. Use 'Get Parental Control Categories' first to verify t
  - body: { profile: string, category_id: string }
- `POST https://api.mcp.ai/api/nextdns/delete/parental/control/service` — Tool to remove a service from parental control blocked services. Use when you need to unblock a service (like TikTok, Instagram, or other apps) that was previously blocked.
  - body: { profile: string, service_id: string }
- `POST https://api.mcp.ai/api/nextdns/delete/privacy/blocklist` — Tool to remove a blocklist from the privacy blocklists for a NextDNS profile. Use when disabling or removing privacy blocklists from a profile.
  - body: { profile: string, blocklist_id: string }
- `POST https://api.mcp.ai/api/nextdns/delete/privacy/native` — Tool to remove a native tracking entry from a NextDNS profile's privacy settings. Use when you need to stop blocking a specific native app tracker (like Apple, Samsung, Huawei, etc.).
  - body: { profile: string, native_id: string }
- `POST https://api.mcp.ai/api/nextdns/delete/rewrite` — Tool to delete a DNS rewrite rule from a NextDNS profile. Use when you need to remove an existing DNS rewrite rule by its ID.
  - body: { profile: string, rewrite_id: string }
- `POST https://api.mcp.ai/api/nextdns/download/logs` — Retrieves the download URL for exported DNS query logs from a NextDNS profile. Returns a time-limited URL pointing to a CSV file containing the profile's DNS logs. Use this to export log data for anal
  - body: { redirect?: boolean, profile_id: string }
- `POST https://api.mcp.ai/api/nextdns/get/allowlist` — Tool to retrieve the list of allowed domains for a NextDNS profile. Use when you need to view all domains currently whitelisted in a profile.
  - body: { profile: string }
- `POST https://api.mcp.ai/api/nextdns/get/analytics/destinations` — Tool to retrieve destination analytics for a profile showing query destinations by country or GAFAM company. Use when you need to understand geographic distribution or big tech company query patterns.
  - body: { type: string, limit?: integer, cursor?: string, device?: string, profile: string, to_date?: string, from_date?: string }
- `POST https://api.mcp.ai/api/nextdns/get/analytics/devices2` — Tool to retrieve device analytics for a profile showing identified devices with names, models, and query counts. Use when you need per-device query metrics within a specific time frame.
  - body: { limit?: integer, cursor?: string, device?: string, profile: string, to_date?: string, from_date?: string }
- `POST https://api.mcp.ai/api/nextdns/get/analytics/dnssec` — Tool to retrieve DNSSEC validation analytics for a profile showing validated vs non-validated query counts. Use after selecting a profile to analyze DNSSEC validation statistics.
  - body: { limit?: integer, cursor?: string, device?: string, profile: string, to_date?: string, from_date?: string }
- `POST https://api.mcp.ai/api/nextdns/get/analytics/domains` — Tool to retrieve analytics data for domains within a specific profile. Use after confirming the profile ID to get per-domain query stats.
  - body: { root?: boolean, limit?: integer, cursor?: string, device?: string, status?: string, profile: string, to_date?: string, from_date?: string }
- `POST https://api.mcp.ai/api/nextdns/get/analytics/encryption` — Tool to retrieve encryption analytics for a profile showing encrypted vs unencrypted query counts. Use when you need to understand the breakdown of DNS queries by encryption status (DoH/DoT vs plain D
  - body: { to?: string, from?: string, limit?: integer, cursor?: string, device?: string, profile: string }
- `POST https://api.mcp.ai/api/nextdns/get/analytics/ip/versions` — Tool to retrieve analytics grouped by IP version within a specific profile. Use after you have a profile ID to see IPv4 vs IPv6 query counts.
  - body: { to?: string, from?: string, limit?: integer, cursor?: string, device?: string, profile: string }
- `POST https://api.mcp.ai/api/nextdns/get/analytics/ips` — Tool to retrieve analytics aggregated by client IP addresses. Use when you need to analyze DNS query distribution per client IP for a given profile.
  - body: { to?: string, from?: string, limit?: integer, cursor?: string, device?: string, profile: string }
- `POST https://api.mcp.ai/api/nextdns/get/analytics/protocols` — Tool to retrieve protocol analytics for a specific profile showing DNS protocol distribution (DNS-over-HTTPS, DNS-over-TLS, UDP). Use after confirming the profile ID to analyze protocol usage patterns
  - body: { limit?: integer, cursor?: string, device?: string, profile: string, to_date?: string, from_date?: string }
- `POST https://api.mcp.ai/api/nextdns/get/analytics/query/types` — Tool to retrieve DNS query counts broken down by query type. Use after selecting a profile and specifying date filters to analyze distribution by type.
  - body: { limit?: integer, cursor?: string, device?: string, profile: string, to_date?: string, from_date?: string }
- `POST https://api.mcp.ai/api/nextdns/get/analytics/reasons2` — Tool to retrieve blocking reasons analytics showing blocklists, native tracking protection, and other reasons for blocked queries. Use after selecting a profile to understand what categories are block
  - body: { limit?: integer, cursor?: string, device?: string, profile: string, to_date?: string, from_date?: string }
- `POST https://api.mcp.ai/api/nextdns/get/analytics/status` — Tool to retrieve analytics status for a specific profile. Use when you need counts of DNS queries broken down by status categories.
  - body: { to?: string, from?: string, limit?: integer, cursor?: string, device?: string, profile: string }
- `POST https://api.mcp.ai/api/nextdns/get/logs` — Tool to retrieve logs for a specific NextDNS profile with optional filters. Use after confirming the profile ID to fetch raw or filtered DNS logs.
  - body: { to?: string, raw?: boolean, from?: string, sort?: string, limit?: integer, cursor?: string, device?: string, search?: string, status?: string, profile: string }
- `POST https://api.mcp.ai/api/nextdns/get/parental/control` — Tool to get parental control settings for a profile. Returns services, categories, safe search, YouTube restricted mode, and bypass blocking status.
  - body: { profile: string }
- `POST https://api.mcp.ai/api/nextdns/get/parental/control/categories` — Tool to get the list of blocked/allowed content categories for parental control. Use when you need to check which content categories are currently blocked or allowed for a specific profile.
  - body: { profile: string }
- `POST https://api.mcp.ai/api/nextdns/get/parental/control/services` — Tool to get the list of blocked/allowed services for parental control. Use when you need to review which services (like TikTok, Facebook, Netflix) are currently blocked or allowed in a profile's paren
  - body: { profile: string }
- `POST https://api.mcp.ai/api/nextdns/get/performance/settings` — Tool to get performance settings for a profile including ECS, cache boost, and CNAME flattening configuration. Use when you need to check current performance optimization settings before making change
  - body: { profile: string }
- `POST https://api.mcp.ai/api/nextdns/get/privacy/settings` — Tool to get privacy settings for a profile including blocklists, native tracking settings, disguised trackers, and affiliate settings. Use when you need to check the current privacy configuration befo
  - body: { profile: string }
- `POST https://api.mcp.ai/api/nextdns/get/profile` — Retrieves the details of a specific NextDNS profile. It requires a 'profileId' as a path parameter and returns the profile details including name, security, privacy, parental control, denylist, allowl
  - body: { profileId: string }
- `POST https://api.mcp.ai/api/nextdns/get/rewrites` — Tool to retrieve the list of DNS rewrites for a NextDNS profile. Use when you need to view all custom DNS rewrite rules configured in a profile.
  - body: { profile: string }
- `POST https://api.mcp.ai/api/nextdns/get/security/tlds` — Tool to get the list of blocked TLDs (top-level domains) for a profile's security settings. Use when you need to retrieve only the blocked TLDs without fetching all security settings.
  - body: { profile: string }
- `POST https://api.mcp.ai/api/nextdns/get/settings` — Tool to get all settings for a NextDNS profile including logs, block page, performance, and web3 settings. Use when you need to retrieve the current configuration settings of a profile.
  - body: { profile: string }
- `POST https://api.mcp.ai/api/nextdns/get/settings/blockpage` — Tool to retrieve the block page settings for a NextDNS profile. Use when you need to check if the block page is currently enabled or disabled for a specific profile.
  - body: { profile: string }
- `POST https://api.mcp.ai/api/nextdns/get/settings/logs` — Tool to retrieve the logging settings for a NextDNS profile. Use when you need to check logging status, data retention period, storage location, or privacy options.
  - body: { profile: string }
- `POST https://api.mcp.ai/api/nextdns/list/denylist/domains` — Tool to list domains in the denylist for a profile. Use after confirming the profile ID to review all blocked domains. Example: "List denylist domains for profile abc123."
  - body: { profile: string }
- `POST https://api.mcp.ai/api/nextdns/list/profiles` — List all NextDNS profiles for the authenticated user, returning profile IDs and configurations. Returns all profiles with their IDs, names, fingerprints, and user roles. Profile IDs returned by this a
- `POST https://api.mcp.ai/api/nextdns/list/security/settings` — Tool to list current security options for a NextDNS configuration. Use after obtaining the configuration ID to review active security settings.
  - body: { config: string }
- `POST https://api.mcp.ai/api/nextdns/log/client/ips` — Tool to enable or disable logging of client IPs for a NextDNS configuration. Use when you need to toggle whether client IPs are recorded in DNS logs.
  - body: { enable: boolean, config_id: string }
- `POST https://api.mcp.ai/api/nextdns/log/domains` — Tool to enable or disable logging of domains for a NextDNS profile. Use after retrieving profile settings when you need to adjust domain logging. Example: "Enable domain logging for profile abc123."
  - body: { enabled: boolean, profile_id: string }
- `POST https://api.mcp.ai/api/nextdns/remove/blocked/tld` — Tool to remove a top-level domain from the security blocklist for a NextDNS profile. Use after listing current security settings to confirm the TLD is currently blocked.
  - body: { tld: string, config: string }
- `POST https://api.mcp.ai/api/nextdns/remove/denylist/domain` — Removes a domain from a NextDNS profile's denylist (blocklist). The domain will no longer be blocked by the DNS filter after removal. Use 'List Denylist Domains' first to verify the domain exists in t
  - body: { domain: string, profile: string }
- `POST https://api.mcp.ai/api/nextdns/rename/config` — Tool to rename a NextDNS configuration (profile). Use when you need to update a profile's name after obtaining its ID. Example: RenameConfig(name="Home Profile", config_id="d46a5b")
  - body: { name: string, config_id: string }
- `POST https://api.mcp.ai/api/nextdns/replace/allowlist` — Tool to replace the entire allowlist for a NextDNS profile. Use when you need to set a complete list of allowed domains, replacing all existing entries.
  - body: { profile: string, allowlist: object[] }
- `POST https://api.mcp.ai/api/nextdns/replace/denylist` — Tool to replace the entire denylist (blocked domains) for a NextDNS profile. This operation completely replaces all existing denylist entries with the provided list. Use when you need to bulk update t
  - body: { profile: string, denylist: object[] }
- `POST https://api.mcp.ai/api/nextdns/replace/parental/control/categories` — Tool to replace the entire list of blocked/allowed content categories for parental control. Use this to set which content categories should be blocked or allowed for a profile.
  - body: { profile: string, categories: object[] }
- `POST https://api.mcp.ai/api/nextdns/replace/parental/control/services` — Tool to replace the entire list of blocked/allowed services for parental control. Use when you need to set all service restrictions at once, replacing existing settings.
  - body: { profile: string, services: object[] }
- `POST https://api.mcp.ai/api/nextdns/replace/privacy/blocklists` — Tool to replace the entire list of privacy blocklists for a NextDNS profile. This operation completely replaces all existing blocklists with the provided list. Use when you need to bulk update privacy
  - body: { profile: string, blocklists: object[] }
- `POST https://api.mcp.ai/api/nextdns/replace/privacy/natives` — Tool to replace the entire list of blocked native tracking services for a NextDNS profile. This operation completely replaces all existing native tracking service blocks with the provided list. Use wh
  - body: { natives: object[], profile: string }
- `POST https://api.mcp.ai/api/nextdns/replace/security/tlds` — Tool to replace the entire list of blocked TLDs (top-level domains) for a NextDNS profile's security settings. This operation completely replaces all existing blocked TLDs with the provided list. Use 
  - body: { tlds: object[], profile: string }
- `POST https://api.mcp.ai/api/nextdns/update/allowlist/entry` — Tool to update a specific allowlist entry in a NextDNS profile. Use when toggling the active status of a domain in the allowlist.
  - body: { active: boolean, domain: string, profile: string }
- `POST https://api.mcp.ai/api/nextdns/update/denylist/entry` — Updates a specific denylist entry in a NextDNS profile, typically to toggle its active status. Use when you need to temporarily enable or disable blocking for a domain without removing it from the den
  - body: { active: boolean, domain: string, profile: string }
- `POST https://api.mcp.ai/api/nextdns/update/linked/ip` — Updates the linked IP address for a NextDNS profile to the current caller's public IP. This is used for dynamic DNS setups where the profile needs to recognize the user's current IP address for DNS fi
  - body: { config_id: string }
- `POST https://api.mcp.ai/api/nextdns/update/parental/control` — Tool to update parental control settings for a NextDNS profile. Use when you need to change safe search, YouTube restricted mode, or bypass blocking settings.
  - body: { profile: string, safeSearch?: boolean, blockBypass?: boolean, youtubeRestrictedMode?: boolean }
- `POST https://api.mcp.ai/api/nextdns/update/parental/control/category` — Tool to update a specific category entry in parental control settings. Use when you need to enable or disable blocking for a specific content category like pornography, gambling, or social networks.
  - body: { active: boolean, profile: string, category_id: string }
- `POST https://api.mcp.ai/api/nextdns/update/parental/control/service` — Tool to update a specific service entry in parental control settings. Use when toggling individual service blocks (e.g., blocking TikTok, Instagram, or other social media/gaming services).
  - body: { active: boolean, profile: string, service_id: string }
- `POST https://api.mcp.ai/api/nextdns/update/performance/settings` — Tool to update performance settings of a NextDNS profile. Use when adjusting performance optimizations after reviewing current settings.
  - body: { ecs: boolean, config: string, cacheBoost: boolean, cnameFlattening: boolean }
- `POST https://api.mcp.ai/api/nextdns/update/privacy/settings` — Tool to update privacy settings for a profile. Use when you need to change blocklists, native trackers, disguisedTrackers, or allowAffiliate in one call.
  - body: { config: string, natives?: object[], blocklists?: object[], allowAffiliate?: boolean, disguisedTrackers?: boolean }
- `POST https://api.mcp.ai/api/nextdns/update/security/settings` — Tool to update security settings for a profile. Use when you need to change multiple security settings like threat intelligence, AI detection, safe browsing, and other protections in one call.
  - body: { dga?: boolean, nrd?: boolean, csam?: boolean, ddns?: boolean, parking?: boolean, profile: string, dnsRebinding?: boolean, cryptojacking?: boolean, idnHomographs?: boolean, typosquatting?: boolean, aiThreatDetection?: boolean, googleSafeBrowsing?: boolean, threatIntelligenceFeeds?: boolean }
- `POST https://api.mcp.ai/api/nextdns/update/settings` — Tool to update settings for a NextDNS profile including logs, block page, performance, and web3 settings. Use when you need to modify multiple settings categories in one operation. Only provide the sp
  - body: { logs?: object, web3?: boolean, profile: string, blockPage?: object, performance?: object }
- `POST https://api.mcp.ai/api/nextdns/update/settings/blockpage` — Tool to update block page settings for a NextDNS profile. Use when you need to enable or disable the branded block page that users see when accessing blocked domains.
  - body: { enabled: boolean, profile: string }

## Example prompts
- "What can I do in Nextdns?"
- "Show me a summary of my Nextdns account"

## More
- Page: https://mcp.ai/nextdns
- Agent spec (llms.txt): https://mcp.ai/nextdns/llms.txt
- Postman collection: https://mcp.ai/nextdns/postman.json
