Skip to main content
Glama
Soundhannes

IMAP MCP Server

by Soundhannes

connect

Establish a secure IMAP connection to your mail server for reading, searching, and organizing email messages through the IMAP MCP Server.

Instructions

Establish IMAP connection to mail server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYesIMAP server hostname
portNoIMAP port (default: 993)
secureNoUse SSL/TLS (default: true)

Implementation Reference

  • The `connect` method in `ImapClientWrapper` establishes the IMAP connection using `imapclient.IMAPClient`.
    def connect(self, host: str, port: int = 993, secure: bool = True) -> bool:
        """Establish IMAP connection."""
        self.client = IMAPClient(host, port=port, ssl=secure)
        return True
  • The `connect` tool is registered and handled in `server.py` within `handle_tool_call` by calling `imap_client.connect`.
    if name == "connect":
        return imap_client.connect(
            host=args["host"],
            port=args.get("port", 993),
            secure=args.get("secure", True),
        )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Soundhannes/IMAP-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server