Skip to main content

IMAP adapter for the Model Context Standard.

Project description

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

pip install mcs-adapter-imap

Quick start

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

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcs_adapter_imap-0.1.0.tar.gz (10.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcs_adapter_imap-0.1.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file mcs_adapter_imap-0.1.0.tar.gz.

File metadata

  • Download URL: mcs_adapter_imap-0.1.0.tar.gz
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for mcs_adapter_imap-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cfb9c56f336a5d4023d198f819293e9e7cda6a3443ca853c9c338aea3329e477
MD5 f99fa87389166cfac41104d49ddd32f4
BLAKE2b-256 24568821c1b0b28ba73d6e002803227671eb3f6d6d6f1f7f5c4216e87b2adf8b

See more details on using hashes here.

File details

Details for the file mcs_adapter_imap-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mcs_adapter_imap-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c1d7747d0dddf1eae05106f2c4c671fcdef011aed6cf77190f555d933e35bc18
MD5 5f660f19bbfcb87e29feca29f3489614
BLAKE2b-256 ba155766c23b2b4b6b611ef2c70028e8ccf6723600c2778a49c6647afa2bc896

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page