ANS MCP Server

Plug ANS straight into AI tools and give agents a real onchain identity.

The ANS MCP Server lets Codex, Claude, Cursor, VS Code, and other MCP clients resolve names, inspect records, quote prices, and let managed agent wallets execute registrations for name.agent.abs.

Agent namespace

The official AI identity namespace is agent.abs, so every agent can claim a readable handle like pilot.agent.abs.

Remote + local

Use the hosted MCP endpoint for the fastest setup, or run the same server over stdio for local and self-hosted workflows.

Autonomous execution

Managed agent wallets can sign and broadcast ANS writes directly through MCP, so your AI agent can register and maintain its own `name.agent.abs` identity.

Choose the execution model that fits your agent

ANS MCP supports three valid ways to work with name.agent.abs. The difference is simple: which wallet signs, who controls the key, and whether the write is fully autonomous on the hosted endpoint or executed somewhere else.

Model 1

Hosted autonomous mode

Use the managed agent wallet flow on this page. ANS infrastructure stores an encrypted signer, the MCP signs and broadcasts writes, and your AI client can register or maintain a name.agent.abs identity without a manual wallet popup.

Best for the fastest plug-and-play agent setup. The tokenized MCP URL is a secret because it controls that managed wallet.

Model 2

Hosted self-custody mode

Use the hosted ANS MCP for reads, checks, and transaction preparation, but let your own wallet or agent wallet sign and broadcast the transaction. In this mode you keep custody of the keys.

Best for teams or agent stacks that already manage their own signer. Use prepare_agent_registration plus the normal read tools, then execute the returned transaction payload in your own wallet infrastructure.

Model 3

Self-hosted MCP mode

Run the ANS MCP server in your own environment over stdio or HTTP. This is the right option if you want private infra, your own auth model, custom policies, or you want to extend the server with your own signer logic.

Best for advanced builders. The same codebase can be used privately for read tools, prepare-only flows, or your own autonomous execution model.

Model 1 details

Hosted autonomous mode on the ANS website

This section provisions a managed agent wallet for the hosted MCP endpoint. If you want the MCP itself to sign and broadcast name.agent.abs registrations, this is the flow to use.

Autonomous agent wallets

Provision a managed signer for your AI agent. The MCP can then sign and broadcast `name.agent.abs` registration and profile transactions without a manual wallet popup.

1. Connect and sign in with your main wallet

Your main wallet authorizes creation, rotation, and revocation of managed agent wallets. Each managed wallet gets its own MCP token and owns the `.agent.abs` names it registers.

2. Create a managed agent wallet

This wallet is generated server-side and stored encrypted. Fund it on Abstract before asking the MCP to execute registrations or profile writes.

Managed agent wallets

No managed agent wallets yet. Create one above, fund it with Abstract ETH, then attach the tokenized MCP URL to your AI client.

Install and connect

Use the hosted endpoint for production clients. For autonomous mode, append a managed agent token URL from the section above. For local development, you can still run the stdio transport from this repo.

Codex

codex mcp add ans --url https://AbsNameService.xyz/api/mcp

Claude Desktop

{
  "mcpServers": {
    "ans": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://AbsNameService.xyz/api/mcp"]
    }
  }
}

Cursor / VS Code

{
  "mcpServers": {
    "ans": {
      "url": "https://AbsNameService.xyz/api/mcp"
    }
  }
}

Stdio / self-host

pnpm mcp:stdio

For HTTP self-hosting, run pnpm mcp:http and expose /mcp.

The remote endpoint is meant for MCP clients, not direct browser navigation. Opening it in a tab can return a protocol error because browsers do not send the headers an MCP client sends.

Autonomous execution on the hosted endpoint uses a managed agent token. Treat the tokenized MCP URL as a secret because it controls the linked agent wallet.

If you prefer self-custody, skip the managed wallet flow and use the hosted endpoint only for reads and transaction preparation.

What makes this useful

The SDK is still the right choice when you are building a product. MCP is the layer that makes ANS instantly usable inside AI-native tools, agent stacks, and natural-language workflows.

That means an operator can ask an AI client to inspect a name, quote a registration, provision a managed signer, and let the agent register a name.agent.abs identity without wiring a custom execution backend first.

If you do not want hosted custody, the same MCP still works in prepare-only mode. Your own wallet or agent signer can execute the payload after the MCP returns it.

Remote endpoint

https://AbsNameService.xyz/api/mcp

AI identity flow

  1. 1. Choose your model: hosted autonomous, hosted self-custody, or self-hosted MCP.
  2. 2. For hosted autonomous mode, create and fund a managed agent wallet on this page.
  3. 3. Attach either the public endpoint or the tokenized managed-wallet URL to your AI client.
  4. 4. Ask the MCP to check availability, then either execute directly or prepare the transaction for your own signer.

Available MCP tools

resolve_name

Resolve a .abs name or subdomain to owner and base record data.

reverse_lookup

Look up the ANS reverse record for an address.

get_name_profile

Fetch ownership, text records, record, and namespace context.

get_owned_names

List all ANS names owned by a wallet.

get_name_price

Quote top-level or subdomain pricing.

get_subdomain_root

Inspect root config such as agent.abs.

list_subdomain_roots

List known roots discovered from the contract.

check_agent_name

Validate whether a name.agent.abs identity is ready to register.

prepare_agent_registration

Prepare a registerWithPriceUpdate call without signing it.

get_agent_wallet_context

Inspect the currently authenticated autonomous agent wallet context.

execute_agent_registration

Sign and broadcast a name.agent.abs registration from the managed agent wallet.

execute_agent_set_record

Set the main record for a managed name.agent.abs identity.

execute_agent_set_text_record

Set avatar, twitter, discord, url, or email on a managed name.agent.abs identity.

get_transaction_receipt

Check whether a submitted autonomous transaction is pending, successful, or reverted.

Example prompts

Who owns ans.abs and what profile records are set?
List all ANS names held by 0x1234... and tell me if any are under agent.abs.
Check if scout.agent.abs is available and register it with the linked managed wallet.
Set the avatar and twitter text records for pilot.agent.abs.
What is the current price for oracle.agent.abs for this managed wallet?

Agent namespace notes

agent.abs is an ANS subdomain root. A full identity therefore looks like name.agent.abs.

Autonomous mode stores an encrypted agent signer on ANS infrastructure. The MCP token attached to that wallet can then execute registration and profile writes without a manual approval step.

Self-custody mode keeps the exact same name flow, but the signing happens in your own wallet or agent runtime after the MCP prepares the transaction. Self-hosted mode moves the MCP itself into your own infrastructure.

Because ANS V2 mints to `msg.sender`, every autonomous `name.agent.abs` registration must be signed by the agent wallet itself. That is why managed agent wallets are the core building block for true autonomous registration.