4,500+ servers built on MCP Fusion
Vinkius
AgentMail logo
Vinkius
OpenAI Agents SDK logo

How to Use the AgentMail MCP in OpenAI Agents SDK

Give your OpenAI Agents their own email inboxes to send, read, and manage messages in production.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

AgentMail MCP on Cursor AI Code Editor MCP Client AgentMail MCP on Claude Desktop App MCP Integration AgentMail MCP on OpenAI Agents SDK MCP Compatible AgentMail MCP on Visual Studio Code MCP Extension Client AgentMail MCP on GitHub Copilot AI Agent MCP Integration AgentMail MCP on Google Gemini AI MCP Integration AgentMail MCP on Lovable AI Development MCP Client AgentMail MCP on Mistral AI Agents MCP Compatible AgentMail MCP on Amazon AWS Bedrock MCP Support
MCP Servers - Free for Subscribers
OpenAI Agents SDK

Connect AgentMail MCP to OpenAI Agents SDK

Create your Vinkius account to connect AgentMail to OpenAI Agents SDK and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.

GDPR Free for Subscribers

Autonomous Email for Agents

Your agent can spin up its own email inboxes on the fly. Use `create_inbox` to generate a new address, maybe even on a custom domain you own. When it's done, `delete_inbox` cleans it all up. The OpenAI Agents SDK automatically discovers these tools. You just point it to the MCP server endpoint and your agents know how to `list_inboxes` and `get_inbox` details without any manual mapping. It's built for systems where multiple agents might need to coordinate over email.

Process Email with OpenAI Agents

Agents can read their mail. They start with `list_threads` to see what's new in an inbox, then use `get_thread` to pull a full conversation. This lets them follow a discussion before acting. If a message has a file, `get_attachment` pulls it down. The SDK's tracing means you can see every step in your OpenAI dashboard, watching exactly how an agent parsed an invoice or processed a support ticket from an email.

Let Agents Handle Correspondence

Your agents can now handle their own email communication. A `send_message` call fires off a new email. For existing conversations, `reply_to_message` keeps the thread intact, just like a person would. The SDK's guardrails are the real advantage here. You can set rules to prevent an agent from sending emails to the wrong address or forwarding sensitive data. It gives you the safety to let agents `forward_message` with confidence.

Setup guide

Set up AgentMail MCP in OpenAI Agents SDK

Prerequisites

  • Python 3.10+ installed
  • openai-agents package (pip install openai-agents)
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install the SDK

    Run pip install openai-agents to install the OpenAI Agents SDK. The MCP integration is built-in — no extra dependencies needed.

  2. 2

    Connect via SSE transport

    Use MCPServerSse with your Vinkius endpoint URL. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com. The SDK auto-discovers all AgentMail tools at runtime.

  3. 3

    Create your Agent

    Pass the MCP to Agent(mcp_servers=[server]). The agent receives AgentMail tools as native definitions — JSON schemas resolve automatically.

  4. 4

    Run the agent

    Call Runner.run(agent, prompt) to execute. The agent invokes the appropriate AgentMail tools and returns structured results. Copy the full example on the right to get started.

agent.py
import asyncio
from agents import Agent, Runner
from agents.mcp import MCPServerSse

async def main():
    async with MCPServerSse(
        url="https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
    ) as server:
        agent = Agent(
            name="AgentMail Agent",
            instructions="You have access to AgentMail tools.",
            mcp_servers=[server],
        )
        result = await Runner.run(agent, "List recent transactions")
        print(result.final_output)

asyncio.run(main())

Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by AgentMail. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.

Why Choose Vinkius

Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.

Real-time monitoring

Live

visibility into every interaction

Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.

Built-in savings

60%

lower AI costs

Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.

Single dashboard

One

place for every integration

Every tool your AI connects to, managed from a single screen. One account, complete control.

Common questions about AgentMail MCP in OpenAI Agents SDK

It's automatic. You pass the AgentMail MCP Server URL to the `MCPServerStreamableHttp` constructor. The SDK then introspects the server and makes all 11 tools, like `send_message`, available to your agent.
Yes, that's a perfect use case. Your agent can use `list_threads` to monitor an inbox, `get_thread` to understand a customer's issue, and `reply_to_message` to respond, all traced through your OpenAI dashboard.
Absolutely. Since the inboxes are managed by AgentMail, one agent can process an email and then pass the `thread_id` to a specialized agent. The second agent can then use `get_thread` to pick up the conversation right where it left off.
The AgentMail server will return an error. The OpenAI Agents SDK is designed to handle these API failures gracefully, which you can log and trace to debug your agent's logic.
AgentMail processes your email content, including message bodies and attachments, which pass through our ephemeral V8 Isolate sandboxes. Vinkius doesn't store your email data long-term; it's held only for processing and then discarded. Your API key is the only thing linking you to the inboxes.

Start using the AgentMail MCP today

We host it, we monitor it, we maintain it. You just paste one token.

Built & Managed by Vinkius 30s setup 11 tools

We've already built the connector for AgentMail. Just plug in your AI agents and start using Vinkius.

No hosting. No infrastructure. No complex setup.
All 11 tools are live and waiting. You're up and running in seconds.

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
+ other MCP clients

Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.