From 91d9befa1e4d3e83f9177e60a91ae018b08441f1 Mon Sep 17 00:00:00 2001 From: albnnc Date: Thu, 9 Jul 2026 16:09:59 +0300 Subject: [PATCH] w --- SKILL.md | 181 ++++++++++++++++++++++++++++++++++++++++++++++++++++ dprint.json | 12 ++-- 2 files changed, 189 insertions(+), 4 deletions(-) create mode 100644 SKILL.md diff --git a/SKILL.md b/SKILL.md new file mode 100644 index 0000000..3ab6aaa --- /dev/null +++ b/SKILL.md @@ -0,0 +1,181 @@ +--- +name: exchange-mcp +description: >- + Use this skill when the user talks about + email, calendar, contacts, Exchange, EWS, corporate mail, + or scheduling meetings. +--- + +# exchange-mcp — MCP server for Microsoft Exchange + +This MCP server provides access to **Microsoft Exchange Server** via **Exchange +Web Services (EWS)** with NTLM authentication. Supports email, calendar, +contacts, and free/busy scheduling. + +**Use this server when the user talks about:** + +- Email, inbox, sent items, drafts +- Calendar, events, meetings, availability +- Contacts, people, colleagues, employees +- Attachments, files in emails +- Exchange, EWS, corporate mail + +**Does not support:** Microsoft 365 / Exchange Online (OAuth), IMAP/POP3/SMTP, +Gmail, Outlook.com. + +--- + +## Tools + +### Auth + +#### `login` + +Authenticate to Exchange EWS via NTLM. + +| Parameter | Type | Required | Description | +| ----------- | ------ | -------- | ------------------------------------------------ | +| `serverUrl` | string | yes | EWS server URL (e.g. `https://mail.example.com`) | +| `email` | string | yes | Email address | +| `username` | string | yes | NTLM username | +| `password` | string | yes | NTLM password | +| `domain` | string | no | NTLM domain (default: `corp`) | + +#### `check_session` + +Check if the current session is authenticated. No parameters. Returns +`{authenticated, email, serverUrl}`. + +#### `logout` + +Clear stored credentials. No parameters. + +--- + +### Email + +#### `get_emails` + +Get emails from a folder. + +| Parameter | Type | Default | Description | +| ------------- | ------- | --------- | ----------------------------------------------------------------------------------- | +| `folder` | string | `"Inbox"` | Folder name (Inbox, Sent, Drafts, Deleted, Junk, or custom; supports Russian names) | +| `limit` | number | `10` | Max emails (max 50; max 500 if `idsOnly=true`) | +| `offset` | number | `0` | Pagination offset | +| `includeBody` | boolean | `false` | If `true`, fetches full email body | +| `unreadOnly` | boolean | `false` | Only unread emails | +| `idsOnly` | boolean | `false` | Return only IDs + dates + subjects (faster, higher limit) | + +#### `get_email` + +Get a single email with full body and details. + +| Parameter | Type | Required | Description | +| --------- | ------ | -------- | ---------------------------- | +| `itemId` | string | yes | Exchange ItemId of the email | + +#### `search_emails` + +Search emails by text. + +| Parameter | Type | Default | Description | +| ------------- | ------ | -------- | --------------------------------------- | +| `query` | string | — | Text to search for | +| `folderId` | string | optional | Folder ID to limit search | +| `maxResults` | number | `20` | Max results (max 100) | +| `searchScope` | enum | `"all"` | Scope: `all`, `subject`, `body`, `from` | + +#### `mark_email_read` + +Mark emails as read or unread. + +| Parameter | Type | Default | Description | +| --------- | -------- | ------- | ------------------------------- | +| `itemIds` | string[] | — | List of Exchange ItemIds | +| `isRead` | boolean | `true` | `true` = read, `false` = unread | + +#### `download_attachments` + +Download all file attachments from an email to disk. + +| Parameter | Type | Default | Description | +| -------------- | ------ | -------------------- | --------------- | +| `itemId` | string | — | Exchange ItemId | +| `targetFolder` | string | `"/tmp/attachments"` | Local folder | + +--- + +### Folders + +#### `get_folders` + +List mailbox folders. + +| Parameter | Type | Default | Description | +| ---------------- | ------- | ----------------- | ----------------------------------------------------------------- | +| `parentFolderId` | string | `"msgfolderroot"` | Parent folder (supports distinguished names: `inbox`, `calendar`) | +| `recursive` | boolean | `false` | Recursively traverse subfolders | + +--- + +### Calendar + +#### `get_calendar_events` + +Get calendar events within a date range. + +| Parameter | Type | Required | Description | +| ------------- | ------- | -------- | ----------------------------------------- | +| `startDate` | string | yes | Start (`YYYY-MM-DD`) | +| `endDate` | string | yes | End (`YYYY-MM-DD`) | +| `includeBody` | boolean | `false` | Full details (organizer, attendees, body) | + +#### `download_event_attachments` + +Download attachments from a calendar event. Same parameters as +`download_attachments`. + +--- + +### Availability + +#### `find_free_time` + +Find free time slots in your calendar. + +| Parameter | Type | Default | Description | +| ----------------- | ------ | ----------- | -------------------------- | +| `startDate` | string | — | Start (`YYYY-MM-DD`) | +| `endDate` | string | = startDate | End | +| `durationMinutes` | number | `30` | Minimum slot duration | +| `startHour` | number | `9` | Work day start hour (0-23) | +| `endHour` | number | `18` | Work day end hour (0-23) | + +#### `find_meeting_time` + +Find common free time for multiple people. + +| Parameter | Type | Default | Description | +| ----------------- | ------ | ----------- | --------------------------------- | +| `emails` | string | — | Attendee emails (comma-separated) | +| `startDate` | string | — | Start | +| `endDate` | string | = startDate | End | +| `durationMinutes` | number | `30` | Minimum slot duration | +| `startHour` | number | `9` | Work day start hour | +| `endHour` | number | `18` | Work day end hour | + +--- + +### People + +#### `find_person` + +Search for people in the corporate directory (Active Directory). + +| Parameter | Type | Required | Description | +| --------- | ------ | -------- | ----------------------- | +| `query` | string | yes | Name, email, or keyword | + +Returns: name, email, job title, department, company, office, phone, manager, +direct reports. diff --git a/dprint.json b/dprint.json index b9bf997..ba4d613 100644 --- a/dprint.json +++ b/dprint.json @@ -5,14 +5,18 @@ "module.sortImportDeclarations": "caseInsensitive", "module.sortExportDeclarations": "caseInsensitive" }, + "markdown": { + "lineWidth": 80, + "textWrap": "always" + }, "excludes": [ "**/.git", "**/.target" ], "plugins": [ - "https://plugins.dprint.dev/typescript-0.91.1.wasm", - "https://plugins.dprint.dev/json-0.17.4.wasm", - "https://plugins.dprint.dev/markdown-0.15.3.wasm", - "https://plugins.dprint.dev/dockerfile-0.3.0.wasm" + "https://plugins.dprint.dev/typescript-0.96.1.wasm", + "https://plugins.dprint.dev/json-0.23.0.wasm", + "https://plugins.dprint.dev/markdown-0.22.1.wasm", + "https://plugins.dprint.dev/dockerfile-0.4.1.wasm" ] }