Mimir

Connect your email, calendar, web search and Signal

Bots work with what you connect: your email, your calendar and a web search service, and you can reach them on Signal. Each is optional and takes a few minutes. This page is the setup, service by service; what bots then do (and what always asks you first) is at the end of each part.

Everything here is set in the app. The passwords and keys are stored in the OS keychain on your computer, or in the server's private database when you self-host; they never go into a bot's instructions.

Email #

Bots can search and read your inbox, write drafts, and send an email when you approve it. They use IMAP and SMTP, the standard mail protocols, with an app password: a separate password just for Mimir that you can revoke any time, without changing your real one. Outlook and Microsoft 365 sign in with Microsoft instead (below).

You can add more than one mailbox (work and personal, say). Bots search all of them unless you name one, show which mailbox each email is in, and send or draft from the one you say (the first one otherwise). The approval card says which mailbox an email goes out from.

1. Make an app password #

Provider Where Incoming server Outgoing server
Gmail myaccount.google.com/apppasswords (2-Step Verification has to be on) imap.gmail.com smtp.gmail.com
iCloud Mail account.apple.com → Sign-In and Security → App-Specific Passwords imap.mail.me.com smtp.mail.me.com
Fastmail Settings → Privacy & Security → App passwords imap.fastmail.com smtp.fastmail.com
Proton Mail Install Proton Mail Bridge; it shows a password for the account (not tried with Mimir yet) 127.0.0.1 (port 1143) 127.0.0.1 (port 1025)
Any other Your provider's help: "IMAP settings" usually imap.<domain> usually smtp.<domain>

Outlook, Hotmail and Microsoft 365 have no app passwords for mail any more: see Outlook.

2. Add it in Mimir #

Settings → Email: the incoming server, the port (993 unless your provider says otherwise), your address and the app password. The outgoing server is worked out from the incoming one (imap.gmail.com → smtp.gmail.com); fill in Outgoing server only if yours is different. The outgoing port is 465 (SSL/TLS) when left empty; put 587 in Outgoing port if your provider says 587 or STARTTLS (any port but 465 uses STARTTLS). Save signs in once to check, and shows how many messages are in your inbox. Add another mailbox adds the next one; the same address again replaces it.

Outlook #

Microsoft turned off app passwords for mail, so Mimir signs in with Microsoft (OAuth with PKCE) and uses that for IMAP and SMTP (XOAUTH2). Mimir doesn't ship its own Microsoft app yet, so you register one, once. It's free and takes about five minutes:

  1. Open the Microsoft Entra admin center (or the Azure portal) with any Microsoft account → App registrations → New registration.
  2. Name it "Mimir". Supported account types: "Accounts in any organizational directory and personal Microsoft accounts" (or only your organisation, for a work account).
  3. Redirect URI: platform Public client/native (mobile & desktop), address http://localhost. Register.
  4. Copy the Application (client) ID from its overview page.
  5. In Mimir, Settings → Email → Outlook / Microsoft 365: paste the client ID and click Sign in with Microsoft. If you chose "only your organisation", paste its Directory (tenant) ID too.

Microsoft asks you to allow reading and sending your mail (IMAP.AccessAsUser.All, SMTP.Send). At work, your admin may have to allow the app, and SMTP sign-in has to be on for your mailbox (it often is; admins can turn it off). The sign-in is kept in the keychain and renewed on its own; if it ends (you changed your password, or revoked it), the bot says so and Sign in with Microsoft again replaces it. On a self-hosted server, the browser comes back to an address that doesn't load: copy it from the address bar and paste it in Mimir, as with ChatGPT.

Gmail isn't done this way: Google requires a security review for apps that read mail, so Gmail keeps the app password, which works well.

What bots can then do #

Only in a chat with you, never in a group or incognito:

Emails are other people's words, so a bot that has read your mail treats it as outside content: changes ask you first, and after reading your mail, opening any web address asks too (a link could carry a code out). See Tools, approvals and safety.

Tasks by email #

Turn on Settings → Email → Tasks by email to give your bot a task from any phone, without an app: forward or CC an email to your own address with +mimir added ([email protected]), or file it in a folder called Mimir. Write what you want on top ("add this to my calendar", "pay this by Friday"). If you forward nothing, the subject is enough ("call the dentist at 4").

Calendar #

Bots can read your calendar, and put things in it through links you click.

A read-only address of your calendar in iCal format:

2. Add it in Mimir #

In the desktop app: Meetings → Calendar, paste the link. Mimir reads it to check, and says how many events are on it this week. (The same link tells Mimir when a meeting starts, for transcription: see Meetings.)

3. Let bots add events (optional) #

Reading uses the link above. For bots to put events straight into your calendar, connect it in Settings → Calendar with an app password (it uses CalDAV, the standard calendar protocol):

Provider Server Password
iCloud https://caldav.icloud.com the same app-specific password as iCloud Mail
Fastmail https://caldav.fastmail.com an app password with calendar access (or the mail one, if it has both)
Nextcloud https://<your server>/remote.php/dav an app password from Settings → Security
Any other CalDAV its address its password

The user name is your address. If you connected the same account's email, the server is filled in and the password can stay empty. Connect signs in and finds your calendars; it picks the first one that takes events, and Other calendar lets you choose another. Google Calendar needs Google's own sign-in for this, which Mimir doesn't do yet; there, bots give you add-to-calendar links instead (below).

What bots can then do #

Bots on Claude can already search the web on their own. For bots on any other account (ChatGPT, Grok, OpenRouter, a local model, an API key), connect a search service.

Brave Search (easiest) #

  1. Make a free key at brave.com/search/api (the free plan covers personal use).
  2. Settings → Web search → Brave Search: paste it and Save.

Or your own SearXNG #

If you run SearXNG (a self-hosted search engine), switch on JSON results in its settings.yml (search: formats: [html, json]) and paste its address in Settings → Web search → Or your own SearXNG. Brave is used when both are set.

What bots can then do #

Search (web_search) and then read the pages that matter (web_fetch). Results are outside content. The search service sees your queries, so once a conversation has read outside content, a search that would carry one of your memories asks you first.

Signal #

A bot can be on Signal next to Telegram, Slack and Discord (those are set up on the bot's page, see Bots and chats). Signal has no bot accounts, so the bot needs a Signal number of its own (a spare SIM or a second number; not yours, or its replies would come from you), and Mimir reaches Signal through signal-cli-rest-api, a small service you run next to it.

  1. Run signal-cli-rest-api in json-rpc mode. On a server, uncomment the signal service and MIMIR_SIGNAL_API in docker-compose.yml. On your own computer, with Docker:
    docker run -d --name signal --restart unless-stopped -p 127.0.0.1:8081:8080 -e MODE=json-rpc \
      -v "$HOME/.local/share/signal-api:/home/.local/share/signal-cli" bbernhard/signal-cli-rest-api:0.101
    
    signal-cli-rest-api has no password: anything that can reach it can send messages as the bot and link another device to its number. 127.0.0.1 keeps it off your network, but every program and user account on this computer can still reach it, so run it only on a computer that's yours alone. (In the server's docker-compose.yml it's on a network of its own with Mimir, out of reach of the bots' browser.)
  2. Link the bot's number as a linked device. Set up Signal on a phone with that number, open http://127.0.0.1:8081/v1/qrcodelink?device_name=mimir in a browser and scan the code with that phone: Signal → Settings → Linked devices → +. (On a server, ssh -L 8081:127.0.0.1:8081 you@server first, then open http://127.0.0.1:8081/v1/qrcodelink?device_name=mimir.)
  3. Add it in Mimir: the bot's page → Messaging apps → Signal → Set up: the bot's number with its country code (+31…), and signal-cli-rest-api's address if it isn't http://127.0.0.1:8081. Save; it shows Connected · +31….
  4. Pair: from your own Signal, message the bot's number pair and the code on the bot's page.

Text, photos, voice notes (transcribed as on Telegram; Signal's are AAC, so whisper.cpp needs ffmpeg installed), PDFs and other files work both ways, with a typing indicator while the bot writes. Reply under one of its messages and the bot knows which one you mean. Signal has no buttons, so approval cards and a bot's questions come as a numbered list: answer with just the number (1 approves). The numbers belong to the bot's latest numbered message, and a card's keep working until it's decided. Replies arrive whole, as plain text (no streaming). Direct chats only: in a Signal group the bot stays silent. Messages sent while Mimir isn't connected to signal-cli-rest-api aren't fetched later, as they are on Telegram. For mimir serve, set SIGNAL_NUMBER (and MIMIR_SIGNAL_API).

Files #

Nothing to set up: each chat has a small workspace of text files bots keep there (notes, lists, drafts), under Memory → Files. See Memory.

Turning things off #