How azizmazrou/ews-mcp works
The repository’s recommended product is the v5/ewsmcp 4.5 Model Context Protocol server; src/ is the separately maintained legacy 4.0 line. The principal workflow is an MCP client calling a registered mailbox tool, which uses the EWS gateway and returns compact typed results. Major documented branches include mail, calendar/people, tasks, safe writes, semantic search, and server status. The graph emphasizes v5; relationships among tool modules and some internal safety/cache details are based on documentation or source-index references rather than inspected implementation excerpts.
Main entry points: server.py Tool server · base.py Tool dispatch · mail_read.py Mail tools · client.py EWS gateway
Components 20
Server runtime
- Process entry
v5/ewsmcp/main.py - MCP and HTTP
v5/ewsmcp/http.py - Tool server
v5/ewsmcp/server.py - Tool registry
v5/ewsmcp/tools/__init__.py - Tool dispatch
v5/ewsmcp/tools/base.py
Mailbox access
- EWS gateway
v5/ewsmcp/gateway/client.py - Connection manager
v5/ewsmcp/gateway/connection.py - Local cache
v5/ewsmcp/cache/store.py - Cache synchronization
v5/ewsmcp/cache/sync.py - Semantic search
v5/ewsmcp/semantic.py
Assistant capabilities
- Mail tools
v5/ewsmcp/tools/mail_read.py - Calendar and people
v5/ewsmcp/tools/calendar_people.py - Tasks and follow-ups
v5/ewsmcp/tools/tasks.py - Drafts and writes
v5/ewsmcp/tools/writes.py
Safety and state
- Short ID aliases
v5/ewsmcp/ids.py - Send confirmation
v5/ewsmcp/confirm.py - Audit chain
v5/ewsmcp/audit.py - Settings and tiers
v5/ewsmcp/config.py
Other components
- MCP client
- Exchange EWS
Connections 27
- MCP client → Process entry: starts stdio
README.md - MCP client → MCP and HTTP: calls HTTP
README.md - Process entry → MCP and HTTP: loads
v5/ewsmcp/main.py - Process entry → Tool server: starts
v5/ewsmcp/main.py - Tool server → EWS gateway: creates
v5/ewsmcp/server.py - Tool server → Tool registry: builds
v5/ewsmcp/server.py - Tool server → Connection manager: starts manager
v5/ewsmcp/server.py - Tool server → Local cache: initializes
v5/ewsmcp/server.py - Tool server → Semantic search: initializes
v5/ewsmcp/server.py - Tool server → Audit chain: initializes
v5/ewsmcp/server.py - Tool server → Short ID aliases: initializes
v5/ewsmcp/server.py - Tool server → Tool dispatch: dispatches
v5/ewsmcp/server.py - EWS gateway → Exchange EWS: connects
v5/ewsmcp/gateway/client.py - Connection manager → EWS gateway: manages
v5/ewsmcp/server.py - Cache synchronization → EWS gateway: reads mailbox
- Cache synchronization → Local cache: updates mirror
- Cache synchronization → Semantic search: feeds index
- Tool dispatch → Mail tools: dispatches
README.md - Tool dispatch → Calendar and people: dispatches
README.md - Tool dispatch → Tasks and follow-ups: dispatches
README.md - Tool dispatch → Drafts and writes: dispatches
README.md - Drafts and writes → Send confirmation: confirms send
README.md - Tool server → Settings and tiers: loads settings
v5/ewsmcp/server.py - Tool server → Audit chain: records actions
README.md - Mail tools → Local cache: searches mirror
- Mail tools → Semantic search: optionally searches
- Mail tools → Short ID aliases: uses short IDs