Skip to content

Install the MCP server

primail-mcp is a long-lived stdio process. It has no serve, stdio, --bind, or --auth-token parser. It is not shipped inside Primail.app/Contents/Resources, and there is no public archive at primail.app/download.

Do not run primail-mcp --help. That flag is not parsed; the process starts the server and may touch the shared profile (including a Gemini Keychain entry if one exists).

From a checkout that already has the Rust toolchain:

Terminal window
cargo build -p primail-mcp

The debug binary is target/debug/primail-mcp. A release build is target/release/primail-mcp. Internal signing (scripts/sign-cli.sh) stamps that path with identifier app.primail.mcp. It does not copy the file into the GUI app bundle.

The installed GUI, when present, is /Applications/Primail.app/Contents/MacOS/primail. That is the desktop app, not the MCP server.

Use an absolute path and empty args:

{
"mcpServers": {
"primail": {
"command": "/absolute/path/to/primail-mcp",
"args": []
}
}
}

That shape is the contract in primail-mcp/src/main.rs. How each client stores the snippet is the client’s own setup; see Connect an MCP client.

MCP, CLI, and the app resolve one data directory:

  1. An explicit override (CLI --data-dir only; MCP has no flag).
  2. Environment variable PRIMAIL_DATA_DIR.
  3. The selected runtime-profile.json descriptor.
  4. The ordinary platform default (~/Library/Application Support/Primail on macOS).

Set PRIMAIL_DATA_DIR in the client’s env block when you want MCP to use a specific cache. A per-process override does not rewrite the persisted profile. Resolution never creates the directory itself.

Quit the MCP client, or stop the primail-mcp process. There is no Enable MCP server toggle and no bundled launchd plist.