Nextdns Integration 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 Logo
Gradient Top
Gradient Middle
Gradient Bottom
divider

Supported Tools

Tools
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.
Toggle Block PageTool to enable or disable block page for a configuration.
Clear LogsTool to clear dns logs for a nextdns profile.
Create ProfileThis tool allows users to create a new nextdns profile.
Delete NextDNS ConfigurationTool to delete a nextdns configuration profile.
Download LogsTool to download dns logs for a profile.
Get Analytics DevicesTool to retrieve analytics aggregated by devices.
Get Analytics DomainsTool to retrieve analytics data for domains within a specific profile.
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 Query TypesTool to retrieve dns query counts broken down by query type.
Get Analytics ReasonsTool to retrieve dns query counts broken down by classification reason.
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 Profile DetailsRetrieves the details of a specific nextdns profile.
Get Setup InfoTool to get setup information for a provided configuration (profile).
List ConfigurationsTool to list all configurations (profiles) available on the nextdns account.
List Denylist DomainsTool to list domains in the denylist for a profile.
List Security SettingsTool to list current security options for a nextdns configuration.
List SettingsTool to list settings for a nextdns profile.
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.
NextDNS LoginTool to authenticate to the nextdns api.
Get Monthly QueriesTool to get the number of dns queries made in the current month for a profile.
Remove Blocked TLDTool to remove a top-level domain from the security blocklist for a nextdns profile.
Remove Denylist DomainTool to remove a domain from a profile's denylist.
Rename ConfigurationTool to rename a nextdns configuration (profile).
Set AI Threat DetectionTool to enable or disable ai threat detection for a nextdns configuration.
Toggle Cryptojacking ProtectionTool to enable or disable cryptojacking protection for a nextdns configuration.
Set CSAM BlockingTool to enable or disable blocking of child sexual abuse material domains for a nextdns profile.
Toggle DGA ProtectionTool to enable or disable dga (domain generation algorithm) protection for a nextdns configuration.
Set DNS Rebinding ProtectionTool to enable or disable dns rebinding protection for a nextdns configuration.
Set Homograph ProtectionTool to enable or disable homograph attack protection for a nextdns configuration.
Set Newly Registered DomainsTool to enable or disable blocking of newly registered domains for a nextdns profile.
Toggle Parked Domains BlockingTool to enable or disable blocking of parked domains for a nextdns configuration.
Set Safe BrowsingTool to enable or disable google safe browsing for a nextdns configuration.
Toggle Threat Intelligence FeedsTool to enable or disable real-time threat intelligence feeds for a nextdns configuration.
Toggle Typosquatting ProtectionTool to enable or disable typosquatting protection for a nextdns configuration.
Update linked IPTool to update the linked ip for a nextdns profile.
Update Performance SettingsTool to update performance settings of a nextdns profile.
Update Privacy SettingsTool to update privacy settings for a profile.
Update ProfileTool to update an existing profile.

Connect Nextdns MCP Tool with your Agent

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

Connect Nextdns API Tool with your Agent

Python
TypeScript

Install Composio

python
pip install composio_openai
Install the Composio SDK

Initialize Composio and Create Tool Router Session

python
from openai import OpenAI
from composio import Composio
from composio_openai import OpenAIResponsesProvider

composio = Composio(provider=OpenAIResponsesProvider())
openai = OpenAI()
session = composio.create(user_id='your-user-id')
Import and initialize Composio client, then create a Tool Router session

Execute Nextdns Tools via Tool Router with Your Agent

python
tools = session.tools
response = openai.responses.create(
  model='gpt-4.1',
  tools=tools,
  input=[{
    'role': 'user',
    'content': 'Download DNS logs for my main profile from last week'
  }]
)
result = composio.provider.handle_tool_calls(
  response=response,
  user_id='your-user-id'
)
print(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

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
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
ASU
Letta
glean
HubSpot
Agent.ai
Altera
DataStax
Entelligence
Rolai
Context
ASU
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.