mstodo-mcp
A Microsoft To Do MCP server built for AI agents. It runs locally over stdio by default, can also run over HTTP on your own server, and talks to Microsoft Graph directly. It targets personal Microsoft accounts.
Built by Claude Fable 5.2 (max effort) with Claude Code.
Why another To Do server
Most To Do MCP servers expose the Graph API one endpoint per tool, which is hard work for an agent. This one is designed around how agents use it:
- No client secret. Sign-in is a public client with PKCE in your own browser. Tokens are stored encrypted by the operating system (DPAPI on Windows), never in plain text by default.
- Queries across lists.
find_taskssearches every list in one call: due today, overdue, upcoming, important, completed, filtered by words or category. The agent does not need to know which list a task is in. - Short task handles. Every task gets a five-character handle. No 150-character Graph ids in the conversation.
- Batches. Create, update, complete, delete or move up to 50 tasks in one call, with one result line per task that says what happened and why.
- Dates in your time zone. Due dates and reminders are read and shown in your zone, so nothing is off by one day.
- Repeating tasks done right. The request shapes were checked against a real account rule by rule. Graph has several undocumented behaviours here; see "Known limits".
- Read-only mode. With
MSTODO_READ_ONLY=1only the reading tools are registered and only read permission is requested. - Honest failures. Every result is one of three kinds: done, not done (the task is as it was, safe to retry), or to check (the request may have arrived, or the task was changed in part). A batch answer starts with a count of each.
Requirements
- Windows (PowerShell) is the tested platform. Linux works for the HTTP mode described below, with less testing.
- uv. It installs Python 3.12 for you.
- A client ID, which you get once in the next step.
Step 1: register an app and get a client ID
Microsoft requires every program that reads your data to be registered. The GUID you get is the client ID. It is not a password: with it alone nobody can read your tasks, because sign-in still happens in your browser. Registration is free.
An app has to live in a directory (tenant). A purely personal account has none, which is what the error "the selected user account does not exist in tenant Microsoft Services" on entra.microsoft.com means. Opening an Azure account gives you one; then use portal.azure.com.
- Open https://portal.azure.com, search for
App registrations, choose New registration. - Give it any name, for example
mstodo-mcp. - For supported account types choose Any Entra ID Tenant + Personal Microsoft accounts.
- Choose Register and copy the Application (client) ID from the overview page.
- Under Authentication → Add a platform → Mobile and desktop applications, enter the redirect URI
http://localhost. - On the same page, under Advanced settings, set Allow public client flows to Yes and save.
Do not create a client secret, and do not add API permissions.
Step 2: install and sign in
git clone https://github.com/gaivrt/mstodo-mcp
cd mstodo-mcp; uv sync
Sign in. A browser window opens; the client ID is remembered for later runs:
uv run mstodo-mcp login --client-id <client-id>
Other commands: uv run mstodo-mcp status shows the account, time zone and mode; logout signs out; login --device signs in with a device code when the machine has no browser.
Step 3: add it to an MCP client
{
"mcpServers": {
"mstodo": {
"command": "uv",
"args": ["--directory", "C:/path/to/mstodo-mcp", "run", "mstodo-mcp"]
}
}
}
The client starts the server when it needs it. If the first sign-in happened after the client had already started the server, reconnect the server once in the client.
Remote use (HTTP mode)
The claude.ai web and mobile apps cannot reach a program on your computer; they only connect to MCP servers on the public internet. To use this server there, run it on a machine of your own:
mstodo-mcp serve --http 8765
It listens only on http://127.0.0.1:8765/mcp and has no access control of its own: whoever can reach it can read, change and permanently delete all your tasks. Never open the port to the internet. Put an HTTPS reverse proxy in front and forward only a path nobody can guess. An nginx example (make <random> with openssl rand -hex 24):
location ^~ /mstodo-<random>/ {
proxy_pass http://127.0.0.1:8765/;
proxy_set_header Host 127.0.0.1:8765;
proxy_http_version 1.1;
proxy_buffering off;
access_log off;
}
The Host line is required: the server only accepts requests addressed to the local machine. access_log off keeps the path out of the logs.
On the server:
- Sign in with
mstodo-mcp login --client-id <client-id> --device. - A Linux server usually has no system keyring: set
MSTODO_ALLOW_PLAINTEXT_CACHE=1, and the token is stored in a file only its user can read. - Set
MSTODO_TIMEZONE; the server's own zone is probably not yours. - Use the same
MSTODO_DATA_DIRforloginand for the running server.
Then add a custom connector in claude.ai (Settings → Connectors) with the address https://<your domain>/mstodo-<random>/mcp. That address is the password: if it leaks, change the random part.
Tools
13 tools. Tasks are named by the short handle find_tasks shows; lists by their display name (case, and emoji or punctuation around the name, do not matter).
| Tool | What it does |
|---|---|
list_lists |
Every list, marked when it is the default list, the flagged-emails list, shared, or owned by someone else |
find_tasks |
Find tasks across all lists or in one. view: open, today, overdue, upcoming, important, completed; plus query and category. Paged |
get_tasks |
Everything about up to 50 tasks: the full note, numbered steps, links, attachments, timestamps |
create_tasks |
Up to 50 tasks, each with its own list, note, due date, reminder, importance, categories, steps, links and repetition |
update_tasks |
Up to 50 tasks; only the given fields change |
complete_tasks |
Up to 50 tasks; reopen=true reopens them. A repeating task moves on to its next due date |
move_tasks |
Up to 50 tasks to another list: copy, check, then delete the original. The handle keeps naming the task |
delete_tasks |
Up to 50 tasks, permanently |
edit_steps |
Add, check, uncheck, rename and remove the steps of one task in one call |
create_list, rename_list, delete_list |
Manage lists. Deleting a list that holds tasks or is shared needs force=true |
account |
status, login, logout |
Each item of a batch succeeds or fails on its own; nothing is rolled back. create_tasks and move_tasks work in order and stop at a lost connection or sign-in: later items are reported as not attempted.
Dates: YYYY-MM-DD, today, tomorrow, +3d; a reminder adds a time, as in tomorrow 09:00. Repetition: daily, weekdays, weekly on mon, thu, monthly, yearly, every 2 weeks. In update_tasks, none removes a due date, a reminder or a repetition.
Settings
All optional environment variables.
| Variable | Meaning | Default |
|---|---|---|
MSTODO_TIMEZONE |
Your IANA time zone, e.g. Asia/Shanghai |
the system's |
MSTODO_READ_ONLY |
Register only the reading tools and request only Tasks.Read |
off |
MSTODO_CLIENT_ID |
Client ID; wins over the remembered one | the remembered one |
MSTODO_DATA_DIR |
Where the client ID, the token cache and the handle table live | %LOCALAPPDATA%\mstodo-mcp on Windows |
MSTODO_AUTHORITY |
Sign-in endpoint | https://login.microsoftonline.com/common |
MSTODO_ALLOW_PLAINTEXT_CACHE |
Allow an unencrypted token file where no keyring exists | off |
Known limits
- Completion dates can be a day off. Graph records only the UTC date of a completion. The server restores your local date from the task's last-modified time, which is exact unless the task was changed after it was completed.
- Repeating tasks. Supported rules are every N days, weeks, months or years, with weekdays for weekly rules, and no end. Graph answers "success" to a direct change of a repeating task's due date or rule and may store another date, so such changes are sent as a clear followed by a write. Rules made by other apps that end, or that follow a pattern such as "the first Friday of every month", can be read, completed and deleted, but not rewritten or moved.
- A move is a copy and a delete. Graph cannot move a task. The copy is read back and compared with the original before the original is deleted. Not kept: the creation time, the times steps were checked, the repetition of a completed task, the time left on a reminder that is switched off, data other apps stored on the task, My Day, the position in the list, and whom the task is assigned to. Not moved: tasks with attachments, tasks of the flagged-emails list, and tasks whose copy comes out different, such as one with a formatted (HTML) note. A change another app makes to the original during the move is lost.
- Attachments are read-only. They are listed, not uploaded or downloaded.
- The completed view has a window. 7 days by default; widen it with
days. - Deleting is permanent.
- Handles are local. Another machine or data directory gives the same task another handle.
- HTTP mode has no sign-in of its own. See "Remote use".
- Tested on personal Microsoft accounts only.
Development
uv run pytest
uv run ruff check
The tests run against tests/fake_graph.py, a fake Graph written from what the real service was observed to do; they touch neither the network nor a real account. scripts/live_probe.py is what made those observations: it does use the signed-in real account, working only inside a temporary list it creates and deletes.
License
MIT
Metadata
Release files for mstodo-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mstodo_mcp-0.1.0.tar.gz | 60.5 kB | Without provenance | Details for mstodo_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mstodo_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for mstodo_mcp-0.1.0-py3-none-any.whl |
Total release size: 134.3 kB
Release files / mstodo_mcp-0.1.0.tar.gz
| Download URL | mstodo_mcp-0.1.0.tar.gz |
|---|---|
| Size | 60.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eac3044f2b4c82cacf56072f537caf36d6fe69a08f922f328ee7caa281b86931
|
|
BLAKE2b-256 checksum How to use checksums |
f1474208a41adee5b84bb9b322f6330126b22d81684486e2de0904a756166496
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / mstodo_mcp-0.1.0-py3-none-any.whl
| Download URL | mstodo_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 73.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b049b00793e0bd1a4d9f2d30ce3d4a653143d1cac1bb3fc296f668167fb7c861
|
|
BLAKE2b-256 checksum How to use checksums |
549db5596def5c7fb6618332bf374dffeb177ae6fdda5c309353fd293d63b062
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.12 {"installer":{"name":"uv","version":"0.13.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for mstodo-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.