This is a collection of Google-native tools (e.g., Gmail, Calendar) for the MCP protocol, designed to integrate seamlessly with AI clients like Claude or Cursor. Click below for one-click install with .mcpb: JSON configs - Complete Email Attachment Support: - ✉️ Send emails with attachments from local files or Google Drive - 📥 Download all email attachments to local storage - 🔄 Dual attachment s
Add this skill
npx mdskills install vakharwalad23/google-mcpComprehensive Google services integration with excellent OAuth management and extensive tool coverage
1# Google MCP Tools23[](https://smithery.ai/server/@vakharwalad23/google-mcp)45This is a collection of Google-native tools (e.g., Gmail, Calendar) for the [MCP protocol](https://modelcontextprotocol.com/docs/mcp-protocol), designed to integrate seamlessly with AI clients like Claude or Cursor.67<a href="https://glama.ai/mcp/servers/@vakharwalad23/google-mcp">8 <img width="380" height="200" src="https://glama.ai/mcp/servers/@vakharwalad23/google-mcp/badge" alt="Google MCP server" />9</a>1011## Quick Install1213Click below for one-click install with `.mcpb`:1415<a href="https://github.com/vakharwalad23/google-mcp/releases/download/v1.1.0/google-mcp.mcpb">16 <img width="280" alt="Install with Claude MCPB" src="https://github.com/user-attachments/assets/dfcf4fe2-d94d-4b6b-86e4-2794fea74fff" />17</a>1819<details>20<summary>JSON configs</summary>2122```json23{24 "mcpServers": {25 "google-mcp": {26 "command": "bunx",27 "args": ["--no-cache", "google-mcp@latest"],28 "env": {29 // Either can be used, but not both30 // Use OAuth31 "GOOGLE_OAUTH_CLIENT_ID": "<YOUR_CLIENT_ID>",32 "GOOGLE_OAUTH_CLIENT_SECRET": "<YOUR_CLIENT_SECRET>",33 "GOOGLE_OAUTH_TOKEN_PATH": "<PATH_TO_STORE_TOKENS> CAN_BE_ANYWHERE_ON_YOUR_SYSTEM",34 // Use Service Account35 "GOOGLE_CLIENT_EMAIL": "<YOUR_SERVICE_ACCOUNT_EMAIL>",36 "GOOGLE_PRIVATE_KEY": "<YOUR_SERVICE_ACCOUNT_PRIVATE_KEY>",37 "GMAIL_USER_TO_IMPERSONATE": "<USER_TO_IMPERSONATE>"38 }39 }40 }41}42```4344</details>4546## What's New in v1.1.04748### 🆕 Major Features4950- **Complete Email Attachment Support**:51 - ✉️ **Send emails with attachments** from local files or Google Drive52 - 📥 **Download all email attachments** to local storage53 - 🔄 **Dual attachment sources**: Local file paths or Google Drive file IDs54 - 📁 **Smart file handling**: Automatic MIME type detection and filename sanitization5556### 🔧 Enhanced Email Capabilities5758- **Multi-source attachments**: Attach files from local storage or Google Drive in the same email59- **Custom filenames**: Override original filenames for attachments60- **File size validation**: Automatic 25MB Gmail limit enforcement61- **Cross-platform downloads**: Auto-detection of Downloads folder on Windows, macOS, and Linux62- **Conflict resolution**: Automatic file renaming to prevent overwrites6364### 📁 New & Enhanced Tools6566- `google_gmail_send_email`: Now supports attachments from local files and Google Drive67- `google_gmail_draft_email`: Create drafts with attachments68- `google_gmail_download_attachments`: Download all email attachments with customizable path6970## Features7172- **OAuth Management**:7374 - Refresh expired access tokens automatically75 - Update tokens in the token file without re-authentication76 - Complete re-authentication with automated token cleanup77 - Maintain session continuity across long-running operations7879- **Gmail**:8081 - Send emails with multiple recipients (to, cc, bcc) and **attachments from local files or Google Drive**.82 - **Download all email attachments** to local storage with cross-platform support.83 - List emails with custom queries, labels, and result limits.84 - Read specific emails by ID with attachment information.85 - Manage labels (add, remove, list).86 - Draft and delete emails.8788- **Calendar**:8990 - List calendars and set a default calendar.91 - Create events with details (summary, start/end time, attendees, etc.).92 - List upcoming events with customizable filters.93 - Update or delete existing events.94 - Find free time slots for scheduling.9596- **Drive**:9798 - Filter with search queries99 - Sort by modification date or other criteria100 - Customize display count101 - View detailed file metadata102 - Read file content (text, docs, spreadsheets)103 - Create new files with specified content104 - Update existing files105 - Delete files (trash or permanent)106 - Share files with specific permissions107108- **Tasks**:109110 - View all task lists111 - Create new task lists112 - Delete existing task lists113 - Set default task list114 - List tasks with filters115 - View task details116 - Create tasks with title, notes, and due dates117 - Update task properties118 - Mark tasks as complete119 - Delete tasks120121- **TODO Plans**:122 - Google Contacts: Search and manage contacts.123 - And Many More...124125You can chain commands for workflows, e.g.:126127"List my unread emails, draft a reply to the latest one, and schedule a follow-up meeting tomorrow at 2 PM."128129## OAuth Token Management130131The server includes built-in OAuth token management to handle expired access tokens gracefully:132133- **Automatic Token Refresh**: When access tokens expire, you can refresh them without going through the full OAuth flow again134- **Complete Re-authentication**: Automatically handle cases where refresh tokens are invalid or expired135- **Persistent Storage**: Refreshed tokens are automatically saved to your configured token file path136- **Session Continuity**: All Google services are re-initialized with fresh tokens after refresh137138### Refreshing Tokens139140If you encounter authentication errors or want to proactively refresh your tokens, simply ask:141142```143Refresh my Google OAuth tokens144```145146This will:1471481. Use your stored refresh token to get new access tokens1492. Update the token file with the new credentials1503. Re-initialize all Google services with fresh authentication1514. Show you the new token expiration time152153### Complete Re-authentication154155If you get `invalid_grant` errors or your refresh token has expired, you can start fresh:156157```158Re-authenticate my Google account159```160161This automated process will:1621631. **Delete existing tokens** from your token file1642. **Start OAuth server** to handle the callback1653. **Open browser** for fresh authentication1664. **Save new tokens** automatically1675. **Re-initialize services** with fresh credentials168169You'll only need to click "Allow" in the browser - everything else is automated!170171**Note**: If you don't have a valid refresh token, you'll need to go through the initial OAuth authentication flow again.172173### Manual Installation1741751. Prerequisites:176177 - Install Bun:178179 ```bash180 brew install oven-sh/bun/bun # macOS/Linux with Homebrew181 ```1821832. Set Up OAuth:184185 - Create a Google Cloud project in the [Google Cloud Console](https://console.cloud.google.com/).186 - Set up OAuth 2.0 credentials (Client ID, Client Secret).187 - Choose the type Desktop app.188 - If using test mode, add your email to the test users list.189 - Make sure to enable API access for desired services (Gmail, Calendar, Drive etc.).1901913. Configure Your Client: Edit your claude_desktop_config.json (or equivalent config file for your client):192193```json194{195 "mcpServers": {196 "google-mcp": {197 "command": "bunx",198 "args": ["--no-cache", "google-mcp@latest"],199 "env": {200 // Either can be used, but not both201 // Use OAuth202 "GOOGLE_OAUTH_CLIENT_ID": "<YOUR_CLIENT_ID>",203 "GOOGLE_OAUTH_CLIENT_SECRET": "<YOUR_CLIENT_SECRET>",204 "GOOGLE_OAUTH_TOKEN_PATH": "<PATH_TO_STORE_TOKENS>",205 // Use Service Account206 "GOOGLE_CLIENT_EMAIL": "<YOUR_SERVICE_ACCOUNT_EMAIL>",207 "GOOGLE_PRIVATE_KEY": "<YOUR_SERVICE_ACCOUNT_PRIVATE_KEY>",208 "GMAIL_USER_TO_IMPERSONATE": "<USER_TO_IMPERSONATE>"209 }210 }211 }212}213```2142154. Authenticate:216 - The first time you run the server, it will open a browser for OAuth authentication. Follow the prompts to grant access, and tokens will be saved to GOOGLE_OAUTH_TOKEN_PATH.217218## Usage219220Now, ask Claude to use the `google-mcp` tool.221222```223Send an email to jane.doe@example.com with the subject "Meeting Notes" and body "Here are the notes from today."224```225226```227List my upcoming calendar events for the next 3 days.228```229230```231Create a calendar event titled "Team Sync" tomorrow at 10 AM for 1 hour.232```233234```235Refresh my Google OAuth tokens236```237238```239Re-authenticate my Google account240```241242## Transport Support243244This MCP server supports both stdio and HTTP transports via environment variables:245246### Stdio Transport (Default)247248```bash249# Default mode - uses stdio transport250bun run dev251# Or explicitly252MCP_TRANSPORT=stdio bun run index.ts253```254255### HTTP Transport (Streamable HTTP)256257```bash258# HTTP mode with Streamable HTTP support259MCP_TRANSPORT=http bun run index.ts260# Or with custom port261MCP_TRANSPORT=http PORT=3000 bun run index.ts262```263264When running in HTTP mode, the server provides these endpoints:265266- `GET /health` - Health check endpoint with session count267- `GET /mcp` - Session info and server status268- `POST /mcp` - Main MCP JSON-RPC endpoint for sending requests269- `DELETE /mcp` - End session endpoint270271### Session Management272273The Streamable HTTP transport uses the official MCP SDK with automatic session management:2742751. **Automatic Sessions**: The server automatically generates secure session IDs2762. **SSE Streaming**: Supports Server-Sent Events for real-time communication2773. **JSON Responses**: Falls back to JSON responses when SSE is not available2784. **DNS Protection**: Built-in security features for production deployment279280### Configuration for HTTP Transport281282For HTTP transport, configure your client with the server URL:283284```json285{286 "mcpServers": {287 "google-mcp-http": {288 "url": "http://localhost:3000/mcp"289 }290 }291}292```293294## Local Development295296```bash297git clone https://github.com/vakharwalad23/google-mcp.git298cd google-mcp299bun install300301# Run in stdio mode (default)302bun run dev:stdio303304# Run in HTTP mode305bun run dev:http306```307308Thank you for using Google MCP Tools! If you have any questions or suggestions, feel free to open an issue or contribute to the project.309310Play around with the tools and enjoy!!311
Full transparency — inspect the skill content before installing.