Skip to content

Connect Cursor, Claude Code & Claude Desktop

primail-mcp speaks MCP over stdio only. There is no SSE bind port and no PRIMAIL_AUTH_TOKEN.

This page gives the verified generic contract. Client-specific menu names, config file paths, and CLI helpers change on the client side; use that product’s own MCP setup docs for where to paste the snippet.

  1. Build primail-mcp (Install the MCP server).
  2. Register a server whose command is the absolute binary path and whose args array is empty.
  3. Optionally set PRIMAIL_DATA_DIR so the server shares (or isolates) the same cache as the app.
{
"mcpServers": {
"primail": {
"command": "/absolute/path/to/primail-mcp",
"args": [],
"env": {
"PRIMAIL_DATA_DIR": "/absolute/path/to/shared/profile"
}
}
}
}

Omit env to use the process environment plus runtime-profile.json / the platform default. Do not add "stdio" as an argument. Do not interpolate security find-generic-password into the config; Primail does not issue an MCP token.

After the client reloads, tools appear under their Core names (account_list, mailbox_list, email_get, …), not as primail_list_messages. There is no stable “about 20 tools” count; see the tool reference for the name index.

In the client, ask it to list accounts or recent mail. A working setup calls account_list or mailbox_list. A missing binary path fails at spawn. There is no Settings token screen to compare.

  • primail-mcp token issue / token revoke
  • Per-project read / draft / send token scopes
  • Settings → AI Agents → Token
  • A local REST bearer token (see Automation interfaces)