Skip to content

Quickstart: MCP

YoAgent’s MCP server is at https://api.yoagent.dev/mcp/mail (Streamable HTTP). It gives your agent tools to create inboxes, wait for mail, read links and codes, send, reply and label — the MCP tools reference lists them all. It is in the official MCP Registry as dev.yoagent/mail and on Glama.

A client connects in one of two ways:

  • Sign in in the browser (OAuth). No key to copy: the first time, the client opens a browser window where you sign in with Google, GitHub or GitLab and click Allow. The first sign-in creates your account. The client acts as you, with your role and access.
  • An API key in the header Authorization: Bearer <key>, for clients without OAuth, CI and agents that run unattended. The same key works with the REST API (API keys, OAuth and permissions).

Run it in a terminal:

Terminal window
claude mcp add --transport http yoagent https://api.yoagent.dev/mcp/mail && claude mcp login yoagent

With an API key instead (add --scope user to use the server in every project):

Terminal window
claude mcp add --transport http yoagent https://api.yoagent.dev/mcp/mail --header "Authorization: Bearer <api key>"

The dashboard shows the same commands, ready to copy, on its Dashboard page until the organization has its first API key or connected app, and with the key filled in when you create one.

The Get started card of the YoAgent dashboard: a command per MCP client and the project’s test address

Signed in by OAuth, you check on the consent page which of your organizations the app may use. With one checked, the app works in it right away. With several, it works in one at a time, and until it picks one every tool that works with mail answers conflict: no organization selected — call list_organizations, then select_organization; the documentation tools below work either way. Ask your agent to switch (“Use the Acme organization in YoAgent”): it calls list_organizations and select_organization.

An API key belongs to one organization, so it needs neither: these two tools refuse it.

The key from yoagent.dev/try can wait for mail and read it, but cannot create inboxes, send or change anything: give your agent the trial’s test@ address instead of asking it to create one. When you sign up and the trial becomes yours, its key stops working: remove the server first (claude mcp remove yoagent in Claude Code), then connect again without a key. If you have no room for another organization of your own on Free, the trial stays a trial, yours to take later, and its key keeps working.

Ask your agent:

Create an inbox and tell me its address. I’ll send it an email. Wait for it and tell me the subject.

The agent calls these tools:

  1. create_inbox — with no arguments, an inbox with a random name in your first project, such as inbox-3f9a1c2e@k7m2xq4p.yoagent.email. Or skip it and use your project’s test@ address, which the dashboard shows.

  2. wait_for_message with to set to that address — it answers as soon as a message arrives. One call waits up to 55 seconds; when nothing came, it answers message: null and a cursor to wait again with. subject and sender narrow it to the message you expect.

  3. extract_links or extract_codes — the message’s links, each with a kind (verify, reset, unsubscribe or other), and the codes found in it, such as a sign-in code.

  4. delete_inbox when the test is done: the inbox and its mail are deleted for good.

How waiting, reading and the message’s fields work: Receive and read email.

The same server answers questions about YoAgent from this knowledge base, so your agent can look things up while it works:

How do I verify a YoAgent webhook’s signature?

The agent calls search_docs with its question in words (query: "verify webhook signature"): the pages that answer it best, each by its best section in Markdown with a link. get_doc with a result’s path reads that page whole. Both work with an API key and over OAuth, an organization selected or not; every page is also Markdown at its address plus .md, and llms.txt lists them.