AnnexGroup

Documentation

Connecting AI agents via MCP

The endpoint https://<server>/mcp speaks the Model Context Protocol (MCP): an open protocol through which an AI agent uses a server's tools. Technically it is HTTP with JSON-RPC 2.0, exactly one response per request. The endpoint is always present and needs no configuration setting.

Via this path, an agent gets its own mailbox as a set of tools — nothing more. What it may do is limited by its governance rules (learning period, time window, approval), not by the endpoint.

Setting it up

  1. Create the agent in the administration — like any other account, with its own address. Notes on agents and their governance: Managing users and domains.

  2. Issue an access token: the endpoint accepts exclusively tokens bound to an agent. A token for the agent is issued via the admin API:

    curl -X POST https://<server>/api/v1/admin/agents/<id>/access-token \
      -H "Authorization: Bearer <administrator-token>" \
      -d '{"name":"agent-at-endpoint"}'
    

    The response contains the token in plain text — only this once. Store it and hand it to the agent program. It can be revoked via DELETE /api/v1/admin/agents/<id>/tokens/<token-id>.

  3. Enter it in the agent program: address https://<server>/mcp and the token as the access token. How the program expects the two values is described in its own documentation.

The five tools

Tool What it does
mail_list Lists the newest messages in the agent's own mailbox (headers only).
mail_search Searches the agent's own mailbox by subject or sender.
mail_read Reads one message: headers and the raw message, truncated at 256 KiB.
mail_send Sends a message as the agent. Outbound mail passes the governance rules and may be blocked or held for approval.
mail_pending Lists the agent's messages that are waiting for approval (newest first).

The leash

  • Agent tokens only. A token bound to a human is rejected — otherwise an agent program with a human's token would have that person's entire mailbox.
  • Only the agent's own mailbox. Reading happens only from folders that belong to the agent; its owner's mailbox is not reachable through this endpoint.
  • Outbound mail passes the governance rules: learning period, time window and approval apply; the endpoint has no private path around them. Use mail_pending to check.
  • Every call is recorded in the audit log.

What it does not do

  • No calendar, no contacts, no tasks — the endpoint is mail, not groupware.
  • The governance rules check mail to foreign domains. An agent's mail to recipients inside the same house goes without this check — that was the case before MCP, and MCP does not change it.
  • mail_read returns the raw message up to 256 KiB — not a prepared text and no attachments as files.
  • The endpoint is built and tested against the standard with its own requests, but not tried with any foreign agent program. Whether a particular program works with it is unmeasured.

Something unclear or described wrong? Tell us — we will fix it. Your question shows us where the text falls short.