Tophost DNS MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Tophost DNS MCP List the DNS records for my domain example.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Tophost DNS MCP
MCP server for the unofficial Tophost DNS API.
This project is unofficial and is not affiliated with, endorsed by, or supported by Tophost.
The server exposes the DNS operations implemented by tophost-dns-api as
Model Context Protocol tools. It does not talk to the Tophost control panel
directly.
MCP client / AI agent
|
v
Tophost DNS MCP
|
v
Tophost DNS API
|
v
TophostThe separation is intentional: Tophost authentication, trusted 2FA, product
discovery, HTML parsing and DNS protocol details remain inside
tophost-dns-api. This repository is only the MCP tool layer.
Status
Initial implementation. The package targets the current stable v2 line of the official Python MCP SDK.
Related MCP server: Spaceship MCP Server
Requirements
Python 3.11 or newer
a running
tophost-dns-apiinstancethe API key configured by that instance
Installation
git clone https://github.com/DanielVd/tophost-dns-mcp.git
cd tophost-dns-mcp
python -m venv .venv
. .venv/bin/activate
pip install -e .For development:
pip install -e '.[dev]'Configuration
export TOPHOST_DNS_API_URL=http://127.0.0.1:8765
export TOPHOST_API_KEY='replace-me'Optional:
export TOPHOST_MCP_REQUEST_TIMEOUT=20The MCP process does not need TOPHOST_USER, TOPHOST_PASS, OTP values or
trusted 2FA state. Those remain configured only in tophost-dns-api.
Running
The default transport is stdio:
tophost-dns-mcpFor Streamable HTTP:
tophost-dns-mcp \
--transport streamable-http \
--host 127.0.0.1 \
--port 8000The MCP endpoint is the SDK default, /mcp.
For development with the MCP Inspector:
mcp dev src/tophost_dns_mcp/server.py:mcpTools
Tool | Mutation | Purpose |
| no | Check REST API reachability |
| no | List domains available to the account |
| no | List/filter DNS records |
| no | Read one record by current record ID |
| yes | Create a record; identical records are a no-op |
| yes | Update with mandatory expected-state guards |
| yes | Delete with mandatory expected-state guards |
Read-only and mutation tools include MCP tool annotations. These annotations are client hints only; they are not treated as an authorization mechanism.
Mutation safety
The MCP layer deliberately makes update and delete stricter than the REST API.
Before updating or deleting a record, first read it and pass both
expected_value and expected_priority back to the mutation tool. The REST
API verifies that the record has not changed in the meantime and refuses a stale
mutation.
The underlying API can change a Tophost record ID after an update. Always use the ID returned in the mutation result for subsequent operations.
Error handling
REST API application errors are converted into MCP tool errors with the stable
error code and message returned by tophost-dns-api.
Raw HTML, response bodies, API keys and authentication material are not included in tool errors.
Development
ruff check src tests
pytest -qRelated project
REST API and Tophost protocol implementation:
https://github.com/DanielVd/tophost-dns-api
License
MIT. See LICENSE.
Available Tools
7 toolscreate_dns_recordCreate DNS recordAIdempotent
Create a DNS record. The underlying API treats an already-identical record as a no-op.
Inputs: name (required), value (required), domain (required), record_type (required), +1 more. Returns: after, before, changed, message, +1 more
delete_dns_recordDelete DNS recordADestructive
Delete a DNS record using mandatory expected_value and expected_priority optimistic-concurrency guards. Read the record first and pass the observed state.
Inputs: domain (required), record_id (required), expected_value (required), expected_priority (required). Returns: after, before, changed, message, +1 more
get_dns_recordGet DNS recordARead-onlyIdempotent
Read one DNS record by its current Tophost record ID.
Inputs: domain (required), record_id (required). Returns: id, name, type, value, +1 more
list_dns_recordsList DNS recordsBRead-onlyIdempotent
List DNS records for one Tophost domain. Optional name, type and value filters can be combined.
Inputs: domain (required), name, value, record_type. Returns: result
list_domainsList Tophost domainsARead-onlyIdempotent
List domains discovered by the authenticated Tophost DNS API account.
Inputs: no named parameters. Returns: result
tophost_api_healthTophost DNS API healthARead-onlyIdempotent
Check whether the configured Tophost DNS REST API process is reachable.
Inputs: no named parameters. Returns: status
update_dns_recordUpdate DNS recordADestructive
Update a DNS record using expected_value and expected_priority as mandatory optimistic-concurrency guards. Read the record first and pass the observed state.
Inputs: domain (required), record_id (required), expected_value (required), expected_priority (required), +2 more. Returns: after, before, changed, message, +1 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct action: health check, listing domains, listing/reading records, and create/update/delete operations. There is no overlap between list and get-by-ID, and update/delete are clearly separated by their optimistic-concurrency guards.
Most tools follow a clear verb_noun snake_case pattern (list/get/create/update/delete). The health check tool uses a noun-style name with a vendor prefix, which is a minor deviation, but it does not create confusion.
Seven tools is a well-scoped size for a DNS record management server: one health check, one domain enumeration tool, and a full record lifecycle. No tool feels redundant or superfluous.
The set covers the core DNS record lifecycle completely (list, get, create, update, delete) plus domain discovery and API health. There are no obvious missing operations for the stated purpose.
Maintenance
Related MCP Connectors
29 DNS, SEO, SSL, security, WHOIS & mail tools for AI agents. Pay per call (x402) or card API key.
Register, transfer and manage domain names and DNS from your AI agent.
Custom domains for SaaS and AI agents: search, register, connect DNS, and issue HTTPS over MCP.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseAqualityDmaintenanceA Model Context Protocol server implementation that allows AI agents to manage DNS records for domains hosted on Cloudflare by providing tools to list, create, update, and delete various types of DNS records.570 npm3GPL 3.0
- AlicenseBqualityCmaintenanceEnables AI agents to manage DNS records through the Spaceship API, with specialized tools for common record types like A, AAAA, CNAME, MX, SRV, and TXT.1013MIT
- AlicenseAqualityBmaintenanceOfficial Porkbun MCP server, maintained by Porkbun. Check availability and pricing, register, renew and transfer domains, and manage DNS, nameservers, URL forwarding, glue, DNSSEC, DNS restore points, static hosting, webhooks and Cloudflare-connected domains. Hosted at mcp.porkbun.com/mcp with Porkbun sign-in (no API key), or run locally with npx @porkbunllc/mcp-server. Docs: porkbun.com/mcp1543,021 npm36MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to manage Cloudflare DNS records, including listing zones and records, and creating, updating, or deleting DNS records.681 npmMIT