Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
NEXTDNS_API_KEYNoYour NextDNS API key
NEXTDNS_READ_ONLYNoSet to 'true' to enable read-only mode
NEXTDNS_API_KEY_FILENoPath to a file containing the API key
NEXTDNS_TEST_PROFILENoProfile ID for write operation tests
NEXTDNS_DEFAULT_PROFILENoOptional default profile ID
NEXTDNS_READABLE_PROFILESNoComma-separated list of readable profiles
NEXTDNS_WRITABLE_PROFILESNoComma-separated list of writable profiles

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
manageProfilesA

Manage NextDNS profiles.

NextDNS profiles are named configurations that contain DNS settings, blocklists, analytics, and logs. Most other tools require a profile_id from this tool.

Operations: - list: Return all profiles the API key can access. - create: Create a new profile (requires name). - get: Retrieve a single profile (requires profile_id). - update: Rename a profile (requires profile_id and name). - delete: Remove a profile (requires profile_id).

Examples: - list: manageProfiles(operation="list") - create: manageProfiles(operation="create", name="Home Network") - get: manageProfiles(operation="get", profile_id="abc123")

manageSettingsA

Manage a settings category for a NextDNS profile.

Settings categories: - general: Core profile settings (e.g., name, web3 blocking). - privacy: Privacy features such as disguised-tracker blocking and affiliate links. - security: Threat intelligence, Google Safe Browsing, typosquatting protection. - parental: Parental control enablement (safe search, YouTube restricted mode). - performance: ECS, cache boost, and other performance options. - logs: Query-logging enablement and retention. - blockpage: Whether to show a custom block page for blocked queries.

Operations: - get: Retrieve current settings for the category. - update: Apply new settings (requires settings payload).

The settings argument can be a Python dict or a JSON string. For update, first call get to see the current schema, then send only the fields you want to change.

Examples: - get: manageSettings(operation="get", category="privacy", profile_id="abc123") - update: manageSettings(operation="update", category="privacy", profile_id="abc123", settings={"disguisedTrackers": True})

manageListsA

Manage allow/deny/block lists for a NextDNS profile.

List types: - allowlist / denylist: Always-allow or always-block specific domains. - privacy_blocklists: Subscribed blocklists (e.g., nextdns-recommended). - privacy_natives: Native tracking blockers (e.g., apple, facebook). - security_tlds: Dangerous top-level domains to block (e.g., zip). - parental_categories: Content categories (e.g., gambling, porn). - parental_services: Specific apps/services (e.g., tiktok, youtube).

Operations: - get: Return the current list. - add: Append one entry (pass entry as {"id": "value"} or as a plain id string). - remove: Delete one entry by entry_id. - update: Toggle an existing entry by entry_id (pass entry={"active": True|False}). Only supported for allowlist, denylist, parental_categories, and parental_services. - replace: Replace the entire list with entries (list of dicts).

Examples: - get: manageLists(list_type="denylist", operation="get", profile_id="abc123") - add: manageLists(list_type="denylist", operation="add", profile_id="abc123", entry={"id": "example.com"}) - remove: manageLists(list_type="denylist", operation="remove", profile_id="abc123", entry_id="example.com") - replace: manageLists(list_type="privacy_blocklists", operation="replace", profile_id="abc123", entries=[{"id": "nextdns-recommended"}])

manageRewritesA

Manage DNS rewrite entries for a NextDNS profile.

Rewrites let you return a custom answer for a hostname. Typical uses:

  • Point an internal hostname to a private IP.

  • Block a domain by rewriting it to 0.0.0.0.

Operations: - list: Show existing rewrites. - add: Create a rewrite (requires name and content). - delete: Remove a rewrite (requires entry_id from list).

Examples: - list: manageRewrites(operation="list", profile_id="abc123") - add: manageRewrites(operation="add", profile_id="abc123", name="router.home", content="192.168.1.1") - delete: manageRewrites(operation="delete", profile_id="abc123", entry_id="router.home")

manageLogsA

Manage query logs for a NextDNS profile.

Operations: - get: Return recent query log entries (use limit to cap results). Set raw=true to bypass deduplication/noise filtering. - clear: Delete all stored logs for the profile. - download: Download retained logs as CSV. from_time and to_time are ignored by the NextDNS download endpoint.

Time values can be Unix timestamps or relative strings like -1d or -7d. They are only used by get.

Examples: - get recent: manageLogs(operation="get", profile_id="abc123", limit=10) - get raw logs: manageLogs(operation="get", profile_id="abc123", raw=true) - download: manageLogs(operation="download", profile_id="abc123", from_time="-1d") - clear: manageLogs(operation="clear", profile_id="abc123")

queryAnalyticsA

Query NextDNS analytics metrics.

Metrics: - status: Query resolution status (default, blocked, allowed, relayed). - devices: Queries per device. - protocols: DNS transport protocol (DoH, DoT, Do53 UDP/TCP, DoQ). - queryTypes: DNS record types requested (A, AAAA, CNAME, etc.). - ipVersions: IPv4 vs IPv6 queries. - dnssec: DNSSEC validation results. - encryption: Encrypted vs unencrypted queries. - reasons: Why queries were blocked or allowed. - ips: Top source IPs. - destinations: Top destinations; requires destination_type such as countries or gafam.

Set series=true to fetch time-series data instead of aggregate totals. Time values can be Unix timestamps or relative strings like -1d. Note: series=true is not supported when metric="domains".

Optional filters: - cursor: Pagination cursor from a previous response. - device: Filter analytics to a single device id. - status: For the domains metric, filter by resolution status. - root: For the domains metric, group results by root domain (boolean).

Examples: - totals: queryAnalytics(metric="status", profile_id="abc123", from_time="-1d") - time series: queryAnalytics(metric="status", profile_id="abc123", from_time="-1d", series=true) - destinations: queryAnalytics(metric="destinations", profile_id="abc123", from_time="-1d", destination_type="countries")

plotAnalyticsB

Generate a PNG line chart for a NextDNS analytics time-series metric.

Use this to visualize query trends over time. The profile should have recent query history; otherwise the tool returns an error explaining that no data is available.

Supported metrics: status, devices, protocols, queryTypes, ipVersions, dnssec, encryption, reasons, ips.

Time values can be Unix timestamps or relative strings like -1d.

Examples: - plotAnalytics(metric="status", profile_id="abc123", from_time="-1d") - plotAnalytics(metric="devices", profile_id="abc123", from_time="-7d", interval=86400)

Returns: An MCP ImageContent PNG chart, or an error dict if data is unavailable.

dohLookupB

Perform a DNS-over-HTTPS lookup using a NextDNS profile.

Prompts

Interactive templates invoked by user choice

NameDescription
nextdns-usage-guideComprehensive guide for using the NextDNS MCP server tools

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dmeiser/nextdns-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server