Nextdns MCP for AI Agents

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Nextdns MCP or direct API to monitor DNS logs, update security filters, manage blocklists, and adjust privacy settings through natural language.
Trusted by
AWS
Glean
Zoom
Airtable

30 min · no commitment · see it on your stack

Nextdns Logo
Gradient Top
Gradient Middle
Gradient Bottom
divider

Try Nextdns now

Enter a prompt below to test the integration in our Tool Router playground. You'll be redirected to sign in and try it live.

Supported Tools

Tools
Add Allowlist EntryTool to add a domain to the allowlist of a NextDNS profile.
Add Blocked TLDTool to add a top-level domain to the security blocklist for a NextDNS profile.
Add Denylist DomainTool to add a domain to the denylist of a NextDNS profile.
Add Parental Control CategoryTool to add a content category to the parental control categories list.
Add Parental Control ServiceTool to add a service to the parental control services list of a NextDNS profile.
Add Privacy BlocklistTool to add a blocklist to the privacy blocklists for a NextDNS profile.
Add Privacy Native TrackerTool to add a native tracking service to the blocked list for a NextDNS profile.
Add DNS Rewrite RuleTool to add a DNS rewrite rule to a NextDNS profile.
Clear LogsTool to clear DNS logs for a NextDNS profile.
Create ProfileThis tool allows users to create a new NextDNS profile.
Delete Allowlist EntryTool to remove a domain from a NextDNS profile's allowlist.
Delete NextDNS ConfigurationTool to delete a NextDNS configuration profile.
Delete Parental Control CategoryTool to remove a category from parental control blocked categories.
Delete Parental Control ServiceTool to remove a service from parental control blocked services.
Delete Privacy BlocklistTool to remove a blocklist from the privacy blocklists for a NextDNS profile.
Delete Privacy Native TrackerTool to remove a native tracking entry from a NextDNS profile's privacy settings.
Delete DNS Rewrite RuleTool to delete a DNS rewrite rule from a NextDNS profile.
Download LogsRetrieves the download URL for exported DNS query logs from a NextDNS profile.
Get AllowlistTool to retrieve the list of allowed domains for a NextDNS profile.
Get Analytics DestinationsTool to retrieve destination analytics for a profile showing query destinations by country or GAFAM company.
Get Analytics DevicesTool to retrieve device analytics for a profile showing identified devices with names, models, and query counts.
Get Analytics DNSSECTool to retrieve DNSSEC validation analytics for a profile showing validated vs non-validated query counts.
Get Analytics DomainsTool to retrieve analytics data for domains within a specific profile.
Get Analytics EncryptionTool to retrieve encryption analytics for a profile showing encrypted vs unencrypted query counts.
Get Analytics IPsTool to retrieve analytics aggregated by client IP addresses.
Get Analytics IP VersionsTool to retrieve analytics grouped by IP version within a specific profile.
Get Analytics ProtocolsTool to retrieve protocol analytics for a specific profile showing DNS protocol distribution (DNS-over-HTTPS, DNS-over-TLS, UDP).
Get Analytics Query TypesTool to retrieve DNS query counts broken down by query type.
Get Analytics Blocking ReasonsTool to retrieve blocking reasons analytics showing blocklists, native tracking protection, and other reasons for blocked queries.
Get Analytics StatusTool to retrieve analytics status for a specific profile.
Get LogsTool to retrieve logs for a specific NextDNS profile with optional filters.
Get Parental Control SettingsTool to get parental control settings for a profile.
Get Parental Control CategoriesTool to get the list of blocked/allowed content categories for parental control.
Get Parental Control ServicesTool to get the list of blocked/allowed services for parental control.
Get Performance SettingsTool to get performance settings for a profile including ECS, cache boost, and CNAME flattening configuration.
Get Privacy SettingsTool to get privacy settings for a profile including blocklists, native tracking settings, disguised trackers, and affiliate settings.
Get Profile DetailsRetrieves the details of a specific NextDNS profile.
Get DNS RewritesTool to retrieve the list of DNS rewrites for a NextDNS profile.
Get Security TLDsTool to get the list of blocked TLDs (top-level domains) for a profile's security settings.
Get Profile SettingsTool to get all settings for a NextDNS profile including logs, block page, performance, and web3 settings.
Get Block Page SettingsTool to retrieve the block page settings for a NextDNS profile.
Get Logging SettingsTool to retrieve the logging settings for a NextDNS profile.
List Denylist DomainsTool to list domains in the denylist for a profile.
List ProfilesList all NextDNS profiles for the authenticated user, returning profile IDs and configurations.
List Security SettingsTool to list current security options for a NextDNS configuration.
Log Client IPsTool to enable or disable logging of client IPs for a NextDNS configuration.
Toggle Domain LoggingTool to enable or disable logging of domains for a NextDNS profile.
Remove Blocked TLDTool to remove a top-level domain from the security blocklist for a NextDNS profile.
Remove Denylist DomainRemoves a domain from a NextDNS profile's denylist (blocklist).
Rename ConfigurationTool to rename a NextDNS configuration (profile).
Replace AllowlistTool to replace the entire allowlist for a NextDNS profile.
Replace DenylistTool to replace the entire denylist (blocked domains) for a NextDNS profile.
Replace Parental Control CategoriesTool to replace the entire list of blocked/allowed content categories for parental control.
Replace Parental Control ServicesTool to replace the entire list of blocked/allowed services for parental control.
Replace Privacy BlocklistsTool to replace the entire list of privacy blocklists for a NextDNS profile.
Replace Privacy Native Tracking ServicesTool to replace the entire list of blocked native tracking services for a NextDNS profile.
Replace Security TLDsTool to replace the entire list of blocked TLDs (top-level domains) for a NextDNS profile's security settings.
Update Allowlist EntryTool to update a specific allowlist entry in a NextDNS profile.
Update Denylist EntryUpdates a specific denylist entry in a NextDNS profile, typically to toggle its active status.
Update linked IPUpdates the linked IP address for a NextDNS profile to the current caller's public IP.
Update Parental Control SettingsTool to update parental control settings for a NextDNS profile.
Update Parental Control CategoryTool to update a specific category entry in parental control settings.
Update Parental Control ServiceTool to update a specific service entry in parental control settings.
Update Performance SettingsTool to update performance settings of a NextDNS profile.
Update Privacy SettingsTool to update privacy settings for a profile.
Update Security SettingsTool to update security settings for a profile.
Update SettingsTool to update settings for a NextDNS profile including logs, block page, performance, and web3 settings.
Update Block Page SettingsTool to update block page settings for a NextDNS profile.
Python
TypeScript

Install Composio

python
pip install composio claude-agent-sdk
Install the Composio SDK and Claude Agent SDK

Create Tool Router Session

python
from composio import Composio
from claude_agent_sdk import ClaudeSDKClient, ClaudeAgentOptions

composio = Composio(api_key='your-composio-api-key')
session = composio.create(user_id='your-user-id')
url = session.mcp.url
Initialize the Composio client and create a Tool Router session

Connect to AI Agent

python
import asyncio

options = ClaudeAgentOptions(
    permission_mode='bypassPermissions',
    mcp_servers={
        'tool_router': {
            'type': 'http',
            'url': url,
            'headers': {
                'x-api-key': 'your-composio-api-key'
            }
        }
    },
    system_prompt='You are a helpful assistant with access to Nextdns tools.',
    max_turns=10
)

async def main():
    async with ClaudeSDKClient(options=options) as client:
        await client.query('Download DNS logs for my main profile from today')
        async for message in client.receive_response():
            if hasattr(message, 'content'):
                for block in message.content:
                    if hasattr(block, 'text'):
                        print(block.text)

asyncio.run(main())
Use the MCP server with your AI agent

Why Use Composio?

AI Native Nextdns Integration

  • Supports both Nextdns MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, writing, and querying your Nextdns data

Managed Auth

  • Built-in OAuth handling with automatic token refresh and rotation
  • Central place to manage, scope, and revoke Nextdns access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Nextdns
  • Scoped, least privilege access to Nextdns resources
  • Full audit trail of agent actions to support review and compliance

Frequently Asked Questions

Do I need my own developer credentials to use Nextdns with Composio?

Yes, Nextdns requires you to configure your own API key credentials. Once set up, Composio handles secure credential storage and API request handling for you.

Can I use multiple toolkits together?

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Is Composio secure?

Composio is SOC 2 and ISO 27001 compliant with all data encrypted in transit and at rest. Learn more.

What if the API changes?

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Used by agents from

Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai

Never worry about agent reliability

We handle tool reliability, observability, and security so you never have to second-guess an agent action.