CrewAI + Nextmail

An inboxfor CrewAI.

Agents built with CrewAI read, reply and send from the addresses you approve. They load the Nextmail tools over MCP, with a sign-in you give once.

Open CrewAI
Connect CrewAI
from crewai import Agent, Crew, Taskfrom crewai.mcp import MCPServerStdiofrom crewai.mcp.filters import create_static_tool_filter mailbox = MCPServerStdio(    command="npx",    args=["-y", "@nextmail/cli", "mcp", "serve"],    tool_filter=create_static_tool_filter(        allowed_tool_names=["whoAmI", "listThreads", "getThread"]    ),) reader = Agent(    role="Inbox reader",    goal="Know what is waiting in the inbox",    backstory="You read mail carefully and never send anything.",    mcps=[mailbox],) summary = Task(    description="Summarise my unread mail.",    expected_output="One line per conversation: who wrote, what they want, and whether it needs a reply.",    agent=reader,) print(Crew(agents=[reader], tasks=[summary]).kickoff())

The agent loads the tools through mcps and the local bridge, since CrewAI's open-source library has no OAuth sign-in.

Three steps.
Then it works on its own.

  1. 01

    Install the adapter

    Run pip install crewai mcp in your project.

  2. 02

    Sign in once

    Run npx @nextmail/cli login and approve in your browser what the agent may reach. On a server, add --no-browser and paste the code back.

  3. 03

    Load the tools

    CrewAI starts the bridge, npx -y @nextmail/cli mcp serve, and gets the tools your approval allows. Hand the agent only the ones it needs.

What your CrewAI agent can do with it.
Through one connection.

$ nextmail temp new

Tasks for your CrewAI agent.
In plain words.

Each prompt shows the tools it is likely to call.

  • Summarise my unread mail at [email protected] and draft replies. Don't send them yet.

    • listThreads
    • getThread
    • createDraft
  • Answer Ada's refund question in her thread, then file it under refunds.

    • getThread
    • replyToEmail
    • modifyLabels
  • Find the invoice Jonas sent last month and sum up the thread.

    • listThreads
    • getThreadSummary
  • Add Noor Haddad to my contacts and to the Beta audience.

    • createContact
    • addContactToAudience

You approve it.
Like any other app.

When the client signs in, you pick the workspace, what it may do, which addresses it reaches and for how long. Account → Connected apps changes or removes it later.

Your role is the ceiling
An app never holds a permission you lack, and when your role loses one, the app loses it on its next call.
Some things are never granted
No app can create or rotate API keys, open billing or manage the workspace, whatever you tick.
Risky changes wait for you
Adding a webhook, writing a rule, changing roles or removing a domain needs your verification code, or a 60-minute allowance you switch on for that app.

Asked first.
Answered plainly.

Give it an address.
Watch it work.

MCP, the API and the command line come with every plan, the free one included. Connect a client and approve exactly what it reaches.

claude mcp add --transport http nextmail https://api.nextmail.sh/mcp