# n8n and MCPmailer

n8n reaches MCPmailer through the MCP Client Tool node, with no code to write.

Drop an MCP Client Tool node next to your AI Agent node and point it at MCPmailer. The agent gets the same send, read, and wait-for-reply tools every other client sees.

## Setup

1. **Add an AI Agent node** Or open the workflow that already has one.
1. **Attach an MCP Client Tool** It connects to the agent node tool port, not to the main flow.
1. **Point it at MCPmailer** Server Transport HTTP Streamable, and the endpoint above.
1. **Store the key as a credential** Bearer auth, so the key lives in n8n credentials and not in the node.

## MCP Client Tool node

```
Node:              MCP Client Tool
Server Transport:  HTTP Streamable
MCP Endpoint URL:  https://connect.mcpmailer.com/mcp
Authentication:    Bearer
Credential token:  mmk_live_...
```

## Worth knowing

### Use HTTP Streamable, not SSE

The node still offers an SSE Endpoint field for older servers. Ours is a Streamable HTTP endpoint, so the SSE field is the wrong one and will not connect.

### The node fetches the tool list on connect

Every tool your key can reach is offered to the agent at once. Where you want a workflow that only sends, issue a key scoped to that rather than trying to hide tools in the node.

### Long waits versus workflow timeouts

wait_for_reply can hold for up to five minutes. If your n8n instance caps execution time below that, poll list_messages on a schedule instead of blocking inside one run.


Docs: https://mcpmailer.com/docs.md