Mariana Google MCP

Mariana Google MCP

Enables Claude to manage Gmail, Google Calendar, and Google Contacts through a safety-first interface with soft-delete protections and draft-only email capabilities. Supports multiple Google accounts with comprehensive mutation logging and mandatory manual confirmation for destructive actions.

Category
访问服务器

README

mariana-google-mcp

A custom MCP (Model Context Protocol) server that gives Claude Code access to Gmail, Google Calendar, and Google Contacts — with safety-first defaults.

Design Philosophy

This server is built for an operator who wants AI to help manage their Google workspace without risk of accidental damage:

  • No sending email. You can draft, but sending requires manual action in Gmail.
  • No deleting anything. Gmail uses a "To Be Deleted" label (soft-delete). Calendar prepends "DELETE - " to event titles. You review and confirm in the Google UI.
  • Every mutation is logged. An append-only JSONL action log records every write operation with timestamps, tool name, account, and summary.
  • Multi-account support. Manage personal and work accounts with named aliases.

Setup

1. Google Cloud Project

  1. Go to Google Cloud Console
  2. Create a new project (or use an existing one)
  3. Enable these APIs:
    • Gmail API
    • Google Calendar API
    • People API (for Contacts)
  4. Create OAuth 2.0 credentials:
    • Application type: Desktop app
    • Download the client ID and client secret

2. Install and Build

git clone https://github.com/marianasmall/mariana-google-mcp.git
cd mariana-google-mcp
npm install
npm run build

3. Add to Claude Code

Add this to your ~/.claude.json under mcpServers:

{
  "mcpServers": {
    "mariana-google-mcp": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/mariana-google-mcp/dist/index.js"],
      "env": {
        "GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",
        "GOOGLE_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Replace /path/to/ with the actual path to your clone, and fill in your OAuth credentials.

4. Authenticate

After restarting Claude Code, run the google_auth tool. It will open a browser window for OAuth consent. Once authorized, your token is stored locally and refreshed automatically.

Available Tools (19)

Authentication & Status

Tool Description
google_auth Authenticate a Google account via OAuth browser flow
google_status Check connection health for all configured accounts

Gmail (9 tools)

Tool Description
gmail_search Search messages using Gmail query syntax
gmail_read Read a specific message by ID (full content)
gmail_list_labels List all Gmail labels/folders
gmail_draft Create a draft email (does NOT send)
gmail_create_label Create a new label (supports nesting with /)
gmail_apply_label Apply a label to one or more messages
gmail_remove_label Remove a label from one or more messages
gmail_create_filter Create a filter rule (match criteria → actions)
gmail_move_to_delete Soft-delete: move messages to a "To Be Deleted" label

Calendar (6 tools)

Tool Description
calendar_list List upcoming calendar events
calendar_search Search events by keyword
calendar_get Get full details of a specific event
calendar_create Create an event (does NOT send invites by default)
calendar_update Modify an existing event (does NOT notify attendees by default)
calendar_flag_delete Soft-delete: prepend "DELETE - " to event title
calendar_availability Check free/busy status for a date range

Contacts (2 tools)

Tool Description
contacts_search Search contacts by name, email, or phone
contacts_list List contacts, optionally filtered by group

Multi-Account Support

You can authenticate multiple Google accounts with friendly names:

google_auth account_name: "primary"
google_auth account_name: "newsletters"
google_auth account_name: "work"

Most tools accept an optional account parameter. If omitted, they use the default account. Use google_status to see all configured accounts and their health.

Configuration Files

All configuration is stored in ~/.config/mariana-google-mcp/:

File Purpose
config.json Account registry (names, email hashes, defaults)
tokens/<hash>.json OAuth tokens per account (auto-refreshed)
actions.jsonl Append-only log of all mutations

Tokens are stored by email hash, not plaintext email, for a layer of indirection.

Action Log

Every write operation (drafts, calendar creates/updates, soft-deletes) is logged to ~/.config/mariana-google-mcp/actions.jsonl in this format:

{"timestamp":"2026-04-03T10:30:00.000Z","tool":"gmail_draft","account":"primary","summary":"Draft created: subject='Meeting follow-up'"}

The log is append-only and never modified by the server. Review it anytime to audit what Claude has done.

Fork and Use

To use this with your own Google account:

  1. Fork this repo
  2. Create your own Google Cloud project and OAuth credentials (see Setup above)
  3. Build and point your Claude Code config at your fork's dist/index.js
  4. Run google_auth to authenticate

No code changes needed — all account-specific data lives in config files and environment variables.

Tech Stack

  • TypeScript
  • @modelcontextprotocol/sdk — MCP protocol implementation
  • googleapis — Google API client
  • google-auth-library — OAuth2 token management
  • zod — Input validation

License

MIT

推荐服务器

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

官方
精选