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 MCPList 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: Gandi 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.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| value | Yes | ||
| domain | Yes | ||
| priority | No | ||
| record_type | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| after | No | |
| before | No | |
| changed | Yes | |
| message | No | |
| dns_serial | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare idempotentHint=true, and the description's no-op statement aligns with that. It adds slight nuance by specifying that only an 'already-identical record' is a no-op, but it does not disclose other behavioral details like conflict behavior or prerequisites.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, front-loaded with the core action, and contains no filler. The second sentence adds useful idempotency nuance without bloating the text.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 5-parameter creation tool with no parameter descriptions, the definition is incomplete. The output schema covers return values, but the agent still lacks info about parameter formats, record type constraints, and domain existence requirements.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the description does not explain the 5 parameters. The phrase 'DNS record' gives general context, but it does not clarify fields like value, record_type, or priority for different DNS record types.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Create') and resource ('DNS record'), and the sibling set includes list/get/update/delete operations, so this tool is unambiguous. The no-op clarification does not obscure the purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use the tool: when a DNS record needs to be created. However, it does not explicitly contrast with update_dns_record or say when NOT to use it, such as when modifying an existing record.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | ||
| record_id | Yes | ||
| expected_value | Yes | ||
| expected_priority | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| after | No | |
| before | No | |
| changed | Yes | |
| message | No | |
| dns_serial | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already mark the tool as destructive and non-read-only. The description adds meaningful behavioral context by disclosing mandatory optimistic-concurrency guards and the read-before-delete workflow, which helps the agent avoid failed or stale deletions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two tightly packed sentences: the first names the operation and its defining guard requirement, the second gives the necessary precondition. No filler or redundant restatement.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the essential precondition and the meaning of the required parameters for a destructive 4-parameter operation, while the output schema handles return-value expectations. It could be slightly stronger by naming get_dns_record as the read step, but it is still complete enough for correct use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description compensates by explaining that expected_value and expected_priority are observed-state guards rather than arbitrary values. Domain and record_id remain self-explanatory from their names, but are not explicitly described; the critical guard semantics are well covered.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action and resource: 'Delete a DNS record'. This directly distinguishes it from the sibling list/get/create/update operations, and the additional guard details clarify what form of delete this tool performs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives clear operational context: callers must read the record first and supply the observed state as expected_value and expected_priority. It does not explicitly name alternative tools or exclusions, but the precondition and invocation guidance are unambiguous.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_dns_recordGet DNS recordARead-onlyIdempotent
Read one DNS record by its current Tophost record ID.
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | ||
| record_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| id | Yes | |
| name | Yes | |
| type | Yes | |
| value | Yes | |
| priority | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, openWorldHint, and idempotentHint, so the description does not need to restate safety. It adds the useful detail that the record ID is the current Tophost ID, but it does not describe not-found behavior or any other edge cases. This is consistent with the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence with no redundant wording. It states the action, the target, and the identifying mechanism without waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read operation with two required parameters, an output schema, and annotation-covered safety, the description is nearly complete. The only minor gap is not explicitly connecting to list_dns_records as the way to obtain the record ID, but that is not required for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description needed to explain both parameters. It partially does this by clarifying that record_id is the current Tophost record ID, but it leaves the domain parameter completely to inference.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Read'), a specific resource ('one DNS record'), and the key identifier ('current Tophost record ID'). This clearly distinguishes it from list_dns_records, which would return multiple records.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The phrase 'one DNS record' implies this is for a targeted lookup when the record ID is known, but it does not explicitly name alternatives or state when not to use this tool. Context from sibling names helps, but the description itself leaves the routing implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_dns_recordsList DNS recordsBRead-onlyIdempotent
List DNS records for one Tophost domain. Optional name, type and value filters can be combined.
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| value | No | ||
| domain | Yes | ||
| record_type | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and idempotentHint=true, so the description doesn't need to repeat safety. It adds that filters can be combined and that it targets a single domain, which is useful. However, it does not disclose potential behavioral nuances like pagination, result limits, or whether the filter is exact match or substring.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences with no redundancy. The primary action and scope are front-loaded, and the optional filters are stated in one compact sentence. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return format doesn't need explanation. Annotations cover safety. The description covers scope and filters adequately for a basic listing tool. However, it leaves gaps: it doesn't clarify the filter parameter names (especially 'type' vs 'record_type'), doesn't mention any limits or pagination, and doesn't specify whether multiple domains can be queried at once (though 'one' suggests not). For a simple tool it's passable but not complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With schema description coverage at 0%, the description must compensate, but it only mentions 'name, type and value' while the schema uses 'record_type' instead of 'type'. This mismatch could confuse. It does not explain the meaning of each filter (e.g., whether 'name' is a hostname prefix, whether 'value' is IP address, etc.), nor any constraints on combining them. It adds minimal value beyond the schema itself.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('List'), the resource ('DNS records'), and the scope ('for one Tophost domain'). It is specific enough to distinguish from list_domains (which lists domains) and get_dns_record (which likely fetches a single record), though it does not explicitly name alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus sibling tools. It does not mention that it lists all records for a domain while get_dns_record fetches a specific one, or that create/update/delete are for modifications. The only usage note is that filters can be combined, which relates to parameters rather than tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_domainsList Tophost domainsARead-onlyIdempotent
List domains discovered by the authenticated Tophost DNS API account.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=true, so the safety profile is covered. The description adds the 'discovered by the authenticated account' scope, which is useful context beyond the annotations. No contradiction.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
One sentence, front-loaded with the action and resource, no wasted words. It earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter read-only list tool with an output schema and safety annotations, the description is nearly complete. It could mention that it returns all discovered domains, but the output schema likely covers that.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, so the schema is trivially complete. The description adds the meaning of the result scope (domains discovered by the authenticated account), which is the only semantic context needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('List') and resource ('domains discovered by the authenticated Tophost DNS API account'). It clearly distinguishes from sibling tools that operate on DNS records, though it doesn't explicitly name a sibling.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context: it lists domains from the authenticated account, which is distinct from record-level tools. However, it doesn't explicitly state when to use this tool versus alternatives or mention any exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
tophost_api_healthTophost DNS API healthARead-onlyIdempotent
Check whether the configured Tophost DNS REST API process is reachable.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| status | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, openWorldHint, and idempotentHint, covering the operation's safety profile. The description adds that it checks reachability of a configured process, which is helpful but does not elaborate on response or failure behavior; the output schema likely covers that.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, direct sentence that front-loads the core action ('Check whether') and specifies the target resource. No filler, no repetition of the title or schema.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter, read-only health check with output schema and safety annotations, the description provides all necessary context. An agent can confidently invoke it without additional guidance.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the description does not need to explain parameter semantics. The baseline of 4 applies because there is no parameter burden for the agent to interpret.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('check') and a clear resource ('configured Tophost DNS REST API process'), stating exactly what the tool does. It clearly reads as a health-check operation and is distinct from the CRUD operations of its siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The purpose is self-evident: verify API reachability before or alongside DNS operations. It does not explicitly name alternatives or exclusions, but with no parameters and a dedicated health-check scope, the intended usage context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| value | No | ||
| domain | Yes | ||
| priority | No | ||
| record_id | Yes | ||
| expected_value | Yes | ||
| expected_priority | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| after | No | |
| before | No | |
| changed | Yes | |
| message | No | |
| dns_serial | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the annotations, the description discloses an important behavioral detail: the update is guarded by optimistic concurrency, so stale observed state will not silently overwrite changes. It also warns that the guard is mandatory, which is useful operational context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences, with the core action and concurrency constraint front-loaded, followed by the required workflow. No filler or redundant restatement of the title.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Annotations and output schema cover safety and return expectations, and the description covers the key precondition and guard behavior. However, the parameter documentation gap and lack of explicit sibling alternatives leave the definition less than fully self-contained.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description must compensate for parameter meaning, but it only explains expected_value and expected_priority as guards. It does not clarify domain, record_id, value, or priority, leaving the agent to infer their roles.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Update') and resource ('DNS record'), and adds a distinguishing mechanism: mandatory optimistic-concurrency guards via expected_value and expected_priority. This clearly separates it from create/delete/list/get siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives an explicit precondition: read the record first and pass the observed state. It does not explicitly name sibling tools like get_dns_record as the read step, but the workflow implication is clear enough for an agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
7 tool updates
v0.1.0- First observed
create_dns_record - First observed
delete_dns_record - First observed
get_dns_record - First observed
list_dns_records - First observed
list_domains - First observed
tophost_api_health - First observed
update_dns_record
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
Custom domains for SaaS and AI agents: search, register, connect DNS, and issue HTTPS over MCP.
MCP server for DNSimple — domains, DNS zone records, availability, pricing and contacts.
Hosted MCP with 91 agent tools: X, domains, SEO, Maps, Trends, Search, YouTube, TikTok, and more.
Find, vet, and run MCP tools through a secure audited gateway with prompt-injection risk scoring
Related MCP Servers
- AlicenseAqualityFmaintenanceA 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.5362 npm3GPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Gandi domains and LiveDNS records directly via the Gandi API v5. It supports comprehensive domain management operations and full CRUD functionality for various DNS record types.3MIT
- AlicenseBqualityDmaintenanceEnables 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
- AlicenseAqualityCmaintenanceExposes the Porkbun v3 API as MCP tools for AI agents to manage domains, DNS, SSL, URL forwarding, and account settings.31832 npm31MIT