Google MCP Remote

Google MCP Remote

Enables AI clients to interact with Google services (Gmail, Calendar, Drive, Tasks, YouTube, Contacts) via OAuth-authenticated Cloudflare Workers, allowing actions like sending emails, managing events, and searching files.

Category
访问服务器

README

MseeP.ai Security Assessment Badge

Google MCP Remote

Verified on MseeP </br> A Cloudflare Workers-based MCP server implementation that provides Google API tools (Gmail, Calendar, Drive, etc.) for the Model Context Protocol, designed to integrate seamlessly with AI clients like Claude or Cursor.

⚠️ SECURITY WARNING: Do not use someone else's deployed instance of this server as it requires access to your Google account and personal data. Always deploy your own instance to maintain control over your data and API access.

Features

  • Gmail:
    • Send emails with multiple recipients (to, cc, bcc) and HTML content
    • List emails with custom queries, labels, and result limits
    • Read specific emails by ID
    • Manage labels (add, remove, list)
    • Draft and delete emails
  • Calendar:
    • List calendars and set a default calendar
    • Create events with details (summary, start/end time, attendees, etc.)
    • List upcoming events with customizable filters
    • Update or delete existing events
    • Find free time slots for scheduling
  • Drive:
    • Filter files with search queries
    • Sort by modification date or other criteria
    • View detailed file metadata
    • Read file content (text, docs, spreadsheets)
    • Create new files with specified content
    • Update existing files
    • Delete files (trash or permanent)
    • Share files with specific permissions
  • Tasks:
    • View all task lists
    • Create new task lists
    • Delete existing task lists
    • List tasks with filters
    • View task details
    • Create tasks with title, notes, and due dates
    • Update task properties
    • Mark tasks as complete
    • Delete tasks
  • YouTube:
    • Search for videos with customizable parameters
    • Get detailed information about specific videos
  • Contacts:
    • List and search contacts from Google Contacts
    • Get detailed information about specific contacts

Deployment Instructions

Prerequisites

  1. Google Cloud Project:

    • Create a project in the Google Cloud Console

    • Set up OAuth 2.0 credentials (Client ID and Client Secret)

    • Enable the APIs you need (Gmail, Calendar, Drive, Tasks, YouTube, People/Contacts)

    • Add authorized JavaScript origins and redirect URIs for your Cloudflare Worker

    • Redirect URI should be in the format:

      Deployed URL + /callback
       https://your-project.your-username.workers.dev/callback
      
      For local testing:
       http://localhost:8788/callback
      
  2. Cloudflare Account:

    • Sign up for a Cloudflare account if you don't have one
    • Install Wrangler CLI: bun install -g wrangler
    • Authenticate with Cloudflare: wrangler login

Deployment Steps

  1. Clone the repository:

    git clone https://github.com/vakharwalad23/google-mcp-remote.git
    cd google-mcp-remote
    
  2. Install dependencies:

    bun install
    
  3. Configure secrets: Set your Google OAuth credentials as secrets in Cloudflare:

    wrangler secret put GOOGLE_OAUTH_CLIENT_ID
    wrangler secret put GOOGLE_OAUTH_CLIENT_SECRET
    wrangler secret put COOKIE_ENCRYPTION_KEY
    

    (For the COOKIE_ENCRYPTION_KEY, generate a random string to secure cookies)

  4. Create a KV namespace:

    wrangler kv:namespace create OAUTH_KV
    

    Then update your wrangler.jsonc with the ID from the output

  5. Deploy to Cloudflare Workers:

    bun run deploy
    
  6. Note your deployment URL: After deployment, Wrangler will provide a URL like: https://your-project.your-username.workers.dev

Usage with AI Clients

Once deployed, configure your AI client (Claude, Cursor, etc.) to use your MCP server.

Claude Configuration

Edit your claude_desktop_config.json or for cursor mcp.json:

{
  "mcpServers": {
    "google-mcp-remote": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://your-project.your-username.workers.dev/sse"
      ]
    }
  }
}

Example Commands

You can now ask Claude to perform tasks using your Google account:

Send an email to jane.doe@example.com with the subject "Meeting Notes" and body "Here are the notes from today."
List my upcoming calendar events for the next 3 days.
Create a calendar event titled "Team Sync" tomorrow at 10 AM for 1 hour.
Search YouTube for recent videos about machine learning.

Alternative Usage Methods

Using with Cloudflare AI Playground

You can test the MCP server online using Cloudflare AI Playground:

  1. Open Cloudflare AI Playground
  2. Enter your MCP server URL with the /sse path:
    https://your-project.your-username.workers.dev/sse
    
  3. Start interacting with your Google services through the playground interface

Offline Testing with MCP Inspector

For local development and testing without deploying to Cloudflare:

  1. Create a .dev.vars file in your project root with the necessary environment variables:

    GOOGLE_OAUTH_CLIENT_ID="your-client-id"
    GOOGLE_OAUTH_CLIENT_SECRET="your-client-secret"
    COOKIE_ENCRYPTION_KEY="your-random-encryption-key"
    
  2. Use Bun:

    # Install dependencies
    bun install
    
    # Run local development server
    bun run dev
    
  3. Test with MCP Inspector:

    bunx @modelcontextprotocol/inspector@latest
    

    This launches a local interface to test your MCP server functionality

OAuth Authorization

The first time you use the server with an AI client, you'll need to authorize access to your Google account:

  1. The server will display an approval dialog
  2. Approve the MCP client access to your server
  3. Follow the Google OAuth flow to grant API access
  4. After authorization, you'll be redirected back to your AI client

Local Development

To run the server locally:

bun install
bun run dev

This will start a local development server, typically at http://localhost:8788

Troubleshooting

  • OAuth Issues: Ensure your Google Cloud project has the correct redirect URIs set
  • API Permissions: Check that you've enabled all required APIs in Google Cloud Console
  • Token Expiration: If you encounter authentication errors, try clearing the KV storage and re-authenticating

Thank you for using Google MCP Remote! If you have any questions or suggestions, feel free to open an issue or contribute to the project.

推荐服务器

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

官方
精选