Skip to content
Docs
Open Escouade
Documentation contents

Docs › Mail

Connect my agent

View as .md

An address to paste, a 6-digit code, a mission. In Claude or ChatGPT, you open your space yourself. An agent such as Claude Code signs up by itself, over MCP.

For an agent: MCP over Streamable HTTP at https://api.subagent.fr/mcp. Without a key, a single tool: sign_up. Already have a key? Do not sign up again: header Authorization: Bearer sak_…. The full path: For agents.

Choose your assistant.

Two addresses, one server. Claude and ChatGPT connect through the connector, at https://mail.escouade.io/mcp: you open your space there, or find the one your agent opened, and that is where you read, correct and approve. Claude Code, Cursor and any agent connect to MCP, at https://api.subagent.fr/mcp, and sign up by themselves.

AssistantAddressWhat you doGuide
Claudehttps://mail.escouade.io/mcpYou add a custom connector, you sign in with your Escouade account (“Continuer avec Escouade”). Without a space, you choose the name of your first inbox; otherwise, you choose your space. You authorise.Connect Claude
ChatGPThttps://mail.escouade.io/mcpYou add a connector from an MCP server’s address, you sign in with your Escouade account (“Continuer avec Escouade”). Without a space, you choose the name of your first inbox; otherwise, you choose your space. You authorise.Connect ChatGPT
Claude Codehttps://api.subagent.fr/mcpOne command, without a key. Your agent signs up with sign_up and receives its key, which is shown only once. You run the command again with the key, then it passes to verify the 6-digit code received by e-mail, valid for 24 hours.Connect Claude Code
Cursorhttps://api.subagent.fr/mcpA .cursor/mcp.json file, without a key. Your agent signs up with sign_up and receives its key, which is shown only once. You add the header with the key, then it passes to verify the 6-digit code received by e-mail, valid for 24 hours.Connect Cursor
HTTPhttps://api.subagent.fr/v1/{operation}One POST per tool, without an MCP client.Connect over HTTP

In Claude and ChatGPT, there is no key to copy, and no agent is needed to sign up: without a space, you open yours on the sign-in page.

Claude Code, without a key, then with the key:

Terminal
claude mcp add \
  --transport http subagent \
  https://api.subagent.fr/mcp
Terminal
export SUBAGENT_KEY="sak_…"
claude mcp remove subagent
claude mcp add \
  --transport http subagent \
  https://api.subagent.fr/mcp \
  --header "Authorization: Bearer $SUBAGENT_KEY"

Cursor (.cursor/mcp.json), without a key, then with the key:

JSON
{
  "mcpServers": {
    "subagent": {
      "url": "https://api.subagent.fr/mcp"
    }
  }
}
JSON
{
  "mcpServers": {
    "subagent": {
      "url": "https://api.subagent.fr/mcp",
      "headers": {
        "Authorization": "Bearer ${env:SUBAGENT_KEY}"
      }
    }
  }
}

HTTP, sign_up without a key, then verify with the key:

Terminal
curl -X POST https://api.subagent.fr/v1/sign_up \
  -H "Content-Type: application/json" \
  -d '{"username": "atelier-exemple", "human_email": "[email protected]"}'
Terminal
curl -X POST https://api.subagent.fr/v1/verify \
  -H "Authorization: Bearer $SUBAGENT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"otp_code": "482913"}'

Another MCP client (VS Code, Codex, Gemini CLI…)? It needs the address and, after signing up, the Authorization header: see MCP server.

What sign_up answers to an agent that signs up (“Sign up to Escouade Mail. My e-mail is [email protected].”), in French, as the server writes it:

Text
Espace ouvert. Votre boîte : [email protected] (inb_3f9c2a7e5b1d4c8e9a0f6b2d7c4e1a95). Elle reçoit dès maintenant ; elle n’enverra qu’une fois l’espace vérifié.

Votre clé (affichée une seule fois, gardez-la en lieu sûr) : sak_…
Pour l’utiliser : en-tête « Authorization: Bearer <clé> » sur https://api.subagent.fr/mcp, ou sur POST https://api.subagent.fr/v1/{opération}.

Un code à 6 chiffres vient de partir à m•••@exemple.fr (valable 24 heures). Demandez-le à votre humain, puis appelez verify avec votre clé.

Une fois l’espace vérifié, la boîte prépare des brouillons et écrit à votre humain (test: true). Pour écrire à des tiers, l’espace doit avoir un forfait : 9 € par mois : 2 boîtes, 800 e-mails par mois ; 19 € par mois : 5 boîtes, 2 000 e-mails par mois ; 49 € par mois : 15 boîtes, 6 000 e-mails par mois. billing_status dit où il en est.

Store the key in an environment variable, then reconnect the server with it. Otherwise, your agent still only sees sign_up.

A payment, a domain, a mission.

The same gestures in every assistant: you ask Claude, ChatGPT or your agent for them.

  1. Pay through a link. “Ask for the payment link.” Your assistant, or your agent, asks for the link and hands it to you. You choose your plan and pay. An agent never pays. Before payment, the inbox receives, prepares drafts and only writes to you. The plans: Pricing.
  2. Register your domain. “Register the domain agents.example.com and give me the DNS records to publish.” The inbox on the shared domain receives and replies. To write first, you need your own domain. add_domain returns the DNS records to publish, verify_domain checks them. Publishing them at your domain’s DNS host is the only gesture that happens outside the assistant. A subdomain is enough.
  3. Give it a mission. “Write to the Morel practice to move Thursday’s appointment. Leave the message as a draft: I’ll review it.” A message does not leave straight away: it enters the queue, and the server’s response gives the earliest departure time.

What subscribe answers:

Text
Lien de paiement prêt, valable 72 heures :
https://api.subagent.fr/pay/…
Donnez-le tel quel à votre humain (m•••@exemple.fr). Sur la page, votre humain (m•••@exemple.fr) choisit son forfait (9 € par mois : 2 boîtes, 800 e-mails par mois ; 19 € par mois : 5 boîtes, 2 000 e-mails par mois ; 49 € par mois : 15 boîtes, 6 000 e-mails par mois), donne ses coordonnées de facturation, puis paie chez Mollie avec la confirmation de sa banque. Ensuite le même montant est prélevé chaque mois, jusqu’à résiliation.
Vous ne payez rien et ne validez rien à sa place. Ensuite, billing_status dit si le forfait est en cours ; dès qu’il l’est, reprenez ce qui attendait.

The shared domain receives and replies. To write first, you need your own domain.

The first inbox opens on the shared domain: [email protected]. You choose its name on the sign-in page, or your agent chooses it with sign_up.

  • Before payment: the inbox receives, prepares drafts and only writes to you.
  • Once paid: it replies to whoever wrote to it.
  • To write first: you need your own domain. The first message to a stranger leaves from an inbox on your domain, not from the shared domain.

Your agent returns the DNS records to publish.

Your inboxes carry your name. The warm-up applies to each inbox.

  • add_domain registers your domain and returns the DNS records to publish: proof of ownership, DKIM, SPF, MX. DMARC is recommended.
  • verify_domain checks, one by one, that these records are published.
  • create_inbox creates an inbox on your domain. Its sending rises in steps: 5, 10, 15, then 20 e-mails a day.

Details: Domains.

You approve in your assistant. A draft only leaves after you approve it.

Ask your agent to leave its messages as drafts. You review and approve them from Claude or ChatGPT, connected through the connector.

  • Your agent: its key, returned by sign_up, carries send, read and manage_inboxes. It does not carry approve.
  • You: the access you authorise through the connector carries approve.
  • The gesture: “Show me the drafts”, then “approve the first one”: list_drafts, approve_message.

Details: Approve an agent’s sends.

This page in Markdown: /en/mail/docs/brancher.md All the docs for an agent: /en/mail/docs/llms.txt Legal notice · Terms · Privacy · Service status