Microsoft To Do
STDIOMCP server enabling AI assistants to interact with Microsoft To Do via Graph API
MCP server enabling AI assistants to interact with Microsoft To Do via Graph API
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.
# Install globally using npm npm install -g microsoft-todo-mcp-server # Or using pnpm pnpm install -g microsoft-todo-mcp-server # Or run directly with npx (no installation) npx microsoft-todo-mcp-server
The package provides three command aliases:
microsoft-todo-mcp-server - Full package namemstodo - Short alias for the MCP servermstodo-config - Configuration helper toolgit clone https://github.com/jordanburke/microsoft-todo-mcp-server.git cd microsoft-todo-mcp-server pnpm install pnpm run build
http://localhost:3000/callbackCreate a .env file in the project root (required for authentication):
CLIENT_ID=your_client_id CLIENT_SECRET=your_client_secret TENANT_ID=your_tenant_setting REDIRECT_URI=http://localhost:3000/callback
organizations - For multi-tenant organizational accounts (default if not specified)consumers - For personal Microsoft accounts onlycommon - For both organizational and personal accountsyour-specific-tenant-id - For single-tenant configurationsExamples:
# For multi-tenant organizational accounts (default) TENANT_ID=organizations # For personal Microsoft accounts TENANT_ID=consumers # For both organizational and personal accounts TENANT_ID=common # For a specific organization tenant TENANT_ID=00000000-0000-0000-0000-000000000000
The server stores authentication tokens in tokens.json with automatic refresh 5 minutes before expiration. You can override the token file location:
# Using environment variable export MSTODO_TOKEN_FILE=/path/to/custom/tokens.json # Or pass tokens directly export MS_TODO_ACCESS_TOKEN=your_access_token export MS_TODO_REFRESH_TOKEN=your_refresh_token
# If installed globally git clone https://github.com/jordanburke/microsoft-todo-mcp-server.git cd microsoft-todo-mcp-server pnpm install pnpm run auth # Or if running locally pnpm run auth
This opens a browser window for Microsoft authentication and creates a tokens.json file.
# Generate MCP configuration file pnpm run create-config # Or use the global helper (if installed globally) mstodo-config
This creates an mcp.json file with your authentication tokens.
For Claude Desktop:
Add to your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json~/.config/Claude/claude_desktop_config.json{ "mcpServers": { "microsoftTodo": { "command": "npx", "args": ["--yes", "microsoft-todo-mcp-server"], "env": { "MS_TODO_ACCESS_TOKEN": "your_access_token", "MS_TODO_REFRESH_TOKEN": "your_refresh_token" } } } }
For Cursor:
# Copy to Cursor's global configuration cp mcp.json ~/.cursor/mcp-servers.json
# Development & Building pnpm run build # Build TypeScript to JavaScript pnpm run dev # Build and run CLI in one command # Running the Server pnpm start # Run MCP server directly pnpm run cli # Run MCP server via CLI wrapper npx microsoft-todo-mcp-server # Run globally installed version # Authentication & Configuration pnpm run auth # Start OAuth authentication server pnpm run create-config # Generate mcp.json from tokens.json # Code Quality pnpm run format # Format code with Prettier pnpm run format:check # Check code formatting pnpm run lint # Run linting checks pnpm run typecheck # TypeScript type checking
The server provides 13 tools for comprehensive Microsoft To Do management:
auth-status - Check authentication status, token expiration, and account typeget-task-lists - Retrieve all task lists with metadata (default, shared, etc.)create-task-list - Create a new task listupdate-task-list - Rename an existing task listdelete-task-list - Delete a task list and all its contentsget-tasks - Get tasks from a list with filtering, sorting, and pagination
$filter, $select, $orderby, $top, $skip, $countcreate-task - Create a new task with full property support
update-task - Update any task propertiesdelete-task - Delete a task and all its checklist itemsget-checklist-items - Get subtasks for a specific taskcreate-checklist-item - Add a new subtask to a taskupdate-checklist-item - Update subtask text or completion statusdelete-checklist-item - Remove a specific subtasksrc/todo-index.ts) - Core server implementing the MCP protocolsrc/cli.ts) - Executable entry point with token managementsrc/auth-server.ts) - Express server for OAuth 2.0 flowsrc/create-mcp-config.ts) - Helper to create MCP configurationsToken acquisition failures
CLIENT_ID, CLIENT_SECRET, and TENANT_ID in your .env filehttp://localhost:3000/callbackPermission issues
Work/School Accounts
TENANT_ID=organizations # Multi-tenant # Or use your specific tenant ID
Personal Accounts
TENANT_ID=consumers # Personal only # Or TENANT_ID=common for both types
Check authentication status:
# Using the MCP tool # In your AI assistant: "Check auth status" # Or examine tokens directly cat tokens.json | jq '.expiresAt' # Convert timestamp to readable date date -d @$(($(cat tokens.json | jq -r '.expiresAt') / 1000))
Enable verbose logging:
# The server logs to stderr for debugging mstodo 2> debug.log
Contributions are welcome! Please:
pnpm run lint and pnpm run typecheck before submittingMIT License - See LICENSE file for details