How aniru18/m365_assistant works
M365 Assistant exposes Outlook and Calendar operations through an MCP server for Claude Desktop, with an optional agent that gathers Microsoft 365 context and produces a prioritized schedule. The graph preserves the README’s documented mail and calendar capabilities, although the supplied tool excerpt shows only some registrations. Agent execution and its MCP-tool dispatch are visible; unsampled integrations are not expanded beyond documented behavior.
Main entry points: tools.py MCP tools · graph_builder.py LangGraph workflow · graph_client.py Graph client · auth_manager.py Device-flow auth
Components 18
MCP interface
- Server entry
m365_assistant/main.py - MCP tools
m365_assistant/mcp/tools.py
Microsoft 365 access
- Mail operations
m365_assistant/services/mail_service.py - Calendar operations
m365_assistant/services/calendar_service.py - Settings
m365_assistant/core/config.py - Device-flow auth
m365_assistant/core/auth_manager.py - Graph client
m365_assistant/core/graph_client.py
Optional agent
- Agent runner
m365_assistant/agent/runner.py - LangGraph workflow
m365_assistant/agent/graph_builder.py - Agent state
m365_assistant/agent/state.py - Agent prompts
m365_assistant/agent/prompts.py - Groq model clients
m365_assistant/agent/client.py
Other components
- Claude Desktop
- MCP client
- Microsoft Graph
- Outlook mail and calendar
- Planning requester
- Daily schedule
Connections 25
- Claude Desktop → MCP client: initiates requests
README.md - MCP client → Server entry: connects to
README.md - Server entry → MCP tools: runs server
m365_assistant/main.py - MCP tools → Settings: loads settings
m365_assistant/mcp/tools.py - MCP tools → Device-flow auth: creates auth
m365_assistant/mcp/tools.py - MCP tools → Graph client: creates client
m365_assistant/mcp/tools.py - MCP tools → Mail operations: calls mail tools
m365_assistant/mcp/tools.py - MCP tools → Calendar operations: calls calendar tools
m365_assistant/mcp/tools.py - Mail operations → Graph client: requests tokens
m365_assistant/services/mail_service.py - Mail operations → Microsoft Graph: reads and updates
m365_assistant/services/mail_service.py - Calendar operations → Graph client: requests tokens
m365_assistant/services/calendar_service.py - Calendar operations → Microsoft Graph: lists events
m365_assistant/services/calendar_service.py - Graph client → Device-flow auth: acquires token
m365_assistant/core/graph_client.py - Graph client → Settings: uses endpoint
m365_assistant/core/graph_client.py - Device-flow auth → Settings: uses credentials
m365_assistant/core/auth_manager.py - Microsoft Graph → Outlook mail and calendar: accesses data
README.md - Device-flow auth → Microsoft Graph: authenticates access
README.md - Planning requester → Agent runner: requests planning
README.md - Agent runner → LangGraph workflow: builds workflow
m365_assistant/agent/runner.py - LangGraph workflow → Groq model clients: creates models
m365_assistant/agent/graph_builder.py - LangGraph workflow → Agent prompts: uses prompts
m365_assistant/agent/graph_builder.py - LangGraph workflow → Agent state: uses workflow state
m365_assistant/agent/graph_builder.py - LangGraph workflow → MCP tools: invokes MCP tools
m365_assistant/agent/graph_builder.py - LangGraph workflow → Daily schedule: produces schedule
m365_assistant/agent/graph_builder.py - Groq model clients → Microsoft Graph: calls Groq models