Skip to main content
Glama

owa-mail-mcp

MCP-сервер к корпоративному Exchange: почта, календарь, справочник людей.

Наружу Exchange отдаёт только /owa/ (EWS SOAP, MAPI, IMAP/SMTP закрыты), поэтому сервер работает через OWA JSON API (/owa/service.svc) — тот же протокол, что и веб-клиент OWA, — поверх NTLM.

Подключение

Конфиг MCP-клиента:

{
  "mcpServers": {
    "owa-mail": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/mainpart/owa-mail-mcp.git", "owa-mail-mcp"],
      "env": {
        "EXCHANGE_USERNAME": "DOMAIN\\user",
        "EXCHANGE_PASSWORD": "..."
      }
    }
  }
}

Локальный запуск из клона: uv sync && uv run owa-mail-mcp.

Related MCP server: OWA Exchange MCP Server

Переменные окружения

Переменная

Обяз.

Дефолт

Назначение

EXCHANGE_USERNAME

да

—

учётка NTLM, DOMAIN\user

EXCHANGE_PASSWORD

да

—

пароль

EXCHANGE_OWA_URL

https://owa.example.com

хост OWA

EXCHANGE_COOKIE_FILE

~/.config/owa-mail-mcp/cookies

кэш сессии (0600), пишется сервером

EXCHANGE_VERIFY_SSL

false

true — строгая проверка TLS

EXCHANGE_ATTACHMENT_DIR

/tmp/attachments

куда сохраняются вложения

EXCHANGE_TIME_ZONE

Russian Standard Time

Windows-зона для TimeZoneContext

EXCHANGE_LOG_LEVEL

INFO

уровень логов (в stderr)

MCP_ENABLED_TOOLS

20 тулов

allowlist видимых тулов (см. «Конфиг»)

MCP_TRANSPORT / MCP_HOST / MCP_PORT

stdio

транспорт

Методы

Служебное:

Метод

Что делает

check_auth

Жив ли сеанс OWA — делает лёгкий запрос к ящику, возвращает {authenticated, user, owa_url} или not_authenticated

Почта:

Метод

Что делает

get_folders

Папки с id, счётчиками и непрочитанными (limit/offset)

find_emails

Список папки или полнотекстовый поиск (query, granularity=threads|messages); листается по позиции (offset) или по курсору (after)

get_email

Письмо целиком: тело, получатели, id вложений, ссылки (include_links)

get_thread

Вся переписка по письму или conversation_id

send_email

Отправить письмо или сохранить черновик (draft)

reply_email

Ответить / ответить всем (reply_all)

forward_email

Переслать письмо с вложениями

delete_email

Удалить (в «Удалённые» или hard_delete)

mark_email_read ⚙

Пометить прочитанным / непрочитанным

move_email ⚙

Переместить письмо в папку

Календарь:

Метод

Что делает

get_calendar_events

События за период (start/end), свои или чужие (person); окно читается целиком, сужается датами, limit — только предохранитель

get_event

Событие целиком: тело, участники, статусы ответов

get_calendars

Какие календари видны и какие из них реально читаются

get_user_availability

Занятость человека с темами встреч — даже без доступа к папке

find_meeting_time

Свободные для всех слоты в рабочих часах

create_event

Создать событие или серию, разослать приглашения

update_event

Изменить событие и уведомить участников (apply_to для серий)

cancel_event

Отменить своё событие (apply_to для серий)

respond_to_event

Принять / отклонить / под вопросом (comment, notify_organizer, apply_to)

Люди, вложения, автоответчик:

Метод

Что делает

find_people

Справочник: имя/логин/адрес → адрес; при одном совпадении — полная карточка (должность, отдел, телефоны); details раскрывает несколько, limit/offset листают

get_attachment

Скачать вложение на диск

get_oof ⚙

Прочитать настройки автоответчика

set_oof ⚙

Включить / выключить / по расписанию

⚙ — выключены по умолчанию, включаются через MCP_ENABLED_TOOLS.

Конфиг

MCP_ENABLED_TOOLS полностью заменяет дефолт — перечисляйте ровно то, что нужно; пустая строка выключает все тулы.

Включить всё (24 тула):

check_auth,get_folders,find_emails,get_email,get_thread,send_email,reply_email,forward_email,delete_email,mark_email_read,move_email,get_calendar_events,get_event,get_calendars,get_user_availability,find_meeting_time,create_event,update_event,cancel_event,respond_to_event,get_attachment,find_people,get_oof,set_oof

Только чтение:

check_auth,get_folders,find_emails,get_email,get_thread,get_calendar_events,get_event,get_calendars,get_user_availability,find_people

Available Tools

20 tools
cancel_eventCancel Calendar EventA
Destructive

Cancel an event YOU organize and notify the attendees.

The notice reaches them and cannot be recalled. Only the organizer can cancel: asked to cancel someone else's event this refuses rather than quietly deleting your copy — to take it off your own calendar, decline it with respond_to_event.

For a RECURRING event apply_to is required; nothing is cancelled until you supply it.

Inputs: item_id (required), message, apply_to. Returns: result

check_authCheck OWA SessionA
Read-onlyIdempotent

Is the OWA session live? A health check for this MCP connection.

Makes one light authenticated call to the mailbox — not just a cookie-file check — so the answer covers both the credentials and whether the OWA host is reachable, independent of any particular tool.

Inputs: no named parameters. Returns: result

create_eventCreate Calendar EventA

Create a calendar event, one-off or recurring, and invite attendees.

With no attendees this is a private appointment and nothing is sent.

Inputs: end (required), start (required), subject (required), body, +10 more. Returns: result

delete_emailDelete EmailA
Destructive

Delete an email — to Deleted Items by default.

Inputs: item_id (required), hard_delete. Returns: result

find_emailsFind EmailsA
Read-onlyIdempotent

List emails in a folder, or search the whole mailbox by text.

Newest first. Bodies are not included — a row carries a short preview at most; full body, attachment ids and links come from get_email.

A listing answers with total/has_more and both continuations, next_offset and next_cursor — take either for the next page. A search has neither a total (the server reports 0 whatever it found) nor a cursor.

Inputs: after, limit, query, folder, +3 more. Returns: result

find_meeting_timeFind Meeting SlotsA
Read-onlyIdempotent

Concrete meeting slots where everyone is free, in working hours.

Feed a chosen slot straight into create_event. Slots are computed from each attendee's actual busy blocks (absolute times), not from the merged free/busy string — that string comes back shifted by the mailbox time zone on this server and would place meetings on top of existing ones.

Inputs: people (required), end, limit, start, +5 more. Returns: result

find_peopleFind PeopleA
Read-onlyIdempotent

Look someone up in the corporate address book.

A single match comes back with the full card — job title, department, office, phones. Several come back as a compact list, each with the exact SMTP address send_email and create_event want. has_more only means the page came back full: the directory reports no honest total.

Inputs: query (required), limit, offset, details. Returns: result

forward_emailForward EmailA
Destructive

Forward an email with its attachments. Sends immediately.

Inputs: to (required), item_id (required), body, body_type. Returns: result

get_attachmentDownload AttachmentA

Download an attachment to disk and return its path.

Works for both mail and calendar attachments.

Inputs: attachment_id (required), filename, target_dir. Returns: result

get_calendar_eventsList Calendar EventsA
Read-onlyIdempotent

Calendar events in a time window, recurrences expanded.

is_recurring on a row means it is one occurrence of a series: changing, cancelling or declining that row needs an explicit apply_to in the write tools.

There is no paging and nothing to page — the whole window is read every call, so total is exact. Narrow the answer by moving start/end.

Inputs: end, limit, start, folder, +1 more. Returns: result

get_calendarsList CalendarsA
Read-onlyIdempotent

List the calendars in your sidebar — yours and colleagues' — and who you can read.

A colleague's calendar being listed does NOT mean it is readable: the entry looks identical either way, and only a read attempt tells them apart — hence check_access. When someone's calendar is closed, their schedule WITH MEETING SUBJECTS is usually still available via get_user_availability.

Inputs: check_access. Returns: result

get_emailRead EmailA
Read-onlyIdempotent

Full email: body, all recipients, and attachment ids for get_attachment.

Inputs: item_id (required), body_format, include_links. Returns: result

get_eventRead Calendar EventA
Read-onlyIdempotent

Full calendar event: body, attendees with response status, attachment ids.

Inputs: item_id (required), body_format. Returns: result

get_foldersList Mail FoldersA
Read-onlyIdempotent

List mail/calendar folders with their ids, item counts and unread counts.

Use it to turn a custom folder name into the FolderId find_emails and move_email accept. total is the server's own count of folders in view, so it is trustworthy.

Inputs: depth, limit, offset, parent. Returns: result

get_threadRead Email ThreadA
Read-onlyIdempotent

Every email in a conversation, newest first — the whole back-and-forth.

The only way to read a thread in full: search returns just the messages that matched, get_email returns one. Bodies are not included — follow up with get_email on the messages you need.

has_more only says the thread hit limit: this action has no offset and no cursor, so raise limit to see the rest.

Inputs: item_id (required), limit, include_deleted. Returns: result

get_user_availabilityRead Free/Busy ScheduleA
Read-onlyIdempotent

Read someone's schedule: their busy blocks, WITH MEETING SUBJECTS.

Works for a colleague who has not shared their calendar folder, where get_calendar_events(person=…) needs exactly that sharing and otherwise fails with "Доступ запрещён". Subjects appear when their sharing level exposes details; otherwise subject is null and the busy intervals remain.

For "when can we all meet?" use find_meeting_time.

Inputs: people (required), end, start, interval. Returns: result

reply_emailReply to EmailA
Destructive

Reply to an email, quoting the original. Sends immediately.

Inputs: body (required), item_id (required), body_type, reply_all. Returns: result

respond_to_eventRespond to InvitationA
Idempotent

Accept, decline or tentatively accept an event invitation.

For a RECURRING event apply_to is required, and it matters: declining the series tells the organizer you are out of every future meeting, and a sent decline cannot be recalled. Nothing is sent until you supply it.

Inputs: item_id (required), response (required), comment, apply_to, +1 more. Returns: result

send_emailSend EmailA
Destructive

Send an email, or save it to Drafts. Sending is immediate — no confirmation step.

Inputs: to (required), body (required), subject (required), cc, +4 more. Returns: result

update_eventUpdate Calendar EventA
Destructive

Change an existing event and notify attendees. Only the fields you pass change.

For a RECURRING event apply_to is required, and nothing is changed until you supply it.

Inputs: item_id (required), end, body, start, +5 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 20 tools

    Disambiguation4/5

    Most tools target a distinct action and resource, but get_folders and get_calendars have slight overlap since both list folders for mail/calendar. The descriptions clarify the distinction, so ambiguity is low.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern in lowercase snake_case. Verbs like get, find, send, create, and update are used predictably, making the API easy to learn and navigate.

    Tool Count3/5

    At 20 tools, the server is heavier than the typical 3-15 range. While the dual email/calendar scope justifies the number, it falls into the 'heavy' category and could feel overwhelming for agents.

    Completeness2/5

    Calendar operations are well-covered with full CRUD and response handling, but the email side has significant gaps: get_folders references move_email, which does not exist, and there is no update or edit operation for emails. This creates dead ends for workflows involving moving or modifying messages.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      MCP server for any Microsoft Exchange / OWA deployment. Gives LLM agents access to email, calendar, directory search, folders, availability, and meeting analytics via 30 tools.
      30
      32 PyPI
      12
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      MCP server for sending and managing Microsoft Outlook email via the Microsoft Graph API, including drafts, replies, contacts, and directory search.
      22
      ISC
    • A
      license
      A
      quality
      C
      maintenance
      A local MCP server for on-premises Microsoft Exchange, connecting via EWS and NTLM. It provides mail, template, availability, and calendar workflow tools through stdio, with draft-first safety and Windows Credential Manager integration.
      11
      9
      MIT