Google Tasks MCP Server

Google Tasks MCP Server

A Model Context Protocol (MCP) server that brings your Google Tasks into Claude and other MCP-compatible clients, enabling task and task list management through natural conversation.

Category
访问服务器

README

Google Tasks MCP Server

A Model Context Protocol (MCP) server that brings your Google Tasks into Claude and other MCP-compatible clients. Manage your tasks, task lists, and to-dos through natural conversation.

🔒 Privacy First: This repository is public to demonstrate transparency. The code shows that no personal information is logged or stored maliciously. All sensitive data (tokens) is encrypted at rest and automatically redacted from logs. You can review the entire codebase to verify this commitment to privacy.

⚠️ Disclaimer: This server is provided as-is without any guarantees or warranties. While every effort has been made to ensure security and privacy, no guarantees are made about availability, data integrity, or security. Use at your own risk. For production use cases, consider self-hosting your own instance.

Table of Contents

What Can You Do With This?

This MCP server gives Claude access to your Google Tasks data, allowing you to:

  • Manage task lists: Create, read, update, and delete task lists
  • Manage tasks: Create, read, update, delete, and move tasks
  • Organize tasks: Create subtasks, set due dates, add notes
  • Mark completion: Mark tasks as complete or incomplete
  • Batch operations: Clear all completed tasks from a list
  • Query tasks: Filter tasks by completion status, due date, and more
  • Natural language: Interact with your tasks through conversation with Claude

All through natural conversation with Claude or any other MCP-compatible client.

For End Users: Using the Hosted Server

If you just want to use this MCP server with Claude Desktop without hosting anything yourself, follow these steps:

Prerequisites

  1. A Google Account with Google Tasks
  2. Claude Desktop or any other MCP-compatible client installed on your computer

Setup Instructions

Step 1: Add Connector in Claude Desktop

  1. Open Claude Desktop
  2. Go to Settings (gear icon in the bottom-left corner)
  3. Navigate to the Connectors tab
  4. Click Add Custom Connector
  5. Fill in the following details:
    • Name: Google Tasks (or any name you prefer)
    • Remote MCP server URL: https://your-deployed-domain.com/mcp
  6. Click Add

Step 2: Connect and Authorize

  1. In the Connectors settings, find the Google Tasks connector you just added
  2. Click Connect next to the connector
  3. Your web browser will open with the Google authorization page
  4. Log in to your Google account
  5. Review and approve the permissions requested
  6. You'll be redirected back and the connection will be complete

After authorization, Claude will have access to your Google Tasks!

Available Tools

Once connected, Claude can use these tools to access your data:

Task Lists Management

  • list_task_lists - Returns all the authenticated user's task lists
  • get_task_list - Returns a specific task list
  • insert_task_list - Creates a new task list
  • update_task_list - Updates a task list (full update)
  • patch_task_list - Updates a task list (partial update)
  • delete_task_list - Deletes a task list

Tasks Management

  • list_tasks - Returns all tasks in a task list
  • get_task - Returns a specific task
  • insert_task - Creates a new task
  • update_task - Updates a task (full update)
  • patch_task - Updates a task (partial update)
  • delete_task - Deletes a task
  • clear_completed_tasks - Clears all completed tasks from a list
  • move_task - Moves a task to a different position or parent

Example Conversations

Try asking Claude:

  • "What task lists do I have?"
  • "Show me all tasks in my Work list"
  • "Create a new task list called 'Personal Projects'"
  • "Add a task 'Review Q4 reports' to my Work list with due date next Friday"
  • "Mark the task 'Buy groceries' as completed"
  • "Move 'Write proposal' task to be a subtask of 'Client project'"
  • "Clear all completed tasks from my Shopping list"
  • "What tasks are due this week?"

Privacy & Security

  • Encrypted tokens: All authentication tokens are encrypted using AES-256-GCM before storage
  • No logging of personal data: The code is public - you can verify that no sensitive information is logged
  • Automatic redaction: All user IDs, tokens, and credentials are automatically redacted from system logs
  • OAuth 2.0: Industry-standard secure authentication with Google
  • You're in control: Revoke access anytime from your Google account settings

For Developers: Self-Hosting

Want to run your own instance? Here's how to deploy this MCP server yourself.

Prerequisites

  1. Node.js 18+ and npm installed
  2. Deno CLI installed for deployment
  3. A Google Cloud Platform account

Step 1: Create Google Cloud Project

  1. Go to Google Cloud Console
  2. Create a new project or select an existing one
  3. Enable the Google Tasks API:
    • Go to APIs & ServicesLibrary
    • Search for "Google Tasks API"
    • Click Enable
  4. Create OAuth 2.0 credentials:
    • Go to APIs & ServicesCredentials
    • Click Create CredentialsOAuth client ID
    • Choose Web application
    • Add authorized redirect URIs: https://your-domain.com/callback
    • Note your Client ID and Client Secret
  5. Configure OAuth consent screen:
    • Go to APIs & ServicesOAuth consent screen
    • Add required scopes: https://www.googleapis.com/auth/tasks

Step 2: Clone and Setup

# Clone the repository
git clone https://github.com/akutishevsky/google-tasks-mcp.git
cd google-tasks-mcp

# Install dependencies
npm install

# Generate encryption secret
npm run generate-secret
# Copy the output - you'll need it for environment variables

Step 3: Local Development

Note: Google requires a publicly accessible URL for OAuth callbacks. For local development, use a tunneling service (like ngrok) to expose your local server or deploy to a staging environment for testing.

# Copy environment template
cp .env.example .env

# Edit .env with your values
# GOOGLE_CLIENT_ID=your_client_id
# GOOGLE_CLIENT_SECRET=your_client_secret
# GOOGLE_REDIRECT_URI=https://your-tunnel-url.com/callback
# ENCRYPTION_SECRET=paste_generated_secret_here
# PORT=3000

# Build the project
npm run build

# Run with Deno
deno task dev

Make sure your redirect URI in the .env file matches the publicly accessible URL pointing to your local server.

Step 4: Deploy to Production

Deploy to Deno Deploy

  1. Install Deno Deploy CLI:
deno install -A --unstable https://deno.land/x/deploy/deployctl.ts
  1. Deploy the project:
# Build first
npm run build

# Deploy to Deno Deploy
deployctl deploy --project=google-tasks-mcp build/index.js
  1. Set environment variables in Deno Deploy dashboard:
    • Go to your project settings
    • Add all required environment variables
    • Restart the deployment

Step 5: Update Google OAuth Settings

Go back to your Google Cloud Console OAuth client and update the redirect URI to match your deployed URL: https://your-domain.com/callback

Step 6: Configure Your MCP Client

For Claude Desktop:

  1. Open Claude Desktop
  2. Go to SettingsConnectors tab
  3. Click Add Custom Connector
  4. Fill in the following details:
    • Name: Google Tasks (or any name you prefer)
    • Remote MCP server URL: https://your-domain.com/mcp
  5. Click Add
  6. Click Connect next to the connector to authorize

For Other MCP Clients:

Configure your MCP client with the following connection details:

  • Server URL: https://your-domain.com
  • Transport: Server-Sent Events (SSE)
  • Endpoint: /mcp
  • Authentication: OAuth 2.0
  • Discovery URL: /.well-known/oauth-authorization-server

Environment Variables Reference

Variable Required Description
GOOGLE_CLIENT_ID Yes Your Google OAuth client ID
GOOGLE_CLIENT_SECRET Yes Your Google OAuth client secret
GOOGLE_REDIRECT_URI Yes OAuth callback URL (must match Google Cloud Console settings)
ENCRYPTION_SECRET Yes 32+ character secret for token encryption (generate with npm run generate-secret)
PORT No Server port (default: 3000)
LOG_LEVEL No Logging level: trace, debug, info, warn, error (default: info)
ALLOWED_ORIGINS No Comma-separated list of allowed CORS origins for browser clients

Development Commands

npm run build            # Compile TypeScript to JavaScript
npm run dev              # Watch mode - recompile on changes
npm run generate-secret  # Generate encryption secret for ENCRYPTION_SECRET env variable

Project Structure

src/
├── auth/              # OAuth 2.0 authentication & token storage
├── server/            # Hono app, MCP endpoints, middleware
├── tools/             # MCP tools for Google Tasks API (tasklists, tasks)
├── transport/         # Custom SSE transport for MCP
├── google/            # Google Tasks API client
├── utils/             # Logger and encryption utilities
└── index.ts           # Main entry point

Security Features

Token Encryption

All Google access and refresh tokens are encrypted at rest using AES-256-GCM:

  • Algorithm: AES-256-GCM (authenticated encryption)
  • Key Derivation: PBKDF2 with 100,000 iterations
  • Defense in Depth: Even if the database is compromised, tokens remain protected

Important: Keep your ENCRYPTION_SECRET:

  • At least 32 characters long
  • Randomly generated (use npm run generate-secret)
  • Secure and never committed to version control
  • Consistent across server restarts

Privacy-Safe Logging

The custom logger automatically redacts all sensitive information:

  • ✅ Operational events and errors logged
  • ❌ No tokens, credentials, or auth codes
  • ❌ No user IDs or personal information
  • ❌ No API request/response payloads with sensitive data

You can review the logging implementation in src/utils/logger.ts.

Contributing

This is a personal project, but contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

Acknowledgments

Built with:

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选