AgentStack
MCP verified MIT Self-run

Nextdns Mcp

mcp-dmeiser-nextdns-mcp · by dmeiser

A Model Context Protocol (MCP) server for the NextDNS API, built with FastMCP and generated from OpenAPI specifications.

No reviews yet
0 installs
13 views
0.0% view→install

Install

$ agentstack add mcp-dmeiser-nextdns-mcp

✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access Used
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets Used
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

Are you the author of Nextdns Mcp? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

NextDNS MCP Server

A Model Context Protocol (MCP) server for the NextDNS API, built with FastMCP and generated from OpenAPI specifications.

Overview

This project provides an MCP server that exposes NextDNS API operations as tools that can be used by AI assistants and other MCP clients. The server is automatically generated from a comprehensive OpenAPI specification using the FastMCP library.

Features

  • Domain-grouped CRUD tools exposing the full NextDNS API surface through ~8 high-level tools
  • Profile Management: Full CRUD operations - create, read, update, and delete profiles
  • Profile Access Control: Fine-grained read/write restrictions per profile, with read-only mode support
  • DNS-over-HTTPS Testing: Perform DoH lookups to test DNS resolution through profiles
  • Settings Configuration: Comprehensive grouped settings management including logs, block page, and performance
  • Logs: Query log retrieval, download, and clearing
  • Analytics: Comprehensive DNS query analytics and statistics, including time-series and plotting
  • Content Lists: Manage denylist, allowlist, privacy blocklists, native tracking, security TLDs, and parental control
  • Security: Complete security settings and TLD blocking configuration
  • Privacy: Privacy settings, blocklists, and native tracking protection management
  • Parental Control: Settings management with safe search and YouTube restrictions
  • OpenAPI-backed: Tool behaviors are driven by [nextdns-openapi.yaml](src/nextdns_mcp/nextdns-openapi.yaml)
  • Docker MCP Gateway: Full integration with Docker's MCP Gateway for secure, isolated deployment
  • Docker Support: Containerized deployment with proper OCI labels
  • Safety Mechanisms: Write operation protections and validation

Documentation

Complete documentation can be found in [docs/index.md](docs/index.md).

Quick Start

Prerequisites

  • Python 3.12+
  • uv (for development)
  • Docker (for containerized deployment)
  • NextDNS API key (get one here)

Configuration

  1. Copy the .env.example file to .env:

``bash cp .env.example .env ``

  1. Edit .env and set your NextDNS API key:

```env NEXTDNSAPIKEY=yourapikeyhere NEXTDNSDEFAULTPROFILE=yourprofileid # Optional NEXTDNSTESTPROFILE=testprofile_id # For write operation tests

# Optional: Profile access control (see Profile Access Control section) # NEXTDNSREADABLEPROFILES=profile1,profile2 # NEXTDNSWRITABLEPROFILES=testprofile # NEXTDNSREAD_ONLY=false ```

Running with Docker

  1. Build the Docker image:

``bash docker build -t nextdns-mcp:latest . ``

  1. Run the container with environment variables:

Option A: Direct environment variables (simple) ``bash docker run -i --rm \ -e NEXTDNS_API_KEY=your_api_key_here \ -e NEXTDNS_DEFAULT_PROFILE=your_profile_id \ nextdns-mcp:latest ``

Option B: Docker secrets (recommended for production) ```bash # Create secret echo "yourapikeyhere" | docker secret create nextdnsapi_key -

# Run with Docker Swarm docker service create \ --name nextdns-mcp \ --secret nextdnsapikey \ -e NEXTDNSAPIKEYFILE=/run/secrets/nextdnsapi_key \ nextdns-mcp:latest ```

Or for non-swarm (using mounted file): ```bash # Create a secret file echo "yourapikeyhere" > /tmp/apikey.txt chmod 600 /tmp/api_key.txt

# Run with mounted secret docker run -i --rm \ -v /tmp/apikey.txt:/run/secrets/nextdnsapikey:ro \ -e NEXTDNSAPIKEYFILE=/run/secrets/nextdnsapikey \ nextdns-mcp:latest ```

Option C: Environment file (development) ``bash docker run -i --rm \ --env-file .env \ nextdns-mcp:latest ``

Note: MCP servers use stdio (standard input/output) for communication, not HTTP ports.

Alpine variant

An Alpine Linux image is also available. To build it locally, use Dockerfile.alpine:

``bash docker build -f Dockerfile.alpine -t nextdns-mcp:alpine . ``

The published Alpine tags use the -alpine suffix (e.g. nextdns-mcp:alpine, nextdns-mcp:2.0-alpine). The python:3.14-slim image remains the recommended default.

Running Locally (Development)

  1. Install dependencies:

``bash uv sync ``

  1. Run the server:

``bash uv run python -m nextdns_mcp.server ``

Architecture

This server uses a modern, declarative approach:

  1. OpenAPI Specification ([nextdns-openapi.yaml](src/nextdns_mcp/nextdns-openapi.yaml)): Complete NextDNS API documentation
  2. FastMCP Foundation: Server initialized using FastMCP.from_openapi(), with atomic tools removed and replaced by grouped CRUD tools
  3. HTTP Client: Authenticated httpx.AsyncClient with profile-level access control for NextDNS API calls
  4. MCP Protocol: Tools, resources, and prompts exposed via Model Context Protocol

Key Components

  • src/nextdns_mcp/nextdns-openapi.yaml: OpenAPI 3.0 specification for NextDNS API
  • src/nextdns_mcp/server.py: FastMCP server implementation
  • catalog.yaml: Docker MCP Gateway catalog entry with server metadata
  • Dockerfile: Container definition with OCI labels for MCP Gateway
  • AGENT.md: Development guidelines and safety rules

Docker Tags

This project publishes official Docker images with a standardized tagging policy. The default image is based on python:3.14-slim; an Alpine Linux variant is also available and tagged with an -alpine suffix.

Primary (python:3.14-slim) tags
  • :latest: Floating tag that tracks the most recent successful build from the main branch. This tag is rebuilt on changes to main and via scheduled rebuilds.
  • :: Floating tag for the most recent build in a given major series (e.g., :2). This tag is updated whenever a new image for that major line is published and may include unreleased changes if the corresponding build comes from a branch head.
  • :.: Floating tag for the most recent build in a given minor series (e.g., :2.0). Like :, it is updated when new images are built for that series and may include unreleased changes.
  • :..: Tags for specific application releases (e.g., :2.0.3). These are intended to be immutable once published via the release workflow.
Alpine tags
  • :alpine: Floating tag for the most recent Alpine build from main.
  • :-alpine: Floating tag for the most recent Alpine build in a major series (e.g., :2-alpine).
  • :.-alpine: Floating tag for the most recent Alpine build in a minor series (e.g., :2.0-alpine).
  • :..-alpine: Specific Alpine release tag (e.g., :2.0.3-alpine).

All floating tags (:latest, :, :. and their -alpine counterparts) are rebuilt regularly to include the latest OS security updates and any application changes present in the source commit used for that build. Consumers who require strict version pinning should use the full :.. or :..-alpine tags.

License

This project is released under the [MIT License](LICENSE).

Contributing

  1. See AGENT.md for guidelines and architecture
  2. Note that NextDNS does not provide an OpenAPI specification. This is based on their documentation and may not reflect the current state of the API.

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet — be the first.

Versions

  • v0.1.0 Imported from the upstream source.