authenticate
Log in to an IMAP email account with username and password to enable email reading, searching, and organization through the IMAP MCP Server.
Instructions
Login with username and password
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | Email username | |
| password | Yes | Email password or app password | |
| smtpHost | No | SMTP server hostname (optional, for drafts) | |
| smtpPort | No | SMTP port (default: 587) |
Implementation Reference
- src/imap_mcp/imap_client.py:56-61 (handler)The authenticate method in ImapClientWrapper logs the IMAP client into the server using the provided username and password.
def authenticate(self, username: str, password: str) -> bool: """Login with username and password.""" if not self.client: raise RuntimeError("Not connected. Call connect() first.") self.client.login(username, password) return True