🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@insightsentry/ms-mcp

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@insightsentry/ms-mcp

MCP server for Microsoft Outlook, To Do, and Calendar via Graph API - provides AI-accessible tools for email, task management, and calendar events

latest
npmnpm
Version
2.0.5
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

@insightsentry/ms-mcp

MCP (Model Context Protocol) server for Microsoft Outlook, To Do, Calendar, and OneDrive via the Microsoft Graph API.

Gives AI assistants direct access to your Microsoft account — read, search, send, and draft emails, manage To Do tasks, manage calendar events, and browse/manage OneDrive files. Uses OAuth2 delegated auth with interactive browser login (or device-code flow for headless environments).

Setup

Prerequisites

You need a Microsoft Entra (Azure AD) app registration with delegated permissions (not application permissions):

  • Mail.ReadWrite
  • Mail.Send
  • Tasks.ReadWrite
  • Calendars.ReadWrite
  • Files.ReadWrite
  • Notes.ReadWrite
  • User.Read

The app registration must be configured as a public client (allow public client flows) since this uses PublicClientApplication — no client secret is needed.

Gather these values from your app registration:

VariableDescription
MS_MCP_CLIENT_IDApplication (client) ID
MS_MCP_TENANT_IDDirectory (tenant) ID

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "microsoft": {
      "command": "npx",
      "args": ["@insightsentry/ms-mcp"],
      "env": {
        "MS_MCP_CLIENT_ID": "your-client-id",
        "MS_MCP_TENANT_ID": "your-tenant-id"
      }
    }
  }
}

Claude Code

Add to .mcp.json in your project root:

{
  "mcpServers": {
    "microsoft": {
      "command": "npx",
      "args": ["@insightsentry/ms-mcp"],
      "env": {
        "MS_MCP_CLIENT_ID": "your-client-id",
        "MS_MCP_TENANT_ID": "your-tenant-id"
      }
    }
  }
}

Authentication

On first use, call the microsoft_login tool (or run npx @insightsentry/ms-mcp-login from the terminal). This opens your browser for interactive OAuth sign-in. On headless/SSH environments, it falls back to device-code flow automatically.

For device-code flow explicitly:

npx @insightsentry/ms-mcp-login --device-code

Tokens are cached to ~/.ms-mcp/msal-cache.json and silently refreshed via the refresh token on subsequent runs.

Available Tools (29)

Auth

ToolDescription
microsoft_loginSign in to Microsoft account via browser OAuth
microsoft_login_statusCheck if currently signed in

Raw API

ToolDescription
graph_apiCall any Microsoft Graph API endpoint directly

Email

ToolDescription
search_emailsSearch emails across all folders using KQL syntax
list_emailsList emails with pagination, filtering, and search
read_emailRead full email content by ID
create_draftCreate a draft email
send_emailSend a new email directly
reply_emailReply or reply-all to an email

To Do

ToolDescription
search_tasksSearch tasks across all lists by keyword
list_task_listsList all To Do task lists
list_tasksList tasks in a task list with filtering
create_taskCreate a task with title, body, due date, importance
update_taskUpdate task title, body, due date, importance, or status
delete_taskDelete a task

Calendar

ToolDescription
search_eventsSearch calendar events using KQL syntax
list_eventsList upcoming calendar events in a time range
get_eventGet full details of a calendar event
create_eventCreate an event with attendees, location, Teams meeting
update_eventUpdate event details
delete_eventDelete a calendar event

OneDrive

ToolDescription
list_drive_itemsList files and folders (root or by path/ID)
search_driveSearch files and folders by name or content
get_drive_itemGet file/folder metadata by ID or path
create_drive_folderCreate a new folder
move_drive_itemMove or rename a file/folder
copy_drive_itemCopy a file/folder to a new location
delete_drive_itemDelete a file/folder (moves to recycle bin)
share_drive_itemCreate a sharing link for a file/folder

JSONata Transforms

Most read tools accept an optional transform parameter — a JSONata expression applied to the response before returning. This lets AI assistants extract exactly the fields they need without processing the full response.

Development

npm install
npm run build     # Compile TypeScript
npm run dev       # Run with tsx (no build needed)
npm run login     # Interactive login

License

MIT

Keywords

mcp

FAQs

Package last updated on 03 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts