MCP tools
The AGENSAI MCP server exposes the following tools. Every tool input takes ENS names where addresses are expected. Every tool output returns ENS names where addresses would otherwise be hex.
| Tool | Purpose |
|---|---|
list_agents | Enumerate every agent under your API key. |
get_agent | Inspect a single agent by ENS name. |
create_agent | Provision a new named agent with policies. |
transfer | Send tokens from an agent to a recipient. |
read_contract | Read a view function on any contract. |
execute | Call a non-view contract method as an agent. |
revoke | Permanently revoke an agent. |
resolve | Resolve an ENS name to an address (debug helper). |
Example: create_agent
The model passes:
{
"name": "my-agent",
"policies": [
{ "type": "spend", "token": "USDC", "amount": 50, "period": "weekly" },
{ "type": "contract", "whitelist": ["uniswap.eth"] }
]
}The server replies:
{
"name": "my-agent.agensai.eth",
"address": "0x7a3b…c2f1",
"chainId": 8453,
"status": "active"
}Safety
The MCP server respects every onchain policy. The model cannot bypass a spend cap or contract whitelist by phrasing a request differently — the smart account itself rejects the underlying transaction.
Errors
Tools surface errors as MCP error responses with stable codes:
| Code | Meaning |
|---|---|
unauthenticated | API key missing or invalid |
policy_violation | Transaction would exceed an active policy |
not_found | Agent or contract not found |
network | Upstream RPC unreachable |