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.

Nextdns logoNextdns
Api Key

NextDNS is a DNS service that blocks malicious sites, ads, and trackers before they reach your device. It boosts your internet security and privacy with real-time protection and granular control.

68 Tools

Try Nextdns now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Nextdns
Try asking
TOOLS

Supported Tools

Every Nextdns action and event your agent gets out of the box.

Add Allowlist Entry

Tool to add a domain to the allowlist of a NextDNS profile.

Add Blocked TLD

Tool to add a top-level domain to the security blocklist for a NextDNS profile.

Add Denylist Domain

Tool to add a domain to the denylist of a NextDNS profile.

Add Parental Control Category

Tool to add a content category to the parental control categories list.

Add Parental Control Service

Tool to add a service to the parental control services list of a NextDNS profile.

Add Privacy Blocklist

Tool to add a blocklist to the privacy blocklists for a NextDNS profile.

Add Privacy Native Tracker

Tool to add a native tracking service to the blocked list for a NextDNS profile.

Add DNS Rewrite Rule

Tool to add a DNS rewrite rule to a NextDNS profile.

Clear Logs

Tool to clear DNS logs for a NextDNS profile.

Create Profile

This tool allows users to create a new NextDNS profile.

Delete Allowlist Entry

Tool to remove a domain from a NextDNS profile's allowlist.

Delete NextDNS Configuration

Tool to delete a NextDNS configuration profile.

Delete Parental Control Category

Tool to remove a category from parental control blocked categories.

Delete Parental Control Service

Tool to remove a service from parental control blocked services.

Delete Privacy Blocklist

Tool to remove a blocklist from the privacy blocklists for a NextDNS profile.

Delete Privacy Native Tracker

Tool to remove a native tracking entry from a NextDNS profile's privacy settings.

Delete DNS Rewrite Rule

Tool to delete a DNS rewrite rule from a NextDNS profile.

Download Logs

Retrieves the download URL for exported DNS query logs from a NextDNS profile.

Get Allowlist

Tool to retrieve the list of allowed domains for a NextDNS profile.

Get Analytics Destinations

Tool to retrieve destination analytics for a profile showing query destinations by country or GAFAM company.

Get Analytics Devices

Tool to retrieve device analytics for a profile showing identified devices with names, models, and query counts.

Get Analytics DNSSEC

Tool to retrieve DNSSEC validation analytics for a profile showing validated vs non-validated query counts.

Get Analytics Domains

Tool to retrieve analytics data for domains within a specific profile.

Get Analytics Encryption

Tool to retrieve encryption analytics for a profile showing encrypted vs unencrypted query counts.

Get Analytics IPs

Tool to retrieve analytics aggregated by client IP addresses.

Get Analytics IP Versions

Tool to retrieve analytics grouped by IP version within a specific profile.

Get Analytics Protocols

Tool to retrieve protocol analytics for a specific profile showing DNS protocol distribution (DNS-over-HTTPS, DNS-over-TLS, UDP).

Get Analytics Query Types

Tool to retrieve DNS query counts broken down by query type.

Get Analytics Blocking Reasons

Tool to retrieve blocking reasons analytics showing blocklists, native tracking protection, and other reasons for blocked queries.

Get Analytics Status

Tool to retrieve analytics status for a specific profile.

Get Logs

Tool to retrieve logs for a specific NextDNS profile with optional filters.

Get Parental Control Settings

Tool to get parental control settings for a profile.

Get Parental Control Categories

Tool to get the list of blocked/allowed content categories for parental control.

Get Parental Control Services

Tool to get the list of blocked/allowed services for parental control.

Get Performance Settings

Tool to get performance settings for a profile including ECS, cache boost, and CNAME flattening configuration.

Get Privacy Settings

Tool to get privacy settings for a profile including blocklists, native tracking settings, disguised trackers, and affiliate settings.

Get Profile Details

Retrieves the details of a specific NextDNS profile.

Get DNS Rewrites

Tool to retrieve the list of DNS rewrites for a NextDNS profile.

Get Security TLDs

Tool to get the list of blocked TLDs (top-level domains) for a profile's security settings.

Get Profile Settings

Tool to get all settings for a NextDNS profile including logs, block page, performance, and web3 settings.

Get Block Page Settings

Tool to retrieve the block page settings for a NextDNS profile.

Get Logging Settings

Tool to retrieve the logging settings for a NextDNS profile.

List Denylist Domains

Tool to list domains in the denylist for a profile.

List Profiles

List all NextDNS profiles for the authenticated user, returning profile IDs and configurations.

List Security Settings

Tool to list current security options for a NextDNS configuration.

Log Client IPs

Tool to enable or disable logging of client IPs for a NextDNS configuration.

Toggle Domain Logging

Tool to enable or disable logging of domains for a NextDNS profile.

Remove Blocked TLD

Tool to remove a top-level domain from the security blocklist for a NextDNS profile.

Remove Denylist Domain

Removes a domain from a NextDNS profile's denylist (blocklist).

Rename Configuration

Tool to rename a NextDNS configuration (profile).

Replace Allowlist

Tool to replace the entire allowlist for a NextDNS profile.

Replace Denylist

Tool to replace the entire denylist (blocked domains) for a NextDNS profile.

Replace Parental Control Categories

Tool to replace the entire list of blocked/allowed content categories for parental control.

Replace Parental Control Services

Tool to replace the entire list of blocked/allowed services for parental control.

Replace Privacy Blocklists

Tool to replace the entire list of privacy blocklists for a NextDNS profile.

Replace Privacy Native Tracking Services

Tool to replace the entire list of blocked native tracking services for a NextDNS profile.

Replace Security TLDs

Tool to replace the entire list of blocked TLDs (top-level domains) for a NextDNS profile's security settings.

Update Allowlist Entry

Tool to update a specific allowlist entry in a NextDNS profile.

Update Denylist Entry

Updates a specific denylist entry in a NextDNS profile, typically to toggle its active status.

Update linked IP

Updates the linked IP address for a NextDNS profile to the current caller's public IP.

Update Parental Control Settings

Tool to update parental control settings for a NextDNS profile.

Update Parental Control Category

Tool to update a specific category entry in parental control settings.

Update Parental Control Service

Tool to update a specific service entry in parental control settings.

Update Performance Settings

Tool to update performance settings of a NextDNS profile.

Update Privacy Settings

Tool to update privacy settings for a profile.

Update Security Settings

Tool to update security settings for a profile.

Update Settings

Tool to update settings for a NextDNS profile including logs, block page, performance, and web3 settings.

Update Block Page Settings

Tool to update block page settings for a NextDNS profile.

SETUP GUIDE

Connect Nextdns MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/openai @ai-sdk/mcp
Install the Composio SDK and Claude Agent SDK
2

Create Tool Router Session

typescript
import { Composio } from '@composio/core';

const composio = new Composio({ apiKey: 'your-api-key' });

console.log("Creating Tool Router session...");
const { mcp } = await composio.create('your-user-id');
console.log(`Tool Router session created: ${mcp.url}`);
Initialize the Composio client and create a Tool Router session
3

Connect to AI Agent

typescript
import { openai } from '@ai-sdk/openai';
import { experimental_createMCPClient as createMCPClient } from '@ai-sdk/mcp';
import { generateText, stepCountIs } from 'ai';

const client = await createMCPClient({
  transport: {
    type: 'http',
    url: mcp.url,
    headers: { 'x-api-key': 'your-composio-api-key' }
  }
});

const tools = await client.tools();

const { text } = await generateText({
  model: openai('gpt-4o'),
  tools,
  messages: [{ role: 'user', content: 'Download DNS logs for my main profile from today' }],
  stopWhen: stepCountIs( 5 )
});

console.log(`Agent: ${text}`);
Use the MCP server with your AI agent
SETUP GUIDE

Connect Nextdns API Tool with your Agent

1

Install Composio

typescript
npm install @composio/openai
Install the Composio SDK
2

Initialize Composio and Create Tool Router Session

typescript
import OpenAI from 'openai';
import { Composio } from '@composio/core';
import { OpenAIResponsesProvider } from '@composio/openai';

const composio = new Composio({
  provider: new OpenAIResponsesProvider(),
});
const openai = new OpenAI({});
const session = await composio.create('your-user-id');
Import and initialize Composio client, then create a Tool Router session
3

Execute Nextdns Tools via Tool Router with Your Agent

typescript
const tools = session.tools;
const response = await openai.responses.create({
  model: 'gpt-4.1',
  tools: tools,
  input: [{
    role: 'user',
    content: 'Download DNS logs for my main profile from last week'
  }],
});
const result = await composio.provider.handleToolCalls(
  'your-user-id',
  response.output
);
console.log(result);
Get tools from Tool Router session and execute Nextdns actions with your 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
FAQ

Frequently asked questions

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.

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

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

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

Start with Nextdns.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Nextdns tool your agent needs.Free to start.

Start building