Skip to main content
Glama
NOTE

Not made by or affiliated with NextDNS. It uses the publicNextDNS API with your own API key.

Ask your AI app about your DNS in plain words. It looks at your stats and logs, and changes your blocklists, parental control and settings for you. Every change can be undone, and deleting things always asks you twice.

You: What got blocked on my phone today, and why?
AI:  Reads your NextDNS log: 214 blocked, mostly trackers from OISD, and one site
     from your denylist. Shows a chart.

You: My son's game doesn't load. Find out why and fix it.
AI:  Watches the live log while he opens it, sees roblox.com blocked by the
     "gaming" category, and asks if it should allow it on weekends only.

You: Block TikTok on the Kids profile, except Friday 6 to 9 pm.
AI:  Blocks TikTok and sets recreation time. Says how to undo it.

How it works

The server is a small program you run yourself. Your AI app talks to it through MCP (Model Context Protocol), the standard way AI apps use outside tools. The server talks to NextDNS through its official API, with your API key. Nobody else is in between: no account, no cloud service of ours, no tracking.

flowchart LR
    A["Your AI app<br/>(Claude, ChatGPT, Codex,<br/>Cursor, Gemini, ...)"] -->|MCP| S["NextDNS-Agent-MCP<br/>(on your computer or server)"]
    S -->|"API key"| N["NextDNS"]

More in docs/how-it-works.md.

Related MCP server: next-dns-mcp

Words you'll see

Word

What it means here

Profile

A NextDNS configuration (its lists, protections and settings). Devices use a profile through its address.

API key

The key that lets this server read and change your NextDNS account. It's at the bottom of my.nextdns.io/account.

Mode

What the AI may do with a profile: full (read and change), read (read only) or hidden.

Passphrase

A password you make up for the web version. It locks the settings page, and you type it once when you connect an AI app over the internet.

MCP

How AI apps plug into tools like this one.

Settings file

~/.config/nextdns-agent-mcp/.env on a computer. Hosting companies use their own "Variables" page instead.

Data folder

Where the server keeps its own files (change log, logins, backups): ~/.config/nextdns-agent-mcp/state on a computer, /data in Docker and on hosting companies.

Choose how to run it

Where it runs

Works on your phone

Cost

Guide

Claude Desktop extension

Your computer, inside Claude Desktop

No

Free

claude-desktop-extension.md

1. Your computer

Mac, Windows or Linux, for any AI app on it

Only with a tunnel

Free

setup-computer.md

2. A hosting company

Railway, Render or any host that runs Docker

Always

A few dollars a month

setup-hosting.md

3. Your own server

Any server with Docker

Always

Free to cheap

setup-own-server.md

TIP

Not sure? Start with1, free, on your computer. Move to 2 when you want it on your phone all the time.

Using an AI coding agent like Claude Code, Codex or Cursor? Ask it to set this up for you: AGENTS.md gives it a checklist.

What it can do

Look. Your profiles and every setting in plain words. Analytics: allowed and blocked, top domains, block reasons, devices, IPs, protocols, query types, DNSSEC, encryption, countries and big tech companies, for any time span and also over time. Charts as pictures. The query log, searched and filtered, or downloaded.

Find out why. check_domain makes a real DNS query through the profile and tells you if a domain is blocked, and by what: the denylist, a blocklist, a category. watch_logs watches queries live while you open an app.

Change. The denylist and allowlist (many at once), privacy blocklists and native tracker protection, every security protection and blocked TLDs, parental control (services, categories, safe search, YouTube restricted mode, recreation time), DNS rewrites, logs, block page and performance settings. Everything the NextDNS API allows.

Profiles. Create a profile (with NextDNS's usual protections, empty, or as a copy of another), compare two profiles, rename them.

Undo. Every change is saved with how things were before. Ask "undo that", or press Undo on the settings page.

Backups. Save a full copy of a profile, download it as a file, and put it back later, or make a new profile from it.

Ask twice. Deleting a profile, clearing logs and overwriting a profile from a backup need a double confirmation: the AI must ask you and get a yes first.

Updates, if you want them. Get told when there's a new release, or let it update itself, official releases only. See docs/updates.md.

A settings page. On the web version, open /settings to paste your API key, choose what the AI may do with each profile, see and disconnect AI apps, undo changes, and manage backups.

All 23 tools: docs/tools.md. Ideas for what to ask: docs/examples.md.

Safety and privacy

  • Your choice, per profile: full, read only or hidden. Hidden profiles are never shown to the AI.

  • Your choice, per app: each AI app connected over the internet gets only the profiles you tick, with or without changes.

  • Undo for every change, and a double confirmation for anything that deletes or overwrites.

  • A brake: at most 30 changes a minute, and a read-only switch for everything.

  • Your key stays yours: it goes only to NextDNS, and is stored encrypted when you paste it on the settings page.

More in docs/safety.md and docs/privacy.md.

Quick start (about 5 minutes)

  1. Install uv, a small free tool that installs Python programs.

  2. Install the server:

    uv tool install git+https://github.com/s17sh70x2jfl031ag/NextDNS-Agent-MCP
  3. Get your API key: sign in at my.nextdns.io/account, scroll to the bottom (API), show the key and copy it.

  4. Save it in the settings file:

    mkdir -p ~/.config/nextdns-agent-mcp
    echo "NEXTDNS_API_KEY=paste-your-key-here" > ~/.config/nextdns-agent-mcp/.env
  5. Check it. It lists your profiles and changes nothing:

    nextdns-agent-mcp check
  6. Connect your AI app. For example Claude Code:

    claude mcp add -s user nextdns -- nextdns-agent-mcp stdio

    For Claude Desktop, ChatGPT, Codex, Cursor, VS Code, Gemini CLI, OpenClaw, Hermes Agent, Goose, Cline, Roo Code, Continue, Windsurf, Zed, LM Studio, OpenCode, Kiro, GitHub Copilot CLI, Amp, Warp, JetBrains AI Assistant, Qwen Code, Crush, Augment Code and any other MCP app, see docs/connect-your-ai.md.

  7. Ask your AI: "Use the NextDNS tools: what got blocked today?"

All the guides

Guide

Read it when

Claude Desktop extension

You use Claude Desktop and want one click

Setup on your computer

You want to try it, free, with any AI app

Setup on a hosting company

You want it on your phone, always on

Setup on your own server

You have a server with Docker

Connect your AI app

The server runs and you want to use it

Profiles and apps

You want to choose what the AI may see and change

Every tool

You want to know what it can do

Things to ask

You want ideas

Undo and backups

Something changed and you want it back

Every setting

You want to change modes, limits or ports

Safety

Before you let an AI change your DNS

Privacy

You want to know what is kept and where

How it works

You want to know how it works inside

Languages

You want the pages in your language

Updates

You want the newest version

Questions people ask

You have a quick question

Troubleshooting

Something doesn't work

Roadmap

You want to know what's planned

CHANGELOG.md

You want to know what changed in each version

CONTRIBUTING.md

You want to report a bug or send a fix

AGENTS.md

You (or your AI coding agent) want to change the code or set it up

Help and feedback

You want to

Go to

Fix a problem yourself

Troubleshooting

Report a bug

Something doesn't work

Ask a question or share an idea

Question

Report a security problem, privately

Private report (SECURITY.md)

Issues are public, so leave out your API key, profile IDs and anything from your logs.

Credits

NextDNS-Agent-MCP was made by s17sh70x2jfl031ag. NextDNS is a trademark of its owners; this project isn't made by or affiliated with them.

GitHub's "Cite this repository" button uses CITATION.cff.

License

Apache License 2.0, with the notices in NOTICE. Copyright 2026 s17sh70x2jfl031ag and NextDNS-Agent-MCP contributors.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Enables AI assistants to manage NextDNS profiles, settings, logs, analytics, and security configurations through 70+ operations via the Model Context Protocol.
    8
    15
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI assistants to securely control a real, logged-in browser with per-site permissions, per-action approvals, secret redaction, and a tamper-evident audit log, all locally without a cloud relay.
    342,947 npm
    1
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables Claude to read and manage a DNS server on the user's own machine through its HTTP API, covering stats, settings, zones, logs, users, ad blocking, cache flushing, and DNS records. Every call carries a safety level, so read actions run immediately while changes and destructive operations require explicit confirmation, with credentials kept local and downloads written to disk rather than chat.
    11
    MIT