Step 1
Requirements
You need the .NET 10 SDK. Global .NET tools are installed to ~/.dotnet/tools—make sure that folder is on your PATH.
Step 2
Install the tools
Install the command line, the MCP server, or both. No nuget.org access token required.
dotnet tool install -g Ironbrain.MailCal.Cli
dotnet tool install -g Ironbrain.MailCal.Mcp
ironbrain-mailcal --versionUpdate later with dotnet tool update -g Ironbrain.MailCal.Cli or Ironbrain.MailCal.Mcp.
Step 3
Configure accounts
MailCal reads ~/.config/ironbrain/mailcal.json by default. Create the file and protect it, since it contains passwords:
mkdir -p ~/.config/ironbrain
touch ~/.config/ironbrain/mailcal.json
chmod 600 ~/.config/ironbrain/mailcal.jsonThis example sets up two accounts: assistant may send, personal is read-only.
{
"defaultAccount": "assistant",
"accounts": {
"assistant": {
"Email": {
"Imap": {
"Host": "mail.example.com",
"Port": 993,
"UseSsl": true,
"Username": "bot@example.com",
"Password": "REPLACE_ME"
},
"Smtp": {
"Enabled": true,
"Host": "mail.example.com",
"Port": 587,
"UseStartTls": true,
"Username": "bot@example.com",
"Password": "REPLACE_ME",
"FromAddress": "bot@example.com",
"FromName": "Assistant"
}
},
"Calendar": {
"HomeUrl": "https://mail.example.com/SOGo/dav/bot@example.com/Calendar/",
"Username": "bot@example.com",
"Password": "REPLACE_ME",
"DefaultWriteCalendar": "personal"
}
},
"personal": {
"Email": {
"Imap": {
"Host": "mail.example.com",
"Port": 993,
"UseSsl": true,
"Username": "you@example.com",
"Password": "REPLACE_ME"
},
"Smtp": {
"Enabled": false
}
}
}
}
}- Different path: use
--configor theIRONBRAIN_MAILCAL_CONFIGenvironment variable. - Choosing an account:
-a/--accountorIRONBRAIN_MAILCAL_ACCOUNT; otherwisedefaultAccountapplies. - Calendars: with
HomeUrl, MailCal discovers all of the account’s calendars itself, including shared ones.DefaultWriteCalendardecides where new appointments go. - Archive: unless configured otherwise, MailCal archives to
Archive/{CurrentYear}.
A more detailed example with every option is in the repository at samples/mailcal.example.json.
Step 4
Test the connection
Check that accounts, mailboxes, and calendars are reachable. account list shows the configuration without passwords.
ironbrain-mailcal account list
ironbrain-mailcal -a assistant mail list --limit 5
ironbrain-mailcal -a personal mail list --limit 5
ironbrain-mailcal -a assistant cal calendars
ironbrain-mailcal -a assistant cal list --date todayStep 5
Add it to Cursor
The easiest way is the MailCal plugin on cursor.directory. Alternatively, add this entry to your MCP settings:
{
"mcpServers": {
"ironbrain-mailcal-mcp": {
"command": "ironbrain-mailcal-mcp",
"env": {
"IRONBRAIN_MAILCAL_CONFIG": "${HOME}/.config/ironbrain/mailcal.json"
}
}
}
}Other MCP clients such as Claude Desktop add the server the same way, as a local command.
Security
- Passwords are never logged or printed.
- Keep the configuration file out of Git repositories and readable only by your user.
- For personal mailboxes, give agents an account without send permission (
"Enabled": false).