@teamnetwork-nz/m365-mcp-server 1.0.6 → 1.0.7
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/dist/graph/todo.js +6 -4
- package/dist/index.js +30 -1
- package/package.json +1 -1
package/dist/graph/todo.js
CHANGED
|
@@ -13,9 +13,10 @@ const TASK_SELECT = [
|
|
|
13
13
|
].join(',');
|
|
14
14
|
export async function listTodoLists(client, email) {
|
|
15
15
|
try {
|
|
16
|
+
// Note: the To Do lists endpoint has limited $select support with app-only auth.
|
|
17
|
+
// Fetch without $select to get all available fields rather than risk a 400.
|
|
16
18
|
return await client
|
|
17
19
|
.api(`/users/${email}/todo/lists`)
|
|
18
|
-
.select('id,displayName,isOwner,isShared,wellknownListName')
|
|
19
20
|
.get();
|
|
20
21
|
}
|
|
21
22
|
catch (err) {
|
|
@@ -29,11 +30,12 @@ export async function listTodoTasks(client, email, listId, params) {
|
|
|
29
30
|
filters.push(`status eq '${params.status}'`);
|
|
30
31
|
if (params.importance !== undefined)
|
|
31
32
|
filters.push(`importance eq '${params.importance}'`);
|
|
33
|
+
// Note: the To Do tasks endpoint has limited $select support with app-only auth.
|
|
34
|
+
// Fetch without $select to avoid a 400, same as listTodoLists.
|
|
35
|
+
// $orderby is also unsupported with app-only auth.
|
|
32
36
|
let req = client
|
|
33
37
|
.api(`/users/${email}/todo/lists/${listId}/tasks`)
|
|
34
|
-
.
|
|
35
|
-
.top(params.maxResults)
|
|
36
|
-
.orderby('lastModifiedDateTime desc');
|
|
38
|
+
.top(params.maxResults);
|
|
37
39
|
if (filters.length > 0) {
|
|
38
40
|
req = req.filter(filters.join(' and '));
|
|
39
41
|
}
|
package/dist/index.js
CHANGED
|
@@ -16,7 +16,36 @@ async function main() {
|
|
|
16
16
|
// 3. Create MCP server and register all tools
|
|
17
17
|
const server = new McpServer({
|
|
18
18
|
name: '@teamnetwork/m365-mcp-server',
|
|
19
|
-
version: '1.0.
|
|
19
|
+
version: '1.0.7',
|
|
20
|
+
}, {
|
|
21
|
+
instructions: `
|
|
22
|
+
Microsoft 365 MCP server — email, calendar, and To Do via the Microsoft Graph API.
|
|
23
|
+
|
|
24
|
+
## Accounts and mailboxes
|
|
25
|
+
- Most tools accept optional accountId and mailbox parameters. Omit both to use the first configured account and its first mailbox.
|
|
26
|
+
- Call list_mailboxes once at the start of a session if you need to work with a specific account or mailbox, or if a tool returns a CONFIG_ERROR.
|
|
27
|
+
- Some mailboxes are marked read-only in config. Write tools (send_message, create_event, create_todo_task, etc.) will fail with READONLY_VIOLATION on those mailboxes — do not retry, report the error to the user.
|
|
28
|
+
|
|
29
|
+
## Datetime handling
|
|
30
|
+
- All datetime inputs accept naive local time ("2026-05-11T09:00:00") or explicit offset ("2026-05-11T09:00:00+12:00").
|
|
31
|
+
- Naive strings are interpreted as the server's configured timezone (DATETIME_FORMAT env var — typically the user's local timezone). Do not convert to UTC before passing.
|
|
32
|
+
- All datetime values in responses are already expressed in the configured local timezone with offset (e.g. "2026-05-11T09:00:00+12:00"). Present these to the user as-is.
|
|
33
|
+
|
|
34
|
+
## Email
|
|
35
|
+
- list_messages returns metadata only (subject, sender, preview). Call get_message with the messageId to retrieve the full body.
|
|
36
|
+
- The bodySearch parameter performs a full-text search but cannot be combined with server-side filters (startDate, endDate, sender). When bodySearch is used, those filters are applied client-side after retrieval.
|
|
37
|
+
- Use list_folders to discover folder IDs. Well-known names ("Inbox", "SentItems", "Drafts", "DeletedItems", "JunkEmail") work without a lookup.
|
|
38
|
+
|
|
39
|
+
## Calendar
|
|
40
|
+
- list_events requires both startDate and endDate and expands recurring events within that window.
|
|
41
|
+
- Call list_calendars to discover calendarId values. Omit calendarId to use the default calendar.
|
|
42
|
+
|
|
43
|
+
## To Do
|
|
44
|
+
- All To Do task operations require a listId. Always call list_todo_lists first to discover available lists and their IDs.
|
|
45
|
+
- list_todo_tasks defaults to returning all statuses. Pass status="notStarted" to see only open tasks.
|
|
46
|
+
- Linked resources (list_linked_resources, create_linked_resource, etc.) are external URL attachments on a task — they are not subtasks. Subtasks appear as checklistItems inside the task body.
|
|
47
|
+
- delete_todo_task is permanent and irreversible. Confirm with the user before calling it.
|
|
48
|
+
`.trim(),
|
|
20
49
|
});
|
|
21
50
|
registerAllTools(server, config, auth);
|
|
22
51
|
// 4. Connect via stdio transport (Claude Desktop / Claude Code)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teamnetwork-nz/m365-mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "MCP server for Microsoft 365 Email and Calendar access using client credentials (app-only auth). Supports multiple accounts, shared mailboxes, per-mailbox read-only access, folder navigation, and date/content filtering.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|