This is a feature request for the Claude Code MCP (Model Chat Protocol) integration with Gmail, asking for the ability to connect and manage multiple Gmail accounts simultaneously. Currently, only one account can be active at a time, which is inconvenient for users with separate personal and work accounts. The request highlights the need for tools to target specific connected accounts.
A starter prompt for Claude Code, what you'll need, and how to reach them.
You are an expert full-stack developer. Your task is to implement multi-Gmail account support for the Claude Code MCP integration. Fork the `anthropics/claude-code` GitHub repository. Focus on the `issues/36024` feature request. Your primary goal is to add the ability to connect multiple Gmail accounts simultaneously and allow MCP tools to specify which account to use (e.g., by email address). Use Next.js 16 App Router, React 19, Tailwind v4, and Neon Postgres on Vercel for any backend services required to manage multiple OAuth tokens and account data. Implement a secure OAuth flow to obtain and store refresh tokens for multiple Google accounts. Design a minimal UI within the existing Claude Code interface (or a mocked version if direct UI changes are too complex for a prototype) that allows users to 'Add Account' and displays connected accounts. The core MVP should demonstrate successful connection of two distinct Gmail accounts, storage of their tokens, and a simulated MCP call targeting one of them. Outline the necessary changes to the existing MCP architecture to pass an account identifier. Ensure secure storage practices for API keys and tokens. The output should be a detailed code implementation plan, including necessary file modifications and new components, focusing on the backend token management and the interface for account selection. Provide instructions on how to set up the necessary Google Cloud Project for OAuth and how to test the multi-account functionality.
Developers using AI coding tools, especially those building MCP servers or AI agents, are the ideal audience. Lumivara can showcase how a robust MCP integration with multi-account support can be built using its MCP starter kit and agent tools.
## Feature request The Gmail MCP integration currently supports only one connected account at a time. Many users have multiple Gmail/Google Workspace accounts (personal + work) and would benefit from being able to connect more than one simultaneously. **Current behavior:** Only one Gmail account can be connected via MCP. Connecting a second requires disconnecting the first. **Desired behavior:** Ability to connect multiple Gmail accounts, with tools that can target a specific account (e.g., by email address). **Workaround:** Using the Gmail API via custom CLI scripts for additional accounts, but this loses the native structured access that MCP provides.
New: Setting up OAuth 2.0 credentials, consent screen, and enabling Gmail API for a new GCP project. ~2 hours.
Learn it: Google Cloud docs ↗
Get set up: Create a GCP project → enable the needed API → download a service-account key.
Standard Next.js app data storage.
Standard deployment platform for Next.js.
Understanding the existing MCP integration structure and where to inject multi-account logic. ~1 day.
Learn it: Search getting-started ↗
Comment on the GitHub issue #36024 in the anthropics/claude-code repository.
“I've prototyped a solution for multi-Gmail account support in MCP, addressing issue #36024. I've successfully connected and managed multiple accounts in a local demo. I'd be happy to contribute this to the official repository and would welcome feedback on a draft PR.”
Open the original ↗