Metadata-Version: 2.4
Name: mcs-adapter-imap
Version: 0.1.0
Summary: IMAP adapter for the Model Context Standard.
Author-email: Danny Gerst <danny@dannygerst.de>
License-Expression: Apache-2.0
Project-URL: Homepage, https://www.modelcontextstandard.io
Project-URL: Source, https://github.com/modelcontextstandard/python-sdk
Keywords: mcs,modelcontextstandard,adapter,imap,email
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Communications :: Email :: Post-Office :: IMAP
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# mcs-adapter-imap

IMAP adapter for the **Model Context Standard (MCS)**.

Encapsulates all IMAP wire-level details (`imaplib`, MIME parsing) behind a
clean adapter interface. Drivers like `mcs-driver-mailread` delegate all
mailbox I/O to this adapter so they never touch `imaplib` directly.

Zero runtime dependencies -- uses only the Python standard library.

## Installation

```bash
pip install mcs-adapter-imap
```

## Quick start

```python
from mcs.adapter.imap import ImapAdapter

adapter = ImapAdapter(host="imap.example.com", user="alice@example.com", password="...")
folders = adapter.list_folders()
messages = adapter.list_messages("INBOX", limit=10)
```

## Provided methods

| Method             | Description                                |
|--------------------|--------------------------------------------|
| `list_folders`     | List all mailbox folders                   |
| `list_messages`    | List message summaries in a folder         |
| `fetch_message`    | Fetch a full message by UID                |
| `search_messages`  | Search messages by IMAP criteria           |
| `move_message`     | Move a message to another folder           |
| `set_flags`        | Add or remove flags on a message           |
| `create_folder`    | Create a new mailbox folder                |

## Links

- **Homepage:** <https://www.modelcontextstandard.io>
- **Source:** <https://github.com/modelcontextstandard/python-sdk>

## License

Apache-2.0
