
谷歌
STDIO通过MCP协议集成谷歌服务的AI客户端工具
通过MCP协议集成谷歌服务的AI客户端工具
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.
{ "mcpServers": { "google-mcp": { "command": "bunx", "args": ["--no-cache", "google-mcp@latest"], "env": { // Either can be used, but not both // Use OAuth "GOOGLE_OAUTH_CLIENT_ID": "<YOUR_CLIENT_ID>", "GOOGLE_OAUTH_CLIENT_SECRET": "<YOUR_CLIENT_SECRET>", "GOOGLE_OAUTH_TOKEN_PATH": "<PATH_TO_STORE_TOKENS> CAN_BE_ANYWHERE_ON_YOUR_SYSTEM", // Use Service Account "GOOGLE_CLIENT_EMAIL": "<YOUR_SERVICE_ACCOUNT_EMAIL>", "GOOGLE_PRIVATE_KEY": "<YOUR_SERVICE_ACCOUNT_PRIVATE_KEY>", "GMAIL_USER_TO_IMPERSONATE": "<USER_TO_IMPERSONATE>" } } } }
You can chain commands for workflows, e.g.:
"List my unread emails, draft a reply to the latest one, and schedule a follow-up meeting tomorrow at 2 PM."
Prerequisites:
brew install oven-sh/bun/bun # macOS/Linux with Homebrew
Set Up OAuth:
Configure Your Client: Edit your claude_desktop_config.json (or equivalent config file for your client):
{ "mcpServers": { "google-mcp": { "command": "bunx", "args": ["--no-cache", "google-mcp@latest"], "env": { // Either can be used, but not both // Use OAuth "GOOGLE_OAUTH_CLIENT_ID": "<YOUR_CLIENT_ID>", "GOOGLE_OAUTH_CLIENT_SECRET": "<YOUR_CLIENT_SECRET>", "GOOGLE_OAUTH_TOKEN_PATH": "<PATH_TO_STORE_TOKENS>", // Use Service Account "GOOGLE_CLIENT_EMAIL": "<YOUR_SERVICE_ACCOUNT_EMAIL>", "GOOGLE_PRIVATE_KEY": "<YOUR_SERVICE_ACCOUNT_PRIVATE_KEY>", "GMAIL_USER_TO_IMPERSONATE": "<USER_TO_IMPERSONATE>" } } } }
Now, ask Claude to use the google-mcp
tool.
Send an email to [email protected] 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.
git clone https://github.com/vakharwalad23/google-mcp.git cd google-mcp bun install bun run index.ts
Thank you for using Google MCP Tools! If you have any questions or suggestions, feel free to open an issue or contribute to the project.
Play around with the tools and enjoy!!