The domain CLI and MCP server built for AI agents
dna is the official command line tool and MCP server of Domain Name API. Copy a ready-made prompt into Claude or ChatGPT and your assistant installs it, connects it and gets to work on your domains, DNS, SSL and hosting. Anything that costs money waits for your yes.
Set up dna in Claude Code
Set up the dna CLI for me (https://github.com/domainreseller/cli). 1. Install it with the official install script for my operating system, then run `dna version` and `dna doctor`. 2. Install the Claude Code skill with `dna agent skill --install` and add the MCP server with `claude mcp add dna -- dna mcp serve --env ote`. 3. Don't ask me to paste my API key into this chat. Tell me to run `dna auth login --env ote` myself, then check the connection with `dna --ote account get`. Work only in the OTE test environment and never use `--yes` without my approval.
Set up dna in ChatGPT Codex
Set up the dna CLI for me (https://github.com/domainreseller/cli). 1. Install it with the official install script for my operating system, then run `dna version` and `dna doctor`. 2. Add it to my Codex config (`~/.codex/config.toml`) as an MCP server named `dna` with the command `dna` and the arguments `mcp serve --env ote`. 3. Don't ask me to paste my API key into this chat. Tell me to run `dna auth login --env ote` myself, then check the connection with `dna --ote account get`. Work only in the OTE test environment and never use `--yes` without my approval.
No terminal? Ask ChatGPT or Claude chat
Read https://raw.githubusercontent.com/domainreseller/cli/main/llms.txt and the dna docs it links to. Then give me the exact dna commands, step by step, to register a domain in the OTE test environment: install, log in, search, preview with `--dry-run` and register. Explain what each command does.
Copy a prompt, paste it into your AI assistant and let it do the work. Every prompt starts in the OTE test environment and stops for your approval before anything billable.
- 64API operations
- 65MCP tools
- 4safety classes
- 6platforms, one binary
- Apache-2.0open source license
Ready-made prompts for Claude and ChatGPT
Change the domain names, paste a prompt into your assistant and watch it work. Each one says where to stop, so nothing billable happens without you.
Find and register a domain
With dna, check whether brandname.com, brandname.net and brandname.io are available. Show the results with prices in a table, then preview the registration of the cheapest available one with `--dry-run`. Don't register anything until I say yes.
domain bulk-search · domain registerbillableUpcoming renewals
With dna, list my domains that expire in the next 60 days with their renewal prices, sorted by expiry date. Don't renew anything.
domain list · domain renew-checkreadPoint a domain to a server
With dna, point example.com to 203.0.113.10: add A records for `@` and `www`, then show me the final DNS zone. Ask me before changing or deleting any existing record.
dns add · dns listwriteTransfer a domain in
With dna, check whether example.org can be transferred to my account, tell me what I still need (auth code, unlocking) and preview the transfer with `--dry-run`.
domain transfer-check · domain transferbillableOrder an SSL certificate
With dna, find the cheapest DV SSL certificate for example.com, create a CSR and preview the order. Wait for my approval before buying.
product ssls · ssl generate-csr · ssl initializebillableSay what you need. Your agent finds the right command.
Every API operation is a tool with a clear description and a JSON Schema, so assistants pick the right call and fill it in correctly the first time. You talk, dna does the exact work.
Your agent can't spend a cent without you
Every command has a safety class, and the class decides what happens. Looking around and free, reversible changes run straight away. Anything that charges your balance or can't be undone stops and asks first.
- read
Read
Search, list, domain info, prices and TLD rules.
Runs immediately - write
Write
DNS records, transfer lock, privacy and contacts. Free and reversible.
Runs immediately - destructive
Destructive
Deleting a record, revoking SSL, disabling DNSSEC.
Waits for your yes - billable
Billable
Register, renew, transfer, restore, SSL and hosting orders.
Waits for your yes
How the yes works
Gated tools take an extra confirm field. Most MCP clients also ask you before each tool call; the safety annotations help them flag the risky ones.
The agent asks first
It calls the tool without confirm. Nothing is sent. It gets back a preview of the exact request.
You decide
The agent shows you the domain, the period and the operation. You say yes or no.
It runs once
Only after your yes does it repeat the call with confirm=true. A billable call is never re-sent after a network error.
Decide how far it can reach
--env ote- Test environment: the real API, no real money
--read-only- Look, don't touch. Every change is blocked.
--no-billable- Everything except purchases
--groups domain,dns- Only the command groups you list
--dry-run- Print the exact HTTP request with the API key masked
From prompt to first domain in four steps, all in the sandbox
OTE is our test environment: the same API with its own API key and its own balance. Practise there, then switch to production with one flag.
Copy a prompt
Pick Claude Code, ChatGPT Codex or plain chat at the top of this page and copy it.
Paste it into your assistant
It installs dna, adds the MCP server and runs dna doctor to check the setup.
dna doctorLog in to OTE yourself
Run the login command in your own terminal and enter your reseller ID and OTE API key there, never in the chat.
dna auth login --env oteAsk in plain words
Search, preview with --dry-run, register. Anything that charges the test balance waits for your yes.
--dry-run
Prefer the terminal? Two commands and you're connected
Install the binary, then add dna mcp serve to your MCP client. Every API operation becomes a tool for Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, Codex CLI or Gemini CLI.
$ curl -fsSL https://raw.githubusercontent.com/domainreseller/cli/main/scripts/install.sh | shPS> irm https://raw.githubusercontent.com/domainreseller/cli/main/scripts/install.ps1 | iex$ go install github.com/domainreseller/cli/cmd/dna@latestA single binary with no dependencies. Every release ships with SHA-256 checksums.
- One tool per API operation, each with a JSON Schema built from the API spec
- dna_context tells the model whether it is on production or the test environment before it touches anything
- Expose only what you need with --groups or --read-only. A shorter tool list also saves context tokens.
- Agents that only have a shell get a Claude Code skill and a usage guide in one call
# connect to the test environment first
$ claude mcp add dna -- dna mcp serve --env ote
# read-only, shared with your team through .mcp.json
$ claude mcp add dna --scope project -- dna mcp serve --env ote --read-only {
"mcpServers": {
"dna": {
"command": "dna",
"args": ["mcp", "serve", "--env", "ote"]
}
}
} {
"servers": {
"dna": {
"type": "stdio",
"command": "dna",
"args": ["mcp", "serve", "--env", "ote"]
}
}
} [mcp_servers.dna]
command = "dna"
args = ["mcp", "serve", "--env", "ote"] # Claude Code skill: ~/.claude/skills/dna/SKILL.md
$ dna agent skill --install
# a compact guide for any agent's instructions
$ dna agent guide Run dna mcp config to print a ready snippet for every client.
All 64 API operations, grouped the way you think
If the reseller API can do it, so can dna. Every command's --help shows its safety class, its API route and examples.
dna domain
Search and bulk search, register, renew, transfer and restore. Transfer lock, privacy, auth code, nameservers, child hosts and forwarding.
dna dns · dna dnssec
Zone records on the platform nameservers, and DS records at the registry.
dna ssl
Generate a CSR, buy, configure, check status, download, reissue and revoke certificates.
dna hosting
Hosting plans and packages, new orders and their status.
dna contact
Reusable contact handles and their e-mail and phone verification.
dna account · product · order
Balance and transactions, the TLD catalogue with prices, and order status.
dna api
An authenticated raw request to any endpoint, with the same safety rules.
dna schema · enums · agent
Machine-readable descriptions of every operation, input and coded value, for agents and tool builders.
Built for pipes, cron jobs and pipelines
In a terminal you get readable tables. In a pipe you get JSON. Errors are JSON too, with exit codes that never change meaning, so a script always knows what went wrong.
- JSON when piped, JSON Lines for streams and a built-in --jq to keep output small
- Credentials from DNA_RESELLER_ID and DNA_API_KEY in CI, from a profile on your own machine
- No hidden prompts outside a terminal: a gated command exits with code 9 and sends nothing
- Inputs are checked before anything is sent, and rate limits are retried for you
# domains expiring in the next 30 days, as CSV
$ dna domain list --all \
--jq '.items[] | select(.remainingDay <= 30) | [.domainName, .expirationDate] | @csv'
# check many names at once
$ dna domain bulk-search brand.com brand.net brand.io \
--jq '.infos[] | "\(.domainName)\t\(.status)\t\(.price)"'
# in a script, a purchase without --yes stops here
$ dna domain renew example.com --period 1
exit 9 confirmation required · nothing sent | 0 | success | 6 | rate limited |
|---|---|---|---|
| 2 | invalid input, nothing sent | 7 | server error |
| 3 | authentication | 8 | network |
| 4 | not found | 9 | confirmation required |
| 5 | rejected by the API | 10 | read-only mode |
CLI, SDK, REST API or a ready-made module?
They all talk to the same reseller API with the same credentials. Pick the one that fits where the work happens.
CLI & MCP server
When a person, a script or an AI agent does the work: daily operations, automation, CI and assistants such as Claude or Cursor.
SDKs
When you build domain features into your own application. PHP, Node.js, Python, Ruby and Go.
See the SDKsREST API
When you want full control over every request, in any language. JSON over HTTPS with two headers.
Read the API guideBilling modules
When you sell through WHMCS, Blesta, HostBill, WiseCP or Clientexec and want everything to run on its own.
See the integrationsWhat people ask before connecting an agent
Short, straight answers. The README on GitHub covers every detail.
Read the full documentationWhat is the Domain Name API CLI?
dna is the official command line client and MCP server for the Domain Name API reseller platform. It covers all 64 operations of the reseller REST API, from domain search, registration, renewal and transfer to DNS, DNSSEC, contacts, SSL and hosting, in a single open source binary for macOS, Linux and Windows under the Apache-2.0 license.
Is it safe to let an AI agent register domains?
Yes, because the agent can't buy anything on its own. Billable and destructive operations return a preview instead of running. They only run after you approve and the call carries confirm=true, or --yes in the CLI. Start agents on the OTE test environment and narrow them further with --read-only or --no-billable.
Can I try it without spending money?
Yes. With --env ote, dna talks to OTE, our test environment. It has its own API key and its own balance, and nothing you do there touches live domains or your real account.
Which AI assistants work with dna?
Any MCP client: Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, OpenAI Codex CLI, Gemini CLI and others. Agents that only have a shell can call the CLI directly; dna agent guide and the Claude Code skill teach them how.
Do I need a Domain Name API account?
Yes. dna works with a reseller account and its API credentials: your reseller ID and an API key, both under API Settings in the reseller panel. Production and OTE have different keys, and your panel e-mail and password won't work here.
Is dna free?
Yes. The tool is free and open source under the Apache-2.0 license. You only pay for what you buy through it, such as domains, renewals, SSL and hosting, at your reseller prices and from your account balance.
Where are my credentials stored?
dna auth login saves them in a profile file in your user config folder, readable only by you on Linux and macOS; dna config path shows where. Environment variables always take precedence, and the API key is masked in every output, --dry-run included.
Can I use dna in scripts and CI?
Yes. Output is JSON when piped, errors are JSON with stable exit codes, and there are no prompts outside an interactive terminal. Pass the credentials as DNA_RESELLER_ID and DNA_API_KEY. A billable command without --yes exits with code 9 and sends nothing.
Should I use the CLI or an SDK?
Use dna when a person, a script or an AI agent does the work. Use an SDK for PHP, Node.js, Python, Ruby or Go, or the REST API itself, when you build domain features into your own application. All of them use the same API and the same credentials.
Do I have to use the terminal?
No. Paste a ready-made prompt into Claude Code, which also runs in the Claude desktop app, or into ChatGPT Codex, and the assistant installs and connects dna for you. The one command you type yourself is dna auth login, so your API key never goes into the chat. With no terminal at all, the chat prompt walks you through every step.

