Microsoft 365 MCP Server is a Model Context Protocol server that enables interaction with Microsoft 365 and Office services through the Graph API. It allows applications to access email, calendar, files, and other Microsoft services with comprehensive authentication support.
The server provides access to multiple Microsoft 365 services:
To add this MCP server to Claude Desktop:
{
"mcpServers": {
"ms365": {
"command": "npx",
"args": [
"-y",
"@softeria/ms-365-mcp-server"
]
}
}
}
--force-work-scopes
flag:{
"mcpServers": {
"ms365": {
"command": "npx",
"args": [
"-y",
"@softeria/ms-365-mcp-server",
"--force-work-scopes"
]
}
}
}
claude mcp add ms365 -- npx -y @softeria/ms-365-mcp-server
⚠️ You must authenticate before using tools.
For interactive authentication:
Using MCP client login:
login
tool (automatically checks for existing token)verify-login
tool to confirm authenticationUsing CLI login:
npx @softeria/ms-365-mcp-server --login
Follow the URL and code prompt in the terminal.
Tokens are securely cached in your OS credential store (with fallback to file).
When running in HTTP mode:
npx @softeria/ms-365-mcp-server --http 3000
This mode:
/auth/*
Authorization: Bearer <token>
for all MCP requests--enable-auth-tools
to enable)To use custom Azure credentials:
Create an Azure AD App Registration in the Azure Portal
Configure redirect URIs:
http://localhost:6274/oauth/callback
http://localhost:6274/oauth/callback/debug
http://localhost:3000/callback
(optional)Copy your client ID and create a client secret
Create a .env
file with:
MS365_MCP_CLIENT_ID=your-azure-ad-app-client-id-here
MS365_MCP_CLIENT_SECRET=your-azure-ad-app-client-secret-here
MS365_MCP_TENANT_ID=common
For systems that manage Microsoft OAuth tokens externally:
MS365_MCP_OAUTH_TOKEN=your_oauth_token npx @softeria/ms-365-mcp-server
This method uses your pre-existing OAuth token and doesn't handle token refresh.
--login Login using device code flow
--logout Log out and clear saved credentials
--verify-login Verify login without starting the server
--force-work-scopes Force inclusion of work account scopes during login
-v Enable verbose logging
--read-only Start server in read-only mode (disables write operations)
--http [port] Use HTTP transport instead of stdio (default port: 3000)
--enable-auth-tools Enable login/logout tools in HTTP mode
--enabled-tools <pattern> Filter tools using regex pattern
READ_ONLY=true|1
: Alternative to --read-only flagENABLED_TOOLS
: Filter tools using regex patternMS365_MCP_FORCE_WORK_SCOPES=true|1
: Force work account scopesLOG_LEVEL
: Set logging level (default: 'info')SILENT=true|1
: Disable console outputMS365_MCP_CLIENT_ID
: Custom Azure app client IDMS365_MCP_TENANT_ID
: Custom tenant ID (default: 'common')MS365_MCP_OAUTH_TOKEN
: Pre-existing OAuth tokenTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "ms365" '{"command":"npx","args":["-y","@softeria/ms-365-mcp-server"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"ms365": {
"command": "npx",
"args": [
"-y",
"@softeria/ms-365-mcp-server"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"ms365": {
"command": "npx",
"args": [
"-y",
"@softeria/ms-365-mcp-server"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect