Office 365 MCP Server
Complete Microsoft Graph API integration for Claude Code CLI with 45 powerful Office 365 tools
Potencia tu agente
Instalación del publicador. No es un endpoint de PlugMCP.
Host a copy with our keys and logs.
Aún no hay una versión empaquetada en el registro. Sigue el README del repositorio.
¿URL remota o un comando en tu máquina? En qué se diferencian las dos instalaciones
Ejecutar en PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
AbrirSeamlessly integrate your Office 365 account with Claude Code CLI for intelligent email management, calendar operations, file handling, and more. Built using the official Model Context Protocol (MCP) SDK.
Total: 45 Production-Ready Tools
git clone https://github.com/eesb99/office365-mcp-server.git
cd office365-mcp-server
npm install
Required packages:
@modelcontextprotocol/sdk - Official MCP SDK@azure/msal-node - Microsoft Authentication Library@microsoft/microsoft-graph-client - Microsoft Graph API clientzod - Schema validationCopy the example configuration:
cp .env.example .env
Edit .env with your Azure credentials (see Azure Configuration below):
AZURE_CLIENT_ID=your-client-id-here
AZURE_AUTHORITY=https://login.microsoftonline.com/your-tenant-id-here
AZURE_CLIENT_SECRET=your-client-secret-here
[email protected]
⚠️ NEVER commit the .env file to Git!
Office 365 MCP Server (or your preferred name)Accounts in this organizational directory onlyAfter registration, note these values:
AZURE_CLIENT_IDAZURE_AUTHORITY URLMCP Server Secret90 days (recommended, or choose your preference)AZURE_CLIENT_SECRETIn your app registration, go to API permissions
Click + Add a permission → Microsoft Graph → Application permissions
Add these permissions:
Required Permissions (Minimum - 4 tools):
User.Read.AllMail.ReadCalendars.ReadFiles.Read.AllFull Feature Set (All 45 tools):
Mail.ReadWrite - Email managementMail.Send - Send emailsMailboxSettings.ReadWrite - Mailbox configurationCalendars.ReadWrite - Calendar operationsFiles.ReadWrite.All - File managementContacts.ReadWrite - Contact managementTeam.ReadBasic.All - Teams accessChannel.ReadBasic.All - Channel informationChannelMessage.Send - Send channel messagesChannelMessage.Read.All - Read channel messagesChat.ReadWrite - Chat managementTasks.ReadWrite - Task managementClick Add permissions
⚠️ CRITICAL: After adding permissions:
Note: Admin consent is required for Application permissions. Contact your Microsoft 365 administrator if you don't have sufficient privileges.
For detailed instructions, see AZURE_PERMISSIONS_SETUP.md.
Add this MCP server to your Claude Code configuration:
Location: ~/.claude.json
{
"mcpServers": {
"office365": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/office365-mcp-server/office365-sdk.js"],
"env": {
"AZURE_CLIENT_ID": "your-client-id-here",
"AZURE_CLIENT_SECRET": "your-client-secret-here",
"AZURE_AUTHORITY": "https://login.microsoftonline.com/your-tenant-id-here",
"OFFICE365_USER_EMAIL": "[email protected]"
}
}
}
}
Important:
/absolute/path/to/office365-mcp-server/ with the actual pathenv sectionlist office 365 tools
Troubleshooting: If tools don't appear, check:
office365-sdk.js is absolute and correct~/.claude.jsonnode --versionnpm installOnce configured in Claude Code CLI, you can use natural language to interact with Office 365:
Email:
"Show me my last 10 emails"
"Search for emails from [email protected] about Q4 budget"
"Send an email to [email protected] with subject 'Meeting Notes'"
"What emails are in my Sent Items folder?"
Calendar:
"What's on my calendar this week?"
"Create a meeting tomorrow at 2pm for 1 hour"
"Show all events in the next 30 days"
Files:
"List files in my OneDrive root folder"
"Search for files containing 'proposal'"
"Show me PDF files modified this month"
Contacts:
"List all my contacts"
"Find contact information for John Smith"
Teams:
"List all my Teams"
"Show channels in the Marketing team"
"Get recent messages from the General channel"
Tasks:
"Show my task lists"
"What tasks are incomplete?"
"Create a task in my To-Do list"
For complete tool documentation, see OFFICE365_TOOLS.md
Simply use the natural language commands in Claude Code after setup.
Test the server independently:
# Test basic authentication
node tests/simple-test.js
# Test MCP server protocol
node tests/simple-mcp-server.js
Note: Standalone testing requires credentials in .env file.
✅ Environment Variables: All credentials stored in environment variables
✅ No Hardcoded Secrets: No credentials in source code
✅ Git Protection: .gitignore prevents credential commits
✅ Validation: Startup validation ensures all required variables are set
✅ Admin Consent: Application permissions require admin approval
⚠️ Never commit .env files or expose credentials in code!
Check:
~/.claude.json is absolute (not relative)~/.claude.json env sectionnode office365-sdk.js - should start without errors401 Unauthorized:
AZURE_CLIENT_SECRET is correct (use Value, not Secret ID)AZURE_CLIENT_ID and AZURE_AUTHORITY are correct403 Forbidden:
Error: "Insufficient privileges to complete the operation"
Solution:
Server fails to start:
node --version (need 18+)rm -rf node_modules && npm install~/.claude.json (validate JSON syntax)For more troubleshooting, see AZURE_PERMISSIONS_SETUP.md
Contributions are welcome! This is an open-source project.
git checkout -b feature/amazing-featuregit commit -m 'Add amazing feature'git push origin feature/amazing-featureFound a bug or have a suggestion? Open an issue
Include:
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 eesb99
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
If you find this project useful, please consider giving it a star on GitHub! ⭐
Made with ❤️ for the Claude Code community
Complete Microsoft Graph API integration for Claude Code CLI with 45 powerful Office 365 tools - Email, Calendar, Files, Contacts, Teams, Tasks
Herramientas
Aún no hay lista de herramientas. Los servidores remotos la reciben tras la primera comprobación de estado.
Preguntas frecuentes
Copia en esta página la configuración stdio para Cursor, Claude Desktop, Claude Code o VS Code. Usa la instalación del publicador, no un proxy de PlugMCP.
Este registro no indica ninguna variable de entorno obligatoria.
Office365 se ejecuta localmente por stdio.
Última comprobación: 2026-10-28. Complete Microsoft Graph API integration for Claude Code CLI with 45 powerful Office 365 tools - Email, Calendar, Files, Contacts, Teams, Tasks