Mailgent for OpenAI
Wire Mailgent into the OpenAI SDK as function tools, or connect over MCP. Your GPT-powered agent gets an inbox, vault, 2FA, calendar, and payments.
If you build on the OpenAI SDK, Mailgent fits both ways you already work: as function/tool definitions the model can call, or over MCP if your runtime supports it.
Either path gives your agent a real address and the surrounding identity, so a GPT-powered assistant can send mail, fetch a secret, clear 2FA, book a calendar slot, or pay per call.
Call Mailgent as tools
Define Mailgent actions as tools and let the model call them. Each call goes to the Mailgent API with the agent's scoped key, so the model can only do what you've granted.
The MCP server can also generate the tool surface for you if your stack speaks MCP.
const tools = [{
type: "function",
function: { name: "mail_send",
description: "Send an email from the agent's inbox",
parameters: { /* to, subject, text */ } }
}];
// on tool_call -> POST https://api.mailgent.dev/v0/mail/sendScoped and accountable
The agent's key carries scopes, so even if the model decides to call a tool, it can only act within the permissions you set. Every action is logged under the agent's identity.
FAQ
Do I have to use MCP?
No. You can expose Mailgent as plain function tools and route calls to the REST API, or use MCP if your runtime supports it.
Which model does this need?
Any OpenAI model that supports tool/function calling can drive Mailgent tools.
Give your agent an inbox.
A real email address, a vault, 2FA, and an identity in one API call.