Skip to main content
Glama
himanshuramavat

allinkl-mail-mcp

all-inkl Mail MCP Server

An MCP server that gives an AI assistant access to an all-inkl.com mailbox via IMAP and SMTP.

Features

Tool

Description

list_folders

List all available IMAP folders in the mailbox.

list_emails

List emails in a specific folder.

search_emails

Search for emails based on a query.

read_email

Read the full content of a specific email.

send_email

Send a new email message.

reply_to_email

Reply to an existing email.

mark_email

Mark an email as read or unread.

move_email

Move an email to a different folder.

delete_email

Move an email to the trash folder.

Related MCP server: mcp-imap

Security Notes

  • Untrusted Input: Email content is untrusted input and can contain prompt injection attacks. Be cautious when allowing the AI to process email bodies.

  • Write Permissions: Keep write tools (send, reply, delete, move) on manual approval in your MCP client settings.

  • Read-Only Mode: Set MAIL_ALLOW_SEND=false in your environment variables to disable all email sending capabilities.

  • Credentials: Never commit your .env file or hardcode credentials in the source code.

Setup

Option 1: Fast Installation (via uvx)

If you have uv installed, you can run the server without cloning the repo:

Cursor (~/.cursor/mcp.json) or Claude Desktop:

{
  "mcpServers": {
    "allinkl-mail": {
      "command": "uvx",
      "args": ["allinkl-mail-mcp"],
      "env": {
        "MAIL_USER": "your_login",
        "MAIL_PASSWORD": "your_password",
        "MAIL_IMAP_HOST": "wXXXXXXX.kasserver.com",
        "MAIL_SMTP_HOST": "wXXXXXXX.kasserver.com",
        "MAIL_FROM": "your_email@all-inkl.com",
        "MAIL_SENT_FOLDER": "Sent",
        "MAIL_TRASH_FOLDER": "Trash",
        "MAIL_ALLOW_SEND": "true"
      }
    }
  }
}

Option 2: Manual Installation (from Source)

  1. Clone the repository:

    git clone <repo-url>
    cd allinkl-mail-mcp
  2. Create a virtual environment:

    python3 -m venv .venv
    source .venv/bin/activate
  3. Install dependencies:

    pip install -r requirements.txt
  4. Configure environment: Copy .env.example to .env and fill in your credentials.

    cp .env.example .env

Finding your all-inkl settings

Log in to the KAS (kas.all-inkl.com) under E-Mail > E-Mail-Konten.

  • IMAP/SMTP Host: Looks like wXXXXXXX.kasserver.com.

  • Login: Use the mailbox login (e.g., m0123456) or the full email address.

  • Password: The password you set for the mailbox.

Configuration Examples

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "allinkl-mail": {
      "command": "/absolute/path/to/allinkl-mail-mcp/.venv/bin/python",
      "args": ["/absolute/path/to/allinkl-mail-mcp/src/allinkl_mail_mcp/server.py"],
      "env": {
        "MAIL_USER": "your_login",
        "MAIL_PASSWORD": "your_password",
        "MAIL_IMAP_HOST": "wXXXXXXX.kasserver.com",
        "MAIL_SMTP_HOST": "wXXXXXXX.kasserver.com",
        "MAIL_FROM": "your_email@all-inkl.com",
        "MAIL_SENT_FOLDER": "Sent",
        "MAIL_TRASH_FOLDER": "Trash",
        "MAIL_ALLOW_SEND": "true"
      }
    }
  }
}

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "allinkl-mail": {
      "command": "/absolute/path/to/allinkl-mail-mcp/.venv/bin/python",
      "args": ["/absolute/path/to/allinkl-mail-mcp/src/allinkl_mail_mcp/server.py"],
      "env": {
        "MAIL_USER": "your_login",
        "MAIL_PASSWORD": "your_password",
        "MAIL_IMAP_HOST": "wXXXXXXX.kasserver.com",
        "MAIL_SMTP_HOST": "wXXXXXXX.kasserver.com",
        "MAIL_FROM": "your_email@all-inkl.com",
        "MAIL_SENT_FOLDER": "Sent",
        "MAIL_TRASH_FOLDER": "Trash",
        "MAIL_ALLOW_SEND": "true"
      }
    }
  }
}

MCP Inspector

Run the inspector to test the server locally:

npx @modelcontextprotocol/inspector -e MAIL_USER=xxx -e MAIL_PASSWORD=xxx -e MAIL_IMAP_HOST=xxx -e MAIL_SMTP_HOST=xxx /absolute/path/to/allinkl-mail-mcp/.venv/bin/python /absolute/path/to/allinkl-mail-mcp/src/allinkl_mail_mcp/server.py

Troubleshooting

Error

Cause

Solution

ENOENT

MCP client cannot find the python executable or server file.

Use absolute paths in your configuration.

KeyError: 'MAIL_USER'

Environment variables are not being passed to the server.

Check your client's env block and restart the client.

ImportError (FastMCP)

Incompatible mcp library version.

Run pip install "mcp[cli]>=1.2.0,<2".

AUTHENTICATIONFAILED

IMAP server rejected the login.

Try using the full email address as MAIL_USER instead of the mNNNNNNN login.

Known Limitations

  • Search: Search terms are limited to ASCII only.

  • Attachments: The server currently does not support downloading or sending attachments.

Example Prompts

  • "List my inbox and tell me if there are any urgent emails."

  • "Search for emails from 'Amazon' and summarize the most recent one."

  • "Draft a reply to the last email from Sarah and ask for a meeting on Friday."

  • "Move all emails older than a month from the inbox to the archive folder."

  • "Read the email with subject 'Invoice 123' and extract the total amount."

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to read, search, compose, and send emails by connecting to any IMAP/SMTP provider. It supports comprehensive mailbox management, including draft handling and message deletion, directly through natural language.
    10
    391 npm
    10
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to interact with email accounts via IMAP and SMTP, supporting mailbox listing, email search, retrieval, sending, and management.
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables AI assistants to send, read, and manage emails via SMTP and IMAP, with support for attachments, threads, and mailbox organization.
    16
    15 npm
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to connect to any email provider via IMAP/SMTP, supporting account management and email operations like listing, sending, and marking emails.
    MIT