Skip to main content
Glama
mcp-google-tasks
by dcode

mcp-google-tasks

CI Coverage Container PyPI Python License

Google Tasks MCP server for Obot: multi-user OAuth or single-user tokens.

An MCP server that exposes the whole Google Tasks REST API v1 (task lists and tasks: list, get, create, replace, patch, delete, move, clear completed) as 15 tools and 2 resources. It runs locally over stdio for one person, or as a container over streamable HTTP for one person or for many, and it was built to be hosted by Obot but should work for other self-hosted MCP environments.

What it does

  • Full API surface. Task-list CRUD, task CRUD, move and reparent across lists, and clearing completed tasks. Every tool returns structured output with a schema. See docs/tools.md.

  • Three ways to authenticate, chosen independently of the transport (table below).

  • Read-only mode. GOOGLE_TASKS_READONLY=true requests the tasks.readonly scope and does not register the write tools at all, so a model never sees them.

  • Safe to host. Non-root container, GET /health for probes, Fernet-encrypted token storage on a volume or in Redis, audience-checked bearer tokens in gateway mode, logs on stderr with secrets redacted.

Related MCP server: google-tasks-mcp

Authentication modes

Set the mode with MCP_AUTH_MODE (or --auth-mode). The default is token over stdio and oauth-proxy over HTTP.

Mode

Users

Who runs the Google OAuth flow

Transport

Use it when

token

One

You, once, ahead of time

stdio or HTTP

Local use, or an Obot single-user catalog entry

resource-server

Many

A gateway (Obot) in front of this server

HTTP

Multi-user on Obot (Remote runtime with Static OAuth)

oauth-proxy

Many

This server, as an OAuth proxy for MCP clients

HTTP

Multi-user without a gateway, for MCP clients that do OAuth themselves

docs/authentication.md covers the Google Cloud setup every mode needs and how to get a refresh token for token mode.

Quickstart

All three start from a Google Cloud project with the Tasks API enabled and an OAuth client: follow docs/authentication.md first.

Local, single user, over stdio

Get a refresh token (see docs/authentication.md), then register the server with your MCP client. With Claude Code:

claude mcp add google-tasks \
  -e GOOGLE_OAUTH_CLIENT_ID=<client-id> \
  -e GOOGLE_OAUTH_CLIENT_SECRET=<client-secret> \
  -e GOOGLE_OAUTH_REFRESH_TOKEN=<refresh-token> \
  -- uvx mcp-google-tasks --transport stdio

Or any client that reads the common mcpServers JSON shape, running from a clone with uv run:

{
  "mcpServers": {
    "google-tasks": {
      "command": "uv",
      "args": [
        "run", "--directory", "/path/to/mcp-google-tasks",
        "mcp-google-tasks", "--transport", "stdio"
      ],
      "env": {
        "GOOGLE_OAUTH_CLIENT_ID": "<client-id>",
        "GOOGLE_OAUTH_CLIENT_SECRET": "<client-secret>",
        "GOOGLE_OAUTH_REFRESH_TOKEN": "<refresh-token>"
      }
    }
  }
}

Over stdio the auth mode defaults to token, so nothing else is needed.

Docker, single user, over HTTP

Copy .env.example to .env, uncomment and fill in the token section, and set MCP_AUTH_TOKEN to a long random string so only your client can call the server. Replace <version> with a released version:

docker run --rm -p 8000:8000 --env-file .env -e MCP_AUTH_MODE=token \
  ghcr.io/dcode/mcp-google-tasks:<version>

The MCP endpoint is http://localhost:8000/mcp and the health check is http://localhost:8000/health. Point a client at it with the bearer token:

claude mcp add --transport http google-tasks http://localhost:8000/mcp \
  --header "Authorization: Bearer <mcp-auth-token>"

Multi-user

On Obot, run the image in resource-server mode at a public HTTPS address and add it as a Remote catalog entry with Static OAuth; Obot runs the Google sign-in for each user. docs/deployment-obot.md has the full procedure, including why the Containerized runtime cannot do this yet.

docker run -d -p 8000:8000 \
  -e MCP_AUTH_MODE=resource-server \
  -e MCP_BASE_URL=https://tasks.example.com \
  -e GOOGLE_OAUTH_CLIENT_ID=<client-id> \
  ghcr.io/dcode/mcp-google-tasks:<version>

For Kubernetes, contrib/kubernetes/ has example Kustomize manifests for this mode and for oauth-proxy.

Without a gateway, use oauth-proxy mode: the server itself sends each user through Google sign-in and issues its own tokens to MCP clients. Give it a stable signing key and persistent, encrypted storage so sign-ins survive restarts:

docker run -d -p 8000:8000 -v google-tasks-data:/data \
  -e MCP_AUTH_MODE=oauth-proxy \
  -e MCP_BASE_URL=https://tasks.example.com \
  -e GOOGLE_OAUTH_CLIENT_ID=<client-id> \
  -e GOOGLE_OAUTH_CLIENT_SECRET=<client-secret> \
  -e JWT_SIGNING_KEY=<random-string> \
  -e TOKEN_STORAGE_BACKEND=filetree \
  -e STORAGE_ENCRYPTION_KEY=<fernet-key> \
  ghcr.io/dcode/mcp-google-tasks:<version>

Documentation

Document

For

Covers

docs/authentication.md

Operators

Google Cloud setup, scopes, refresh tokens, key generation and rotation

docs/configuration.md

Operators

Every environment variable and CLI flag, per mode, and the startup errors

docs/deployment-obot.md

Obot admins, self-hosters

Single-user and multi-user Obot setups, storage, hardening

contrib/kubernetes/

Kubernetes operators

Example Kustomize manifests for resource-server and oauth-proxy

docs/tools.md

MCP users

Every tool and resource, its parameters, and read-only visibility

docs/development.md

Contributors

Layout, seams, tests, release, local container builds

Design and roadmap

docs/DESIGN.md records the design: the problem, the decisions made and the reasons for them. docs/ROADMAP.md tracks what is done, what still needs checking, and what comes next. Development specifications live in docs/specs/.

Development

Install the git hooks once after cloning:

uv run pre-commit install

The hooks lint and format Python (ruff), Markdown (rumdl) and TOML (taplo), and type-check with ty. To run everything by hand:

uv run pre-commit run --all-files
uv run pytest

docs/development.md explains the code layout and the test strategy.

Continuous integration

GitHub Actions runs on every pull request and on every push to main:

Job

What it does

Lint, format and type-check

All pre-commit hooks: ruff, rumdl, taplo and ty

Test

The test suite with the coverage threshold, on Python 3.12 to 3.15 on Linux and 3.15 on macOS; on pull requests, one comment with test results and coverage

Build

Builds the sdist and wheel, installs the wheel into a clean environment, and uploads both as an artifact

Container

Builds the Docker image (not pushed), runs it in token mode and waits for GET /health to return 200

A separate container workflow publishes multi-arch images to ghcr.io/dcode/mcp-google-tasks: edge and sha-<short> on every push to main, and <version>, <major>.<minor> and latest on a v* tag.

Dependabot opens weekly pull requests for GitHub Actions, Python dependencies and the Docker base images.

Releasing

  1. Bump the version: hatch version minor (or patch, major), set the same version as the image tag in catalog/google-tasks.yaml and contrib/kubernetes/base/kustomization.yaml (a test fails until they match), then commit.

  2. Tag that commit with the same version, prefixed with v, and push the tag:

    git tag v0.2.0 && git push origin v0.2.0

The release workflow checks that the tag matches __version__, runs the full CI suite, publishes the sdist and wheel to PyPI through trusted publishing, and then publishes a GitHub release with them attached and generated release notes. The container image is published to ghcr.io/dcode/mcp-google-tasks; see docs/development.md.

With hatch

The same checks are available as hatch commands, which manage their own environments:

Command

What it runs

hatch test

The test suite with branch coverage and the 100% threshold

hatch test -k name --no-cov

A subset of tests, without the coverage threshold

hatch fmt

ruff lint (with fixes) and format, using this project's settings

hatch fmt --check

The same, reporting only

hatch run types

ty type check

hatch run hooks

Every pre-commit hook on all files

hatch run check

Hooks, then tests

hatch build

Build the sdist and wheel into dist/

Tool settings live in pyproject.toml, except taplo's, which it only reads from .taplo.toml.

License

Apache License 2.0.

Available Tools

15 tools
clear_completed_tasksClear Completed TasksA
Destructive

Clear all completed tasks from a task list (tasks.clear).

Affected tasks are marked as hidden and will no longer appear in default task listings.

Inputs: tasklist_id. Returns: Standard confirmation payload for void API operations (delete/clear).

create_taskCreate TaskA

Create a new task in a Google Task list (tasks.insert).

Returns the created task with its ID. Timestamps must be RFC 3339 with a timezone; a malformed one is rejected before any call.

Inputs: title (required), due, notes, parent, +4 more. Returns: Google Tasks API v1 Task resource.

create_tasklistCreate TasklistA

Create a new Google Task list (tasklists.insert).

Returns the new list, including the ID to use with the task tools.

Inputs: title (required). Returns: Google Tasks API v1 TaskList resource.

delete_taskDelete TaskA
Destructive

Delete a task from a Google Task list (tasks.delete).

Confirm with the user before calling. To finish a task instead, use patch_task with status='completed'.

Inputs: task_id (required), tasklist_id. Returns: Standard confirmation payload for void API operations (delete/clear).

delete_tasklistDelete TasklistA
Destructive

Delete a Google Task list and all of its tasks (tasklists.delete).

This cannot be undone. Confirm with the user before calling.

Inputs: tasklist_id (required). Returns: Standard confirmation payload for void API operations (delete/clear).

get_current_userGet Current UserA
Read-only

Return profile claims and granted scopes for the authenticated user.

Call this to confirm which Google account the tools act on, or to diagnose a permission error (check that a Tasks scope is granted). In single-user token mode the profile comes from Google's userinfo endpoint and the scope list is empty. Fails if no Google credential is available; the user must sign in again or fix the server's token configuration.

Inputs: no named parameters. Returns: Authenticated Google user information extracted from OAuth claims.

get_taskGet TaskA
Read-only

Retrieve a single task by ID (tasks.get).

Fails with a 404 API error if the task is not in that list; use list_tasks to find valid IDs.

Inputs: task_id (required), tasklist_id. Returns: Google Tasks API v1 Task resource.

get_tasklistGet TasklistA
Read-only

Retrieve a single Google Task list by ID (tasklists.get).

Fails with a 404 API error if the ID does not exist; use list_tasklists to find valid IDs.

Inputs: tasklist_id. Returns: Google Tasks API v1 TaskList resource.

list_tasklistsList TasklistsA
Read-only

List all of the authenticated user's Google Task lists (tasklists.list).

Call this first to discover task list IDs. Returns one page; when next_page_token is set, call again with it as page_token.

Inputs: page_token, max_results. Returns: Paginated response from ``tasklists.list``.

list_tasksList TasksA
Read-only

List tasks in a Google Task list with full filtering (tasks.list).

Returns one page; when next_page_token is set, call again with it as page_token. Timestamps must be RFC 3339 with a timezone (e.g. '2026-11-22T00:00:00Z'); a malformed one is rejected before any call.

Inputs: due_max, due_min, page_token, max_results, +8 more. Returns: Paginated response from ``tasks.list``.

move_taskMove TaskB

Move or reparent a task within or across task lists (tasks.move).

Returns the task at its new position.

Inputs: task_id (required), parent, previous, tasklist_id, +1 more. Returns: Google Tasks API v1 Task resource.

patch_taskPatch TaskA
Idempotent

Partially update a task via PATCH (tasks.patch).

Only provided fields are modified. Setting status='needsAction' automatically clears the completed timestamp unless explicitly set. Use this to mark a task done (status='completed'). Fails if no field is given.

Inputs: task_id (required), due, notes, title, +5 more. Returns: Google Tasks API v1 Task resource.

patch_tasklistPatch TasklistA
Idempotent

Partially update a Google Task list via PATCH (tasklists.patch).

Returns the updated list.

Inputs: title (required), tasklist_id (required). Returns: Google Tasks API v1 TaskList resource.

update_taskUpdate TaskA
Idempotent

Replace a task's fields via PUT (tasks.update).

Any omitted optional fields may be cleared by Google Tasks. For partial updates, prefer patch_task.

Inputs: title (required), task_id (required), due, notes, +5 more. Returns: Google Tasks API v1 Task resource.

update_tasklistUpdate TasklistA
Idempotent

Replace a Google Task list's metadata via PUT (tasklists.update).

Returns the updated list. To change only the title, patch_tasklist is equivalent.

Inputs: title (required), tasklist_id (required). Returns: Google Tasks API v1 TaskList resource.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 15 tools

    Disambiguation4/5

    Tools are cleanly split by resource (tasklists vs tasks) and action, and descriptions explicitly steer between near-duplicates like update_task vs patch_task ('for partial updates, prefer patch_task'). The PUT/PATCH pairs are the only real overlap, and the guidance mitigates but does not fully eliminate the risk of an agent picking update_* when it meant patch_*.

    Naming Consistency5/5

    Every tool follows a strict verb_noun snake_case pattern (list_tasks, create_tasklist, patch_tasklist, delete_task, move_task), with Google API method names noted for traceability. get_current_user fits the same convention despite targeting a different resource.

    Tool Count5/5

    15 tools map almost one-to-one onto the Google Tasks API surface for two resources plus a diagnostics tool, with no filler. The only mildly redundant pair (update/patch) is arguably justified by mirroring the upstream API.

    Completeness4/5

    Full CRUD lifecycles for both task lists and tasks, plus move, clear-completed, and account/scope diagnostics, cover the domain well. Minor gaps remain: no way to list or restore hidden/cleared tasks and no batch operations, though these are edge cases agents can work around.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers