Programs that run on your computer or your server connect with an agent key: you create the agent in mailrust, choose its rights, and paste the key into the program.
Create an agent
- Open Agents in the side panel and go to New agent.
- Give it a name you will recognise, for example
Claude Code on my laptop. - Choose its rights and, if you want, the mailboxes it may see and how long it may work.
- Press Create agent.
The key starts with mra_ and is shown once. Copy it right away: mailrust keeps only its fingerprint, so a lost key cannot be shown again; create a new agent instead.
Claude Code
claude mcp add --transport http mailrust https://mail.example.com/mcp \
--header "Authorization: Bearer mra_..."
Cursor
In ~/.cursor/mcp.json:
{
"mcpServers": {
"mailrust": {
"url": "https://mail.example.com/mcp",
"headers": { "Authorization": "Bearer mra_..." }
}
}
}
Any other program
Send the key in every request:
POST /mcp HTTP/1.1
Host: mail.example.com
Authorization: Bearer mra_...
Content-Type: application/json
Accept: application/json, text/event-stream
The same address serves the 2026-07-28 protocol and the earlier versions that start with initialize.
Keep keys safe
- One agent per program and machine: revoking one does not stop the others.
- Give an expiry to keys you hand to experiments.
- A key in a repository or a shared file is a key for anyone: revoke it and create a new one.