MCP
Multiple Identities
Give your agent access to multiple email inboxes
A single agent can manage multiple inboxes by configuring multiple MCP server connections — one per identity.
Configuration
Each identity gets its own named MCP server:
{
"mcpServers": {
"loomal-sales": {
"url": "https://api.loomal.ai/mcp",
"headers": {
"LOOMAL_API_KEY": "mgent-sales-api-key"
}
},
"loomal-support": {
"url": "https://api.loomal.ai/mcp",
"headers": {
"LOOMAL_API_KEY": "mgent-support-api-key"
}
}
}
}How It Works
Each MCP server instance exposes the same mail.* tools, but namespaced by the server name:
| Tool | Inbox |
|---|---|
loomal-sales:mail.send | sales-a8k2m@mailgent.dev |
loomal-sales:mail.list_messages | sales-a8k2m@mailgent.dev |
loomal-support:mail.send | support-f3x9w@mailgent.dev |
loomal-support:mail.list_messages | support-f3x9w@mailgent.dev |
The agent sees all tools and can use the right one based on context.
Agent Behavior
When the agent needs to send from sales:
Agent uses mailgent-sales:mail.send → sends from sales-a8k2m@mailgent.devWhen the agent needs to check support inbox:
Agent uses mailgent-support:mail.list_messages → reads support-f3x9w@mailgent.devSecurity
Each identity is fully isolated:
loomal-salesAPI key cannot readloomal-supportmessages- Each key has its own scopes — sales might have
mail:send+mail:read, while support might only havemail:read - Usage is tracked per identity
When to Use Multiple Identities
| Scenario | Setup |
|---|---|
| Single-purpose agent (e.g., order notifications) | 1 identity |
| Agent handling sales + support | 2 identities |
| Multi-department agent | 1 identity per department |
| Separate read-only monitor + reply agent | 2 identities with different scopes |