Add Email Tools to Windsurf's Cascade Agent

Connect MultiMail via MCP to give Windsurf's Cascade agent the ability to send, read, and manage email with built-in human oversight.


Windsurf is Codeium's AI-powered IDE featuring Cascade, an agentic AI assistant that can reason through multi-step tasks. By connecting MultiMail through MCP, Cascade gains email capabilities, letting it send notifications, manage inboxes, and handle email workflows as part of its coding Flows.

Windsurf supports both stdio and SSE transport for MCP servers. The MultiMail MCP server connects via stdio, which Windsurf handles natively. Configuration goes in ~/.codeium/windsurf/mcp_config.json, and tools become available to Cascade automatically.

Cascade's multi-step reasoning pairs well with MultiMail's oversight modes. Set a mailbox to gated_send and let Cascade draft complex email sequences, then review and approve them before anything is sent.

Get started

1

Get your MultiMail API key

Sign up at multimail.dev and create an API key from your dashboard. This key authenticates all requests from the MCP server.

2

Create an agent mailbox

In the MultiMail dashboard, create a mailbox for Cascade to use. Choose gated_send oversight mode so outbound emails require your approval before delivery.

3

Add the MultiMail MCP server config

Create or edit ~/.codeium/windsurf/mcp_config.json and add the MultiMail server configuration.

json
{
  "mcpServers": {
    "multimail": {
      "command": "npx",
      "args": ["-y", "@multimail/mcp-server"],
      "env": {
        "MULTIMAIL_API_KEY": "mm_live_your_key_here"
      }
    }
  }
}
4

Restart Windsurf

Restart Windsurf for the MCP configuration to take effect. Cascade will automatically detect the new MultiMail tools.

5

Test the connection

Open Cascade and ask it to list your MultiMail mailboxes. If the configuration is correct, you'll see your mailboxes returned in the response.


Available MCP tools

ToolDescriptionExample
send_emailSend an email from your agent mailbox to any recipient.Send a project status update to stakeholders.
reply_emailReply to a received email, maintaining the thread context.Reply to a code review feedback email with implementation details.
check_inboxCheck a mailbox for new or unread messages.Check for new emails from the QA team during a coding session.
read_emailRead the full content of a specific email including headers and body.Read a requirements document sent via email.
create_mailboxCreate a new agent mailbox on your MultiMail account.Create a mailbox for automated build notifications.
list_mailboxesList all mailboxes on your MultiMail account.Check available mailboxes before starting an email task.
get_threadRetrieve an entire email thread to see the full conversation history.Pull up the complete requirements discussion thread.
search_contactsSearch your contact list by name, email, or tags.Find all design team contacts for a review email.
add_contactAdd a new contact to your MultiMail contact list.Add a new team member's email after onboarding.
tag_emailTag or categorize an email for organization and filtering.Tag a feature request email with the sprint number.
list_pendingList all emails currently awaiting human approval.Review pending outbound emails before the end of day.
decide_emailApprove or reject a pending email in the oversight queue.Approve a client-facing email after verifying tone and accuracy.

Usage examples

Windsurf MCP configuration
json
{
  "mcpServers": {
    "multimail": {
      "command": "npx",
      "args": ["-y", "@multimail/mcp-server"],
      "env": {
        "MULTIMAIL_API_KEY": "mm_live_your_key_here"
      }
    }
  }
}

Add this to ~/.codeium/windsurf/mcp_config.json to connect MultiMail to Windsurf.

Cascade Flow: read, fix, reply
text
Check my inbox for emails tagged 'bug'. Read the latest one, find the relevant code in our codebase, implement a fix, then reply to the sender with a summary of what was wrong and how it was resolved.

Use Cascade's multi-step Flow to read a bug report email, fix the code, and reply with the resolution.

Sprint summary email
text
Look at the git log for the past two weeks. Summarize the key changes grouped by feature area. Then send an email to [email protected] with subject 'Sprint 14 Summary' and the summary as the body.

Ask Cascade to generate a sprint summary from your recent git commits and email it to the team.

Multiple MCP servers in Windsurf
json
{
  "mcpServers": {
    "multimail": {
      "command": "npx",
      "args": ["-y", "@multimail/mcp-server"],
      "env": {
        "MULTIMAIL_API_KEY": "mm_live_your_key_here"
      }
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Use MultiMail alongside other MCP servers in your Windsurf configuration.


Best practices

Use Cascade Flows for multi-step email tasks

Cascade excels at multi-step reasoning. Combine email tools with code analysis in a single Flow: read an email, analyze the request, make code changes, run tests, then reply with results. Cascade will chain these steps automatically.

Config file location matters

Windsurf reads MCP config from ~/.codeium/windsurf/mcp_config.json specifically. This is different from Cursor (~/.cursor/mcp.json) or VS Code. Make sure you're editing the correct file for your editor.

Start with oversight, then relax

Begin with gated_send oversight mode where every outbound email requires your approval. As you become comfortable with Cascade's email drafting quality, you can switch to monitored mode (emails send but you can review after) or autonomous for fully automated workflows.

Combine with GitHub MCP for full workflow

Run MultiMail alongside the GitHub MCP server in Windsurf. Cascade can then read a GitHub issue, implement a fix, create a PR, and email the reporter that the fix is ready, all in a single Flow.


Common questions

Where is the Windsurf MCP config file?
The Windsurf MCP configuration file is located at ~/.codeium/windsurf/mcp_config.json. Create the file and any parent directories if they don't exist. The format is the same standard MCP config JSON used by other clients.
Does Windsurf support SSE transport for MCP?
Yes, Windsurf supports both stdio and SSE transport for MCP servers. The MultiMail MCP server uses stdio transport by default, which works without any extra configuration. If you need SSE for a different use case, consult the Windsurf documentation.
What is Cascade and how does it use MultiMail tools?
Cascade is Windsurf's AI agent that can perform multi-step tasks autonomously. When MultiMail is configured as an MCP server, Cascade can invoke email tools as part of its reasoning Flows. For example, it might read an email, analyze the request, implement code changes, and reply to the sender in a single Flow.
Can I use different API keys for different projects?
The Windsurf MCP config at ~/.codeium/windsurf/mcp_config.json is global. To use different API keys per project, you would need to update the config file when switching projects. Alternatively, you can use environment variables and set the key in your shell profile per project directory.
How do I know if the MCP server is connected?
After restarting Windsurf, ask Cascade to list your MultiMail mailboxes. If the server is connected, you'll see your mailboxes returned. If there's an error, check that your mcp_config.json is valid JSON and that your API key is correct.
Will MultiMail tools slow down Cascade?
No, MCP tools are invoked on demand and don't affect Cascade's performance when not in use. Each tool call makes a brief API request to MultiMail's servers. The stdio connection to the MCP server is lightweight and has negligible overhead.

More MCP clients

The only agent email with a verifiable sender

Email infrastructure built for AI agents. Verifiable identity, graduated oversight, and a 38-tool MCP server. Formally verified in Lean 4.