Skip to main content

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.

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.

Metadata

Release files for mcp-google-tasks 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-google-tasks 0.2.0
File Size Uploaded Provenance Actions
mcp_google_tasks-0.2.0.tar.gz 203.8 kB With provenance Details for mcp_google_tasks-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-google-tasks 0.2.0
File Interpreter ABI Platform Actions
mcp_google_tasks-0.2.0-py3-none-any.whl Python 3 none any Details for mcp_google_tasks-0.2.0-py3-none-any.whl

Total release size: 242.2 kB

Release files / mcp_google_tasks-0.2.0.tar.gz

Download URL mcp_google_tasks-0.2.0.tar.gz
Size 203.8 kB
Tags Source
SHA-256 checksum
How to use checksums
14b108739c3d4318f7e5fb8648524bac4970bdd4b59104ebaeed85b15afa590e
BLAKE2b-256 checksum
How to use checksums
df10a688242f8fd31e10a3324a0c6b96036150cf57e16b8794f6d0846e8bbfb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / mcp_google_tasks-0.2.0-py3-none-any.whl

Download URL mcp_google_tasks-0.2.0-py3-none-any.whl
Size 38.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1cbb9c779e1a6ed4e82c38aa6fa76ca119ae56999dca33019dac158043015c3
BLAKE2b-256 checksum
How to use checksums
8764e20d425125f92879b8cb0ce289dd8744be072627ed12f8639313ecf4a542
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Security for mcp-google-tasks 0.2.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mcp_google_tasks-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page