Scripts, CI, and agents
Automate with the API and MCP
Drive every dnsbin tool from a script, a CI pipeline, or an AI agent using the JSON REST API or the MCP server.
When to use it
Use this when
- You want DNS checks in a CI pipeline, a cron monitor, or a deploy gate.
- You are wiring dnsbin into an AI agent or an MCP-capable client.
Steps
Do this
- Read the contractStart from the OpenAPI 3.1 document — every endpoint, parameter, and response shape is described there.
- Call read endpointsAll read tools (lookup, propagation, dnssec, mail, rdap, reverse, trace, dnsbl, …) are public and need no auth.
- Authenticate when neededRead and snapshot endpoints work anonymously; mint an API key on the authority site to attribute snapshots to an account, or point an MCP client at /mcp for OAuth-secured tools.
Examples
Copyable commands
curl 'https://dnsbin.ca/api/v1/openapi.json'
curl 'https://dnsbin.ca/api/v1/lookup?name=example.com&type=A'
curl -i 'https://dnsbin.ca/mcp' \
-H 'Authorization: Bearer pbca_live_…' \
-H 'Content-Type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'Operational notes
Keep in mind
- Read and snapshot endpoints are public (rate-limited); a dns:create key is optional and only attributes snapshots to an account, while MCP tokens are audience-bound to /mcp.
- Agents can also discover the service via /llms.txt and /.well-known/agent.json.