A Model Context Protocol (MCP) server for Google Tasks, written in Python and running with FastMCP.
- Manage Task Lists
- Create, Update, Delete Tasks
- Filter tasks (Due today, Overdue)
- Dockerized deployment
- Google Cloud Project: Enable "Tasks API".
- Credentials:
- Option A (Environment Variables): Set
GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET, andGOOGLE_REFRESH_TOKEN. - Option B (File-based): Place
credentials.json(OAuth Client Secrets) in the root. The server will launch an interactive flow to generatetoken.jsonon first run.
- Option A (Environment Variables): Set
-
Install dependencies:
pip install -r pyproject.toml # OR using uv uv run python -m src.server -
Run the server:
python -m src.server
Server will listen on port 3333.
-
Build:
docker build -t GoogleTasksMCP . -
Run (Env Vars):
docker run -p 3333:3333 \ -e GOOGLE_CLIENT_ID=... \ -e GOOGLE_CLIENT_SECRET=... \ -e GOOGLE_REFRESH_TOKEN=... \ GoogleTasksMCP
-
Run (Binder Mount for Token):
touch token.json # Ensure it exists or mount folder docker run -p 3333:3333 \ -v $(pwd)/credentials.json:/app/credentials.json \ -v $(pwd)/token.json:/app/token.json \ GoogleTasksMCP
If the server runs behind a reverse proxy (e.g. at textdonna.com/tasks/), add these rules so OAuth discovery endpoints are reachable:
location /.well-known/oauth-protected-resource/tasks/ {
proxy_pass http://127.0.0.1:3333/.well-known/oauth-protected-resource/tasks/;
}
location /.well-known/oauth-authorization-server/tasks {
proxy_pass http://127.0.0.1:3333/.well-known/oauth-authorization-server/tasks;
}list_task_listscreate_taskget_current_tasksupdate_taskdelete_tasksearch_tasks