home / mcp / model context protocol (mcp) server + microsoft entra id oauth + todo management mcp server
An MCP server with Microsoft Entra ID OAuth and full Microsoft To Do task management via MCP clients.
Configuration
View docs{
"mcpServers": {
"anoopt-remote-mcp-entra-id-todo": {
"command": "npx",
"args": [
"mcp-remote",
"https://remote-mcp-entra-oauth-todo.<your-subdomain>.workers.dev/mcp"
],
"env": {
"ENTRA_CLIENT_ID": "<your-client-id>",
"ENTRA_TENANT_ID": "common",
"DEFAULT_TIMEZONE": "Europe/London",
"ENTRA_CLIENT_SECRET": "<your-client-secret>",
"COOKIE_ENCRYPTION_KEY": "<random-32-byte-string>"
}
}
}
}You deploy a Cloudflare Workers MCP server that uses Microsoft Entra ID OAuth and provides full Microsoft To Do task management. This lets users sign in with their Microsoft accounts and manage their todo lists, create tasks, set reminders, and more through MCP clients.
Connect to your MCP server from an MCP client or tooling that supports the Streamable HTTP transport. Once connected and you complete the OAuth flow, you gain access to tools that let you retrieve your Microsoft Graph user profile, list and manage todo lists, and work with individual tasks. You can open a Claude/desktop client or other MCP clients configured to your server URL to list, create, update, or delete todo items and lists, and to set due dates, reminders, and categories.
Typical usage patterns include: retrieving your user profile, listing all todo lists, creating a new list, adding tasks with due dates and reminders, updating task properties (title, description, status, due date, reminders, categories), and deleting completed tasks or entire lists. You can also test the connection using the provided Inspector workflow to ensure the MCP server is reachable and that authentication succeeds.
Prerequisites: you need a development environment with Node.js and npm, and you should have Wrangler installed for Cloudflare Workers deployments.
1) Prepare your Azure AD OAuth application for Entra ID integration in your Azure tenant. Create a new app registration, note the Application (client) ID and Directory (tenant) ID, and generate a client secret. Grant the required Microsoft Graph permissions (User.Read and Tasks.ReadWrite) and consent as an admin.
2) Install project dependencies and set up environment secrets. You will store sensitive values as Wrangler secrets.
npm install
wrangler secret put ENTRA_CLIENT_ID
wrangler secret put ENTRA_CLIENT_SECRET
wrangler secret put ENTRA_TENANT_ID
wrangler secret put COOKIE_ENCRYPTION_KEY
wrangler secret put DEFAULT_TIMEZONEConfigure your KV storage namespace for OAuth state and token data.
wrangler kv namespace create "OAUTH_KV"To run locally for development, start the local dev server and expose the MCP endpoint at http://localhost:8789.
wrangler devUse the Inspector tool to verify the OAuth flow and that the Tools surface correctly after authentication.
npx @modelcontextprotocol/inspector@latest
```
Enter the MCP URL for your server, e.g. https://remote-mcp-entra-oauth-todo.<your-subdomain>.workers.dev/mcpConfigure Claude Desktop to access your MCP server by providing the MCP command that launches the remote server. After restarting Claude Desktop, a browser login page will appear for OAuth, and, once granted, the tools will become available.
If you want to iterate locally, create a development OAuth app in Azure AD with a localhost redirect and set the development secrets in a local vars file. Run the server with the development flow and test against http://localhost:8789/mcp.
Retrieve the authenticated Microsoft Graph user profile for the signed-in user.
Fetch all todo lists for the authenticated user from Microsoft To Do.
Create a new todo list with a specified name for the authenticated user.
Rename or modify an existing todo list for the authenticated user.
Delete a todo list for the authenticated user.
List all tasks within a specific todo list.
Retrieve details for a specific task in a list.
Create a new task with title, optional body, due date, reminder, importance, and categories.
Update properties of an existing task including title, body, status, due date, reminders, and categories.
Remove a task from a list.
Simple test tool to add two numbers and verify MCP connectivity.