Labsco
jordanburke logo

Microsoft To Do MCP

β˜… 81

from jordanburke

Interact with Microsoft To Do using the Microsoft Graph API.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedAccount requiredNeeds API keys

Microsoft To Do MCP

CI npm version

A Model Context Protocol (MCP) server that enables AI assistants like Claude and Cursor to interact with Microsoft To Do via the Microsoft Graph API. This service provides comprehensive task management capabilities through a secure OAuth 2.0 authentication flow.

Features

  • 15 MCP Tools: Complete task management functionality including lists, tasks, checklist items, and organization features
  • Seamless Authentication: Automatic token refresh with zero manual intervention
  • OAuth 2.0 Authentication: Secure authentication with automatic token refresh
  • Microsoft Graph API Integration: Direct integration with Microsoft's official API
  • Multi-tenant Support: Works with personal, work, and school Microsoft accounts
  • TypeScript: Fully typed for reliability and developer experience
  • ESM Modules: Modern JavaScript module system

Azure App Registration

  1. Go to the Azure Portal
  2. Navigate to "App registrations" and create a new registration
  3. Name your application (e.g., "To Do MCP")
  4. For "Supported account types", select one of the following based on your needs:
    • Accounts in this organizational directory only (Single tenant) - For use within a single organization
    • Accounts in any organizational directory (Any Azure AD directory - Multitenant) - For use across multiple organizations
    • Accounts in any organizational directory and personal Microsoft accounts - For both work accounts and personal accounts
  5. Set the Redirect URI to http://localhost:3000/callback
  6. After creating the app, go to "Certificates & secrets" and create a new client secret
  7. Go to "API permissions" and add the following permissions:
    • Microsoft Graph > Delegated permissions:
      • Tasks.Read
      • Tasks.ReadWrite
      • User.Read
  8. Click "Grant admin consent" for these permissions

MCP Tools

The server provides 13 tools for comprehensive Microsoft To Do management:

Authentication

  • auth-status - Check authentication status, token expiration, and account type

Task Lists (Top-level Containers)

  • get-task-lists - Retrieve all task lists with metadata (default, shared, etc.)
  • create-task-list - Create a new task list
  • update-task-list - Rename an existing task list
  • delete-task-list - Delete a task list and all its contents

Tasks (Main Todo Items)

  • get-tasks - Get tasks from a list with filtering, sorting, and pagination
    • Supports OData query parameters: $filter, $select, $orderby, $top, $skip, $count
  • create-task - Create a new task with full property support
    • Title, description, due date, start date, importance, reminders, status, categories
  • update-task - Update any task properties
  • delete-task - Delete a task and all its checklist items

Checklist Items (Subtasks)

  • get-checklist-items - Get subtasks for a specific task
  • create-checklist-item - Add a new subtask to a task
  • update-checklist-item - Update subtask text or completion status
  • delete-checklist-item - Remove a specific subtask

Architecture

Project Structure

  • MCP Server (src/todo-index.ts) - Core server implementing the MCP protocol
  • CLI Wrapper (src/cli.ts) - Executable entry point with token management
  • Auth Server (src/auth-server.ts) - Express server for OAuth 2.0 flow
  • Config Generator (src/create-mcp-config.ts) - Helper to create MCP configurations

Technical Details

  • Microsoft Graph API: Uses v1.0 endpoints
  • Authentication: MSAL (Microsoft Authentication Library) with PKCE flow
  • Token Management: Automatic refresh 5 minutes before expiration
  • Build System: ts-builds (tsdown) for fast TypeScript compilation
  • Module System: ESM (ECMAScript modules)

Support