Register Ans Agent
register_ans_agentEXPERIMENTAL: ANS is a draft standard and Porkbun's registry is new, so behaviour, fields and records may change; tell the user before they depend on it.
Instructions
EXPERIMENTAL: ANS is a draft standard and Porkbun's registry is new, so behaviour, fields and records may change; tell the user before they depend on it. PUBLIC AND PERMANENT: a registered agent is listed in the public directory and sealed in the transparency log; there is no unlisted option and revoking does not erase the record, so tell the user and don't register agents they want kept private. Give an AI agent a verifiable name with the Agent Name Service (free): ans://v1.0.0.<host>, an identity certificate, DNS discovery records, a public entry in Porkbun's transparency log, and a listing in the agent directory. Needs: (0) the agent host to be a domain registered at Porkbun in this account, or a subdomain of one (ANS_DOMAIN_NOT_ELIGIBLE otherwise; external domains added to the account don't count); (1) the agent already serving HTTPS at endpoint_url with a publicly trusted certificate (Let's Encrypt is fine); its served chain is registered; (2) identity_csr_pem, a certificate request the USER makes on their own machine so the private key never leaves them: openssl ecparam -name prime256v1 -genkey -noout -out identity.key then openssl req -new -key identity.key -out identity.csr -subj "/CN=<host>" -addext "subjectAltName=DNS:<host>,URI:ans://v<version>.<host>" (P-256 is the curve ES256 signing needs; RSA 2048+ and P-384 also work, but Ed25519, P-521 and EC keys with EXPLICIT curve parameters are refused — the one-step -newkey ec -pkeyopt ec_paramgen_curve form produces the explicit kind on macOS, which is why this is two commands) (the version in the URI must match version). Never generate or ask for the private key yourself. Returns agentId and agentStatus: PENDING_VALIDATION (status is the SUCCESS/ERROR envelope), with dnsResults (records published for you when the domain is on Porkbun nameservers in this account; any with published=false must be added at the user's DNS host). Then call advance_ans_agent until agentStatus is ACTIVE. Fill capabilities with what the agent really does: it is what people search the directory by. Errors: ANS_SERVER_CERT_UNREACHABLE (endpoint not serving HTTPS yet), ANS_SERVER_CERT_INVALID, ANS_ALREADY_REGISTERED (register a higher version).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"endpoint_url": "<endpoint_url>",
"identity_csr_pem": "<identity_csr_pem>"
},
"name": "register_ans_agent"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | Check the request without registering anything or writing DNS. | |
| version | No | MAJOR.MINOR.PATCH, default 1.0.0. Must match the version in the CSR's ans:// URI. | |
| protocol | No | Guessed from the path when omitted (/mcp -> MCP, agent-card.json or /a2a -> A2A). | |
| agent_host | No | Override the host taken from endpoint_url. The user must control its DNS. | |
| description | No | ||
| capabilities | No | What the agent can do, e.g. [{name:"domain_search", tags:["domains","search"]}]. | |
| display_name | No | Shown in the directory. Defaults to the host. | |
| endpoint_url | Yes | The https:// URL the agent listens on, e.g. https://myagent.example.com/mcp. Its host is the agent host. | |
| metadata_url | No | Capability card URL, if the agent has one. | |
| identity_csr_pem | Yes | PEM CSR for the agent identity, made by the user (see description). | |
| server_certificate_pem | No | Full chain (leaf first). Usually omit: the chain the endpoint serves is used. |