microsoft-todo-mcp-server-self-hosted

microsoft-todo-mcp-server-self-hosted

A self-hosted Model Context Protocol server for Microsoft To Do. The key problem this solves: the Microsoft Graph API silently omits user-created lists on personal accounts (GET /me/todo/lists only returns well-known lists like "Flagged Emails"). This server works around it with a local SQLite registry that tracks every list you create, so your lists always show up.

Category
访问服务器

README

Microsoft To Do MCP — Self Hosted

A self-hosted Model Context Protocol server for Microsoft To Do. The key problem this solves: the Microsoft Graph API silently omits user-created lists on personal accounts (GET /me/todo/lists only returns well-known lists like "Flagged Emails"). This server works around it with a local SQLite registry that tracks every list you create, so your lists always show up.

Run it on your own VPS, expose it over HTTPS, and connect any MCP-compatible AI client (Claude Code, Cursor, Claude Desktop) from any machine.

Credits: Based on jordanburke/microsoft-todo-mcp-server, which is a fork of @jhirono/todomcp.


The problem this fixes

Microsoft's Graph API has a limitation for personal Microsoft accounts (outlook.com, hotmail.com, live.com, Gmail linked accounts, etc.):

  • POST /me/todo/lists — works, creates the list, returns an ID ✅
  • GET /me/todo/lists — only returns built-in lists like "Flagged Emails", silently drops everything you created ❌

This means any MCP server that relies purely on the API for listing will never show your custom lists. This repo fixes it by maintaining a local SQLite database (lists.db) that persists every list created through the server, then merges it with the API response so nothing is ever missing.


How it works

Your laptop / any machine
        │
        │  claude mcp add --transport http ...
        ▼
https://todo-mcp.yourdomain.com
        │
        ├── /          → Dashboard (connection status + quick-add commands)
        ├── /auth      → Start Microsoft OAuth
        ├── /callback  → OAuth callback (saves tokens)
        ├── /health    → Health check
        └── /mcp       → MCP endpoint (API key protected)

You authenticate once via the dashboard. Tokens are stored on your server and auto-refreshed. Your API key protects the MCP endpoint so only your machines can use it.


Features

  • Fixes personal account list limitation — SQLite registry ensures all your lists are always visible
  • HTTP transport — connect from any machine, not just localhost
  • Dashboard — web UI to connect your Microsoft account and get copy-paste setup commands for Claude Code, Cursor, and Claude Desktop
  • API key auth — protects the /mcp endpoint
  • Dashboard password — HTTP basic auth on the dashboard so only you can access it
  • Auto token refresh — tokens refresh automatically, no manual intervention
  • 15 MCP tools — full task management: lists, tasks, checklist items

Prerequisites

  • Node.js 18+
  • A server or VPS (DigitalOcean, Hetzner, etc.) with a domain pointed at it
  • A Microsoft account (personal or work)
  • An Azure App Registration (see below)

Azure App Registration

  1. Go to portal.azure.comApp registrationsNew registration
  2. Name it (e.g. todo-mcp)
  3. Supported account types: Personal Microsoft accounts (consumers) or any account (common)
  4. Redirect URI: https://todo-mcp.yourdomain.com/callback (Web)
  5. After creating, go to Certificates & secrets → create a client secret, copy it
  6. Go to API permissions → Add → Microsoft Graph → Delegated:
    • Tasks.Read, Tasks.ReadWrite, Tasks.Read.Shared, Tasks.ReadWrite.Shared, User.Read
  7. Click Grant admin consent
  8. Copy your Application (client) ID from the Overview page

Setup

1. Clone and install

git clone https://github.com/akkilesh-a/microsoft-todo-mcp-server.git
cd microsoft-todo-mcp-server
npm install
npm run build

2. Configure environment

cp .env.example .env

Edit .env:

CLIENT_ID=your_azure_app_client_id
CLIENT_SECRET=your_azure_app_client_secret
TENANT_ID=consumers
PORT=3001
PUBLIC_URL=https://todo-mcp.yourdomain.com
REDIRECT_URI=https://todo-mcp.yourdomain.com/callback
MCP_API_KEY=your_secret_api_key        # openssl rand -hex 32
DASHBOARD_USERNAME=admin               # username for dashboard login
DASHBOARD_PASSWORD=your_dashboard_pass  # set this — protects /auth

3. Run the server

node dist/todo-index.js

4. Authenticate

Open https://todo-mcp.yourdomain.com in your browser, enter your dashboard password, and click Connect Microsoft Account. After OAuth completes, tokens are saved on the server.

5. Connect your AI client

The dashboard shows ready-to-copy commands. Or manually:

Claude Code:

claude mcp add --transport http mstodo https://todo-mcp.yourdomain.com/mcp \
  --header "Authorization: Bearer your_api_key"

Cursor — add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "mstodo": {
      "url": "https://todo-mcp.yourdomain.com/mcp",
      "headers": { "Authorization": "Bearer your_api_key" }
    }
  }
}

Claude Desktop — add to claude_desktop_config.json:

{
  "mcpServers": {
    "mstodo": {
      "url": "https://todo-mcp.yourdomain.com/mcp",
      "headers": { "Authorization": "Bearer your_api_key" }
    }
  }
}

Security

Layer Protection
/mcp MCP_API_KEY — required on every MCP request
Dashboard /, /auth, /callback DASHBOARD_USERNAME + DASHBOARD_PASSWORD — HTTP basic auth

Always set DASHBOARD_PASSWORD. Without it, anyone who knows your URL can visit the dashboard and trigger an OAuth flow that overwrites your tokens. DASHBOARD_USERNAME defaults to admin.


MCP Tools

Task Lists

Tool Description
get-task-lists List all task lists (API + local SQLite registry)
create-task-list Create a new list
update-task-list Rename a list
delete-task-list Delete a list and all its tasks

Tasks

Tool Description
get-tasks Get tasks with filtering, sorting, pagination
create-task Create a task (title, body, due date, importance)
update-task Update any task properties
delete-task Delete a task

Checklist Items

Tool Description
get-checklist-items Get subtasks for a task
create-checklist-item Add a subtask
update-checklist-item Update subtask text or completion
delete-checklist-item Remove a subtask

Other

Tool Description
auth-status Check token status and expiry
archive-completed-tasks Archive all completed tasks in a list
get-task-lists-organized Grouped/categorized view of lists

License

MIT — see LICENSE

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选