Connect an AI agent

nicemails runs a remote MCP server. Once connected, an AI agent can list your mailboxes, read and search mail, organize messages, create mailboxes and, with your approval, send mail. It gets only the permissions and mailboxes you choose.

MCP server address (Streamable HTTP)

https://nicemails.net/mcp

Option 1: Sign in with OAuth (recommended)

  1. In Claude, open Settings → Connectors and choose Add custom connector.
  2. Enter the MCP server address above and add the connector.
  3. Sign in to nicemails when the browser opens.
  4. On the approval page, choose the permissions and whether the agent may use every mailbox or only one, then select Allow.

Other MCP clients that support OAuth sign-in for remote servers connect the same way: add the address, sign in and approve. You never copy a key.

Option 2: API key

For clients without OAuth sign-in and for programs that run unattended. In nicemails, open Settings → API keys and select Create API key. Choose AI agent (MCP) as the key purpose, pick its permissions and mailbox, and copy the key. It is shown only once.

Send the key as an HTTP header on every request:

Authorization: Bearer <YOUR_API_KEY>

Most MCP clients accept a configuration like this. Replace the placeholder with your key and keep the key private.

{
  "mcpServers": {
    "nicemails": {
      "type": "http",
      "url": "https://nicemails.net/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_API_KEY>"
      }
    }
  }
}

Permissions

You choose permissions on the approval page or when you create a key. A connection can also be limited to one mailbox; every permission then applies only to that mailbox.

Tools

Read-only tools never change your mail. Tools that change data are marked so your client can ask you before each call.

ToolAccessWhat it does
list_mailboxes
List mailboxes
Read-onlyLists the mailboxes the connection can use, with their storage usage.
create_mailbox
Create mailbox
Changes dataCreates a new, independent mailbox within your plan's limits.
list_messages
List messages
Read-onlyLists the messages in one folder of a mailbox, newest first.
search
Search messages
Read-onlySearches every folder of the selected mailboxes.
get_message
Read message
Read-onlyReads one message with its body, attachment details and delivery status, without marking it as read.
send_message
Send message
Changes dataQueues an email from one of your mailboxes. New recipients need your approval first.
move
Move message
Changes dataMoves a message to another folder in the same mailbox.
flag
Set message flags
Changes dataMarks a message as read or unread, starred or answered.

Safety

REST API reference