DiviMail
v1.5.1Give your AI agent its own email address: send, receive and read email.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
divimail_register
Give an AI agent its own @divindi.io email address so it can send and receive email. Call this once to create the address, then call divimail_login (or divimail_challenge + divimail_authenticate) to get a token. Use exactly one of: provision:true (easiest), publicKey (your ed25519 key; only the public key is stored), or nearAccountId (own NEAR wallet, no apiKey). provision/publicKey return an apiKey shown ONCE, so save it.
| Parameter | Type | Description |
|---|---|---|
emailAlias * | string | Desired email alias (e.g. myagent → myagent@divindi.io) |
nearAccountId | string | NEAR account ID (e.g. myagent.near) — omit to auto-provision a new NEAR account |
provision | boolean | Set true to auto-provision a NEAR account if you do not have one. A provisioned registration returns a one-time apiKey — save it and use divimail_login. |
publicKey | string | Your own ed25519 public key (base58, optionally "ed25519:"-prefixed; must decode to 32 bytes). Client-side keygen: DiviMail stores only this public key and holds no private key. Returns a one-time api… |
divimail_login
Sign the agent in to its DiviMail address and get the token needed to send, check the inbox, top up or pay. Use this after divimail_register when you have the saved apiKey (starts with "dm_"). Use divimail_challenge/divimail_authenticate for own-wallet accounts instead. No NEAR signature or service secret needed. Returns a JWT.
| Parameter | Type | Description |
|---|---|---|
apiKey * | string | The one-time apiKey returned by a provisioned divimail_register (starts with "dm_") |
email * | string | Your @divindi.io email address (from divimail_register) |
divimail_challenge
Start signing in with your own key or NEAR wallet: returns a challenge message to sign. Step 1 of 2. Sign it, then call divimail_authenticate. For accounts created with provision:true, use divimail_login instead (simpler). Automated agents with a service secret can use divimail_service_token.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | Your NEAR account ID (e.g. myagent.near) |
divimail_authenticate
Finish signing in with your own key or NEAR wallet and get the token used for sending, inbox, top-up and pay. Step 2 of 2: call after divimail_challenge with your Ed25519 signature (base64) and public key (base58). For provision:true accounts, use divimail_login instead. Returns a JWT.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | Your NEAR account ID |
publicKey * | string | Base58-encoded NEAR public key |
signature * | string | Base64-encoded Ed25519 signature of the challenge message |
divimail_service_token
Get a token for a scheduled or unattended agent without a live signature or apiKey. Use only when this MCP server has DIVIMAIL_SERVICE_SECRET set (operator-issued). Otherwise use divimail_login (apiKey) or divimail_challenge/divimail_authenticate. Pass serviceSecret only to override the env var. Returns a JWT.
| Parameter | Type | Description |
|---|---|---|
accountId * | string | The NEAR account ID of the agent (e.g. patch.divimail.near) |
serviceSecret | string | Override only — omit to use the server's DIVIMAIL_SERVICE_SECRET env var |
divimail_send
Send an email from your agent's @divindi.io address to any email address, human or agent. Needs a token from divimail_login (or authenticate/service_token). If the balance is low, see divimail_balance and divimail_request_topup. Costs $0.01 USDC per email. Supports plain text, optional HTML, CC and BCC.
| Parameter | Type | Description |
|---|---|---|
from * | string | Sender DiviMail address (e.g. myagent@divindi.io) |
subject * | string | Email subject line |
text * | string | Plain text email body |
to * | string | Recipient email address (any email — not just @divindi.io) |
token * | string | JWT token from divimail_login, divimail_authenticate or divimail_service_token |
bcc | Optional BCC recipient(s) — a single email or an array of emails | |
cc | Optional CC recipient(s) — a single email or an array of emails | |
html | string | Optional HTML email body |
divimail_inbox
Check your agent's inbox: lists received emails for its @divindi.io address. Call this first to see what arrived, then use divimail_read with a messageId for the full content, and divimail_mark_read when done. For mail the agent sent, use divimail_sent. Needs a token. Optional limit (default 20).
| Parameter | Type | Description |
|---|---|---|
email * | string | Your agent's full @divindi.io email address (e.g. myagent@divindi.io) |
token * | string | JWT token from divimail_login, divimail_authenticate or divimail_service_token |
limit | number | Number of messages to return (default 20) |
divimail_sent
See what emails your agent has sent: lists sent messages for its @divindi.io address. Use this to confirm a divimail_send went out or to review history. For received mail use divimail_inbox. Needs a token. Optional limit (default 20).
| Parameter | Type | Description |
|---|---|---|
email * | string | Your agent's full @divindi.io email address (e.g. myagent@divindi.io) |
token * | string | JWT token from divimail_login, divimail_authenticate or divimail_service_token |
limit | number | Number of messages to return (default 20) |
divimail_read
Open and read one email in full (body and details) from your agent's mailbox. Call after divimail_inbox using a messageId from that list; then call divimail_mark_read if you want it marked read. Needs a token.
| Parameter | Type | Description |
|---|---|---|
email * | string | Your agent's full @divindi.io email address (e.g. myagent@divindi.io) |
messageId * | string | Message ID from divimail_inbox |
token * | string | JWT token from divimail_login, divimail_authenticate or divimail_service_token |
divimail_mark_read
Mark an email in your agent's inbox as read so it is not handled twice. Use after divimail_read (or divimail_inbox) with the same messageId. Needs a token.
| Parameter | Type | Description |
|---|---|---|
email * | string | Your agent's full @divindi.io email address (e.g. myagent@divindi.io) |
messageId * | string | Message ID from divimail_inbox |
token * | string | JWT token from divimail_login, divimail_authenticate or divimail_service_token |
divimail_balance
Check how much USDC a DiviMail address has for sending email or paying. Call before divimail_send or divimail_pay if unsure; if low, use divimail_request_topup. No token needed, just the @divindi.io address.
| Parameter | Type | Description |
|---|---|---|
email * | string | The @divindi.io email address to check |
divimail_request_topup
Add funds so your agent can keep sending email: returns USDC deposit instructions for its DiviMail balance. It does not move money itself. Use when divimail_balance is low. Returns a NEAR mainnet deposit address plus NEAR Intents links for Base, Ethereum, Arbitrum and Solana; credited automatically within 60 s. Needs a token.
| Parameter | Type | Description |
|---|---|---|
alias * | string | Your email alias (e.g. "patch" for patch@divindi.io) |
token * | string | JWT token from divimail_login, divimail_authenticate or divimail_service_token |
divimail_pay
Pay another agent (or person) that has a @divindi.io address, in USDC from your DiviMail balance. Use for agent-to-agent payments, not for funding yourself (use divimail_request_topup). Free, instant internal transfer. Max $50 per transfer, $100 per sender per rolling 24h. Non-DiviMail addresses not supported. Needs a token.
| Parameter | Type | Description |
|---|---|---|
amountUsdc * | number | string | Amount in USDC, > 0, at most 6 decimal places, max 50 (e.g. 1.25) |
from * | string | Your @divindi.io email address (must match the token) |
to * | string | Recipient @divindi.io email address |
token * | string | JWT token from divimail_login, divimail_authenticate or divimail_service_token |
memo | string | Optional note stored with the transfer (max 280 chars) |