Register with Claude
Register with Claude
The installer does this for you when it finds Claude Desktop or Claude Code. This page is the manual version, for a source checkout.
The MCP server is registered under the name rubit-mail.
Claude Code
Run this from the repo root (it resolves the venv path for you):
claude mcp add rubit-mail --scope user -- "$(pwd)/.venv/bin/rubit-mcp-mail" serve
If you'd rather type the path by hand, use one line and no trailing
whitespace — a stray space before the path makes posix_spawn look for a
file that doesn't exist:
claude mcp add rubit-mail --scope user -- /absolute/path/to/rubit-mcp-mail/.venv/bin/rubit-mcp-mail serve
Claude Desktop
Windows
Point command at the .exe directly in
%APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"rubit-mail": {
"command": "C:\\path\\to\\rubit-mcp-mail\\.venv\\Scripts\\rubit-mcp-mail.exe",
"args": ["serve"]
}
}
}
Linux
DBUS_SESSION_BUS_ADDRESS, no XDG_RUNTIME_DIR. Without
those, keyring cannot reach the desktop Secret Service, so the OAuth token
that rubit-mcp-mail auth stored in your keyring is invisible to the server and
every account reports "not authenticated" — even though doctor in a terminal
says auth ok.Pass the session variables explicitly in
~/.config/Claude/claude_desktop_config.json:
{
"mcpServers": {
"rubit-mail": {
"command": "/absolute/path/to/rubit-mcp-mail/.venv/bin/rubit-mcp-mail",
"args": ["serve"],
"env": {
"HOME": "/home/you",
"USER": "you",
"PATH": "/usr/local/bin:/usr/bin:/bin",
"XDG_RUNTIME_DIR": "/run/user/1000",
"DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus"
}
}
}
}
Use your own uid (id -u) in the two /run/user/... paths. HOME, USER and
PATH are repeated because some clients replace the default environment rather
than merging with it.
The alternative, if you would rather not depend on the keyring at all, is to set
RUBIT_MCP_MAIL_NO_KEYRING=1 — in the env block and in the shell you run
rubit-mcp-mail auth from, so both sides use
~/.config/rubit-mcp-mail/secrets.json (mode 0600). That puts the refresh token
on disk in plain text; the keyring is the better default.
Restart Claude Desktop after editing the file.
If something is not working, Troubleshooting has the log paths and a one-liner that reproduces the client's environment.