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

  1. Read the contractStart from the OpenAPI 3.1 document — every endpoint, parameter, and response shape is described there.
  2. Call read endpointsAll read tools (lookup, propagation, dnssec, mail, rdap, reverse, trace, dnsbl, …) are public and need no auth.
  3. 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

REST — OpenAPI
curl 'https://dnsbin.ca/api/v1/openapi.json'
REST — anonymous read
curl 'https://dnsbin.ca/api/v1/lookup?name=example.com&type=A'
MCP — list tools
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.