@leonardocrdso/office365-mcp-server 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +140 -0
- package/build/index.js +33113 -0
- package/package.json +57 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 leonardocrdso
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# @leonardocrdso/office365-mcp-server
|
|
2
|
+
|
|
3
|
+
An MCP (Model Context Protocol) server for Microsoft 365 integration. Interact with Outlook, Calendar, OneDrive, SharePoint and Teams via Microsoft Graph API.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
### Using npx (recommended)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
AZURE_CLIENT_ID=your-client-id npx @leonardocrdso/office365-mcp-server
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Adding to Claude Code
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
claude mcp add office365-mcp-server -e AZURE_CLIENT_ID=your-client-id -- npx @leonardocrdso/office365-mcp-server
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Manual configuration
|
|
20
|
+
|
|
21
|
+
Add to your MCP client settings:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"office365-mcp-server": {
|
|
27
|
+
"command": "npx",
|
|
28
|
+
"args": ["@leonardocrdso/office365-mcp-server"],
|
|
29
|
+
"env": {
|
|
30
|
+
"AZURE_CLIENT_ID": "your-client-id",
|
|
31
|
+
"AZURE_TENANT_ID": "common"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Azure AD Setup
|
|
39
|
+
|
|
40
|
+
1. Go to [Azure Portal](https://portal.azure.com) > **Microsoft Entra ID** > **App registrations**
|
|
41
|
+
2. Click **New registration**:
|
|
42
|
+
- Name: `Office 365 MCP Server`
|
|
43
|
+
- Supported account types: **Accounts in any organizational directory** (multi-tenant)
|
|
44
|
+
- Redirect URI: leave empty
|
|
45
|
+
3. In **Authentication**: set **Allow public client flows** to **Yes**
|
|
46
|
+
4. In **API permissions** > **Add permissions** > **Microsoft Graph** > **Delegated permissions**, add:
|
|
47
|
+
- `User.Read`
|
|
48
|
+
- `Mail.Read`, `Mail.Send`, `Mail.ReadWrite`
|
|
49
|
+
- `Calendars.Read`, `Calendars.ReadWrite`
|
|
50
|
+
- `Files.Read.All`, `Files.ReadWrite.All`
|
|
51
|
+
- `Sites.Read.All`, `Sites.ReadWrite.All`
|
|
52
|
+
- `Team.ReadBasic.All`, `Channel.ReadBasic.All`, `ChannelMessage.Send`
|
|
53
|
+
- `Chat.Read`, `Chat.ReadWrite`
|
|
54
|
+
5. Copy the **Application (client) ID** and use as `AZURE_CLIENT_ID`
|
|
55
|
+
|
|
56
|
+
## Tools
|
|
57
|
+
|
|
58
|
+
### Auth
|
|
59
|
+
|
|
60
|
+
| Tool | Description |
|
|
61
|
+
|------|-------------|
|
|
62
|
+
| `login` | Start Device Code Flow authentication — returns a code and URL |
|
|
63
|
+
| `auth-status` | Check authentication status and show logged-in user info |
|
|
64
|
+
| `logout` | Sign out and remove cached tokens |
|
|
65
|
+
|
|
66
|
+
### Mail
|
|
67
|
+
|
|
68
|
+
| Tool | Description |
|
|
69
|
+
|------|-------------|
|
|
70
|
+
| `list-emails` | List emails from Outlook (inbox or specific folder) |
|
|
71
|
+
| `search-emails` | Search emails by KQL query |
|
|
72
|
+
| `read-email` | Read full email content by ID |
|
|
73
|
+
| `send-email` | Send a new email |
|
|
74
|
+
| `reply-email` | Reply to an existing email |
|
|
75
|
+
| `list-mail-folders` | List email folders |
|
|
76
|
+
|
|
77
|
+
### Calendar
|
|
78
|
+
|
|
79
|
+
| Tool | Description |
|
|
80
|
+
|------|-------------|
|
|
81
|
+
| `list-events` | List calendar events in a date range |
|
|
82
|
+
| `create-event` | Create a new event or meeting |
|
|
83
|
+
| `update-event` | Update an existing event |
|
|
84
|
+
| `delete-event` | Delete an event |
|
|
85
|
+
| `find-free-slots` | Check availability for meeting attendees |
|
|
86
|
+
|
|
87
|
+
### OneDrive
|
|
88
|
+
|
|
89
|
+
| Tool | Description |
|
|
90
|
+
|------|-------------|
|
|
91
|
+
| `list-drive-files` | List files and folders |
|
|
92
|
+
| `read-file-content` | Read text file content |
|
|
93
|
+
| `upload-file` | Upload a file (up to 4MB text) |
|
|
94
|
+
| `search-files` | Search files by text |
|
|
95
|
+
| `share-file` | Create a sharing link |
|
|
96
|
+
|
|
97
|
+
### SharePoint
|
|
98
|
+
|
|
99
|
+
| Tool | Description |
|
|
100
|
+
|------|-------------|
|
|
101
|
+
| `list-sites` | List SharePoint sites |
|
|
102
|
+
| `get-site` | Get site details |
|
|
103
|
+
| `list-document-libraries` | List document libraries |
|
|
104
|
+
| `list-library-items` | List library items |
|
|
105
|
+
| `search-sharepoint` | Search SharePoint content |
|
|
106
|
+
|
|
107
|
+
### Teams
|
|
108
|
+
|
|
109
|
+
| Tool | Description |
|
|
110
|
+
|------|-------------|
|
|
111
|
+
| `list-teams` | List joined teams |
|
|
112
|
+
| `list-channels` | List team channels |
|
|
113
|
+
| `list-channel-messages` | List channel messages |
|
|
114
|
+
| `send-channel-message` | Send a channel message |
|
|
115
|
+
| `list-chats` | List direct chats |
|
|
116
|
+
| `send-chat-message` | Send a chat message |
|
|
117
|
+
|
|
118
|
+
## Environment Variables
|
|
119
|
+
|
|
120
|
+
| Variable | Required | Default | Description |
|
|
121
|
+
|----------|----------|---------|-------------|
|
|
122
|
+
| `AZURE_CLIENT_ID` | Yes | — | App registration client ID |
|
|
123
|
+
| `AZURE_TENANT_ID` | No | `common` | Tenant ID or `common` for multi-tenant |
|
|
124
|
+
|
|
125
|
+
## Development
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# Install dependencies
|
|
129
|
+
bun install
|
|
130
|
+
|
|
131
|
+
# Run in development mode
|
|
132
|
+
bun run dev
|
|
133
|
+
|
|
134
|
+
# Build
|
|
135
|
+
bun run build
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## License
|
|
139
|
+
|
|
140
|
+
MIT
|