Commit graph

6 commits

Author SHA1 Message Date
setonc
4d8ea1b3a7 feat(outlook-mcp): harden Graph client with retry/backoff on 429 and 503
The Graph client previously failed the call on the first 429/503. The
request loop now retries these transient statuses before giving up.

Behavior:
- 429 and 503 are retried up to OUTLOOK_MAX_RETRIES times.
- Retry-After header is honored when Graph sends it, clamped to
  MAX_RETRY_DELAY_MS.
- Otherwise exponential backoff with full jitter, same clamp.
- 401 still throws UNAUTHORIZED immediately (no retry, no point).
- Other 4xx (400/403/404, etc.) are NOT retried -- these are caller
  errors, retrying just burns the rate-limit budget.

New config knobs, all env-overridable:
- OUTLOOK_MAX_RETRIES         (default 3)
- OUTLOOK_BASE_RETRY_DELAY_MS (default 1000)
- OUTLOOK_MAX_RETRY_DELAY_MS  (default 30000)

Implementation:
- Refactored the request into makeSingleRequest + optionsForRequest
  helpers so the retry loop sits above them without duplicating the
  response parsing.
- Empty-body success (202/204, e.g. sendMail, DELETE) is preserved.
- sleep and getRetryDelay are exported for the test.

Tests:
- tests/backoff.test.js: spins up a local HTTPS server, asserts
  getRetryDelay honors Retry-After and clamps to MAX_RETRY_DELAY_MS,
  and that callGraphAPI retries on 429 and fails after maxAttempts.
2026-07-31 09:12:14 -04:00
6d0436d679 fix(outlook-mcp): P0 audit follow-up - folder hierarchy, recursive rule folder names, timezone date filters, search fallback, thread/read body parsing 2026-06-21 22:02:24 -04:00
11241a4f3e fix(outlook-mcp): calendar list uses configured timezone and merge duplicate select fields 2026-06-21 20:53:30 -04:00
68a64461eb fix(outlook-mcp): P0 audit fixes
- Handle empty 2xx Graph API responses without JSON parse errors
- Fix list-rules handler import (handleListRules named export)
- Add timezone-aware display formatting using MS_TIMEZONE / DEFAULT_TIMEZONE
- Return created event ID in create-event success message
- Change default timezone from Windows name to IANA (America/New_York)
2026-06-21 20:28:11 -04:00
ba45f57b39 v1.0.1: Fix accept-event registration, edit-rule-sequence import, timezone config
Bug fixes (non-breaking):
- Register accept-event tool in calendar module (was dead code)
- Add missing callGraphAPI + ensureAuthenticated imports to rules/index.js
  (edit-rule-sequence would throw ReferenceError at runtime)
- Make calendar event timezone configurable via MS_TIMEZONE env var
  (was hardcoded to UTC; default is now Eastern Standard Time)

Version bump: 1.0.0 → 1.0.1
README updated: 21 tools, MS_TIMEZONE in config table, known issues pruned
2026-06-21 19:43:54 -04:00
a7886b5b2b Initial commit: Outlook MCP Server v1.0.0
MCP server providing Microsoft Outlook integration via Graph API:
- Email: list, search, read, send, thread reconstruction
- Calendar: list, create, decline, cancel, delete events
- Folders: list, create, move emails
- Inbox rules: list, create, reorder
- MSAL device code flow auth with persistent token cache
- Test mode with mock data
- Comprehensive README with setup, config, and tool reference

20 MCP tools across 5 modules. Node.js >= 14. MIT license.
2026-06-21 19:39:31 -04:00