@insightsentry/ms-mcp
MCP (Model Context Protocol) server for Microsoft Outlook, To Do, and Calendar via the Microsoft Graph API.
Gives AI assistants direct access to your Outlook mailbox — read, search, send, draft, and reply to emails, manage To Do tasks, and manage calendar events. Uses OAuth2 client credentials flow so no interactive login is needed.
Setup
Prerequisites
You need a Microsoft Entra (Azure AD) app registration with the following application permissions:
Mail.ReadWrite
Mail.Send
Tasks.ReadWrite
Calendars.ReadWrite
Gather these values from your app registration:
GRAPH_API_CLIENT_ID | Application (client) ID |
GRAPH_API_CLIENT_SECRET | Client secret value |
GRAPH_API_TENANT_ID | Directory (tenant) ID |
GRAPH_API_USER_ID | Object ID or UPN of the mailbox user |
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"microsoft": {
"command": "npx",
"args": ["@insightsentry/ms-mcp"],
"env": {
"GRAPH_API_CLIENT_ID": "your-client-id",
"GRAPH_API_CLIENT_SECRET": "your-client-secret",
"GRAPH_API_TENANT_ID": "your-tenant-id",
"GRAPH_API_USER_ID": "your-user-id"
}
}
}
}
Claude Code
Add to .mcp.json in your project root:
{
"mcpServers": {
"microsoft": {
"command": "npx",
"args": ["@insightsentry/ms-mcp"],
"env": {
"GRAPH_API_CLIENT_ID": "your-client-id",
"GRAPH_API_CLIENT_SECRET": "your-client-secret",
"GRAPH_API_TENANT_ID": "your-tenant-id",
"GRAPH_API_USER_ID": "your-user-id"
}
}
}
}
Available Tools (18)
Email
search_emails | Search emails across all folders using KQL syntax |
list_emails | List emails with pagination, filtering, and search |
read_email | Read full email content by ID |
create_draft | Create a draft email |
send_email | Send a new email directly |
reply_email | Reply or reply-all to an email |
To Do
search_tasks | Search tasks across all lists by keyword |
list_task_lists | List all To Do task lists |
list_tasks | List tasks in a task list with filtering |
create_task | Create a task with title, body, due date, importance |
update_task | Update task title, body, due date, importance, or status |
delete_task | Delete a task |
Calendar
search_events | Search calendar events using KQL syntax |
list_events | List upcoming calendar events in a time range |
get_event | Get full details of a calendar event |
create_event | Create an event with attendees, location, Teams meeting |
update_event | Update event details |
delete_event | Delete a calendar event |
Token Caching
Access tokens are cached to ~/.ms-mcp/token.json and reused across invocations until they expire. No interactive login is required.
Development
npm install
npm run build
npm run dev
License
MIT