Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
IMAP_HOSTYesIMAP server hostname (e.g. imap.gmail.com)
IMAP_PASSYesPassword or app-specific password
IMAP_PORTNoIMAP server port993
IMAP_USERYesEmail address or username
IMAP_SECURENoUse TLS for the connectiontrue
IMAP_STARTTLSNoUpgrade to TLS via STARTTLS (when IMAP_SECURE=false)true
IMAP_TLS_REJECT_UNAUTHORIZEDNoReject self-signed TLS certificatestrue

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_emails_24h

List all emails received in the last 24 hours. Returns an array of {id, subject, from, date} objects sorted newest-first. The id is a globally unique identifier — use it with fetch_email_content to read the full email.

list_emails_7days

List all emails received in the last 7 days. Returns an array of {id, subject, from, date} objects sorted newest-first. The id is a globally unique identifier — use it with fetch_email_content to read the full email.

list_emails_month

List all emails received in the last 30 days. Returns an array of {id, subject, from, date} objects sorted newest-first. The id is a globally unique identifier — use it with fetch_email_content to read the full email.

list_emails_quarter

List all emails received in the last 90 days. Returns an array of {id, subject, from, date} objects sorted newest-first. The id is a globally unique identifier — use it with fetch_email_content to read the full email.

list_emails_year

List all emails received in the last 365 days. Returns an array of {id, subject, from, date} objects sorted newest-first. The id is a globally unique identifier — use it with fetch_email_content to read the full email.

list_emails_all

List ALL emails in the mailbox (no date filter). Warning: this may return a very large number of results. Returns an array of {id, subject, from, date} objects sorted newest-first. The id is a globally unique identifier — use it with fetch_email_content to read the full email.

list_emails_from_domain

List all emails from a specific domain (e.g. "you.com" finds all emails from @you.com senders). Returns an array of {id, subject, from, date} objects sorted newest-first. The id is a globally unique identifier — use it with fetch_email_content to read the full email.

list_emails_from_sender

List all emails from a specific sender email address (e.g. "alice@example.com"). Returns an array of {id, subject, from, date} objects sorted newest-first. The id is a globally unique identifier — use it with fetch_email_content to read the full email.

fetch_email_content

Fetch the full content of a single email by its id. Returns {id, subject, from, to, date, body, attachments}. The attachments array contains metadata only (id, filename, contentType, size) — use fetch_email_attachment to download actual attachment data. Use an id obtained from any of the list_emails_* tools.

fetch_email_attachment

Download a specific attachment from an email. Requires the email id and the attachment id (obtained from fetch_email_content). Returns {id, filename, contentType, size, contentBase64} where contentBase64 is the base64-encoded file content.

list_folders

List all folders in the email account. Returns an array of {path, name, delimiter} objects. Use the path value when specifying a folder in other tools.

create_folder

Create a new folder. Use a path with the server's delimiter for subfolders (e.g. "INBOX/Receipts" or "Projects/2024"). Use list_folders first to discover the delimiter if unsure.

move_email

Move an email from one folder to another. Requires the email's id (from list_emails_* or fetch_email_content) and the destination folder to move it to. Returns {id, destination}.

create_draft

Create a new email draft in the Drafts folder. Returns {id, subject, to, date} of the created draft. Optionally set in_reply_to with an email id to create a threaded reply draft (sets In-Reply-To and References headers automatically).

draft_reply

Create a reply draft to an existing email. Automatically derives recipient, subject (Re: prefix), and threading headers from the original email. Set reply_all to true to include original recipients as CC. Returns {id, subject, to, date} of the created draft.

star_email

Add a star (flag) to an email. Requires the email's id (from list_emails_* or fetch_email_content). Returns {id, starred: true}.

unstar_email

Remove the star (flag) from an email. Requires the email's id (from list_emails_* or fetch_email_content). Returns {id, starred: false}.

list_starred_emails

List all starred (flagged) emails across all folders, grouped by folder. Returns an array of {id, subject, from, date} objects sorted newest-first. The id is a globally unique identifier — use it with fetch_email_content to read the full email.

update_draft

Replace an existing draft with new content. The id must refer to an email in the Drafts folder — this tool cannot modify emails in other folders. Returns {id, subject, to, date} of the updated draft.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/florianbuetow/imap-mini-mcp'

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