How to Connect Claude Code to Google Sheets, Slack and Gmail With MCP
Connect Claude Code to Google Sheets, Slack and Gmail with MCP. Slack needs one plugin command, Gmail uses a claude.ai connector. Steps and fixes.
Quick answer: Slack connects with one plugin command, Gmail connects through a claude.ai connector, and Sheets needs Google's Developer Preview server. Free? The vendor docs list no separate MCP fee, but you need your own Claude Code access, a Slack workspace where an admin has approved MCP, and a Google account.
Claude Code talks to outside apps through MCP, which Anthropic's docs describe as an open source standard for AI-tool integrations. Once a server is connected, Claude Code can read and act on that app directly instead of working from text you paste in. This guide covers the three apps in the title and flags the steps that Google does not document for Claude Code.
What do you need before you start?
You need Claude Code installed, an approved Slack workspace, and a Google account. For Google Sheets you also need a Google Cloud project. If Claude Code is not installed yet, follow How to Install Claude Code on Mac and Windows first.
| Item | Needed for | Source detail |
|---|---|---|
| Claude Code CLI | All three | Slack lists Claude Code CLI installed as a prerequisite |
| Slack workspace with MCP approved by an admin | Slack | Slack docs |
| claude.ai login in Claude Code | Gmail connector | Claude Code docs: connectors load only with a claude.ai subscription login |
| Google Workspace Developer Preview Program membership | Google's Gmail and Sheets servers | Google docs |
| A Google Cloud project and the gcloud CLI | Google's Gmail and Sheets servers | Google docs |
On Team and Enterprise plans, only admins can add servers at claude.ai, and an Owner must enable the Google Workspace connectors before members can sign in.
How do you connect Claude Code to Slack with MCP? (Method 1: the Slack plugin)
Install the official Slack plugin from inside Claude Code, then sign in to Slack when prompted. Slack's docs say the MCP server is configured automatically when the plugin loads.
- Ask a Slack admin to confirm the MCP integration is approved for your workspace.
- Open a terminal and start Claude Code by running
claude. - At the prompt, run this command (the form shown on Slack's plugin page):
/plugin install slack@claude-plugins-official
- Slack's connection page also lists
/plugin install slackand a terminal form,claude plugin install slack. Use either if the first is not found. - Complete the Slack OAuth prompt in your browser.
- Run
/mcpinside Claude Code and check that the Slack server is listed. - Ask something small, such as "Search Slack for messages about the Q4 budget."
The plugin's configuration points at https://mcp.slack.com/mcp. Slack says that endpoint uses Streamable HTTP and does not support SSE or Dynamic Client Registration. It also says MCP clients must be backed by a registered Slack app with a fixed app ID.
What Claude can do in Slack: Slack lists searching messages, files, users and channels, sending, scheduling and drafting messages, reading channels and threads, working with canvases, uploading files and working with lists. The same rate limits apply as for the Slack Web API. As of 14 October 2026, Slack's table lists Read a channel at Tier 3 (50+ per minute) and Search channels at Tier 2 (20+ per minute).
If you prefer not to use the plugin, Slack's docs describe adding Slack as a connector from Customize > Connectors in Claude Desktop. Claude Code can then pick up claude.ai connectors by itself, as described next.
How do you connect Claude Code to Gmail with MCP? (Method 1: the claude.ai connector)
Add Gmail at claude.ai, then open Claude Code. Claude Code's docs say that MCP servers you add in claude.ai appear automatically in Claude Code when you are logged in with a claude.ai account.
You cannot use claude mcp add for this one. The docs say Gmail and Google Calendar do not support local OAuth from Claude Code, because Google only accepts the redirect URL that claude.ai registered.
- Go to Customize > Connectors at claude.ai (the page is
claude.ai/customize/connectors). In the desktop app, select Customize in the sidebar, then Connectors. - Select Discover and enter Gmail in Search connectors.
- Select the Gmail connector, then select Connect to Claude. On a Team or Enterprise plan, an Owner may need to add it first (connector steps).
- Sign in to Google, review the access requested and approve it.
- Confirm the connector shows Connected under Your connectors.
- In a terminal, run
claude, then run/mcp. Servers from claude.ai appear with an indicator that they come from claude.ai.
What it can do, per Anthropic's help page: search and read emails, draft emails, send, reply to and forward emails, and manage labels and threads. By default Claude asks for approval before each send, reply or forward. Attachment metadata is available, but not attachment content.
For a related walkthrough in the chat app, see How to Connect Claude to Gmail and Google Calendar.
How do you connect Claude Code to Google Sheets with MCP? (Method 2: Google's Workspace MCP servers)
Use Google's own Sheets MCP server, which is in Developer Preview. It needs a Google Cloud project, an OAuth client and a sign-in from Claude Code. Anthropic's connector route covers reading Sheets only: the Google Drive connector can read Sheets, and live editing is a separate beta in Claude on the web and Claude Desktop.
The same route works for Gmail if you want Google's server instead of Anthropic's. Google's Gmail server can search emails, retrieve threads, list labels, create drafts and label messages. Its documentation lists no send action.
Google's setup page documents clients named Antigravity and Claude (claude.ai and Claude Desktop). It does not give a Claude Code CLI recipe. The steps below combine Google's console steps with Claude Code's documented OAuth flags. Two steps are marked Verify this step because neither vendor documents them for this exact case.
- Join the Google Workspace Developer Preview Program.
- Create or pick a Google Cloud project, and set up the gcloud CLI.
- Enable the APIs and the MCP services. Google's page enables all nine products at once. This subset covers Gmail, Drive and Sheets (Verify this step: Google documents the full list, not this subset, so use the full list if a call fails):
gcloud services enable gmail.googleapis.com drive.googleapis.com sheets.googleapis.com gmailmcp.googleapis.com sheetsmcp.googleapis.com --project=PROJECT_ID
- In the Google Cloud console, go to Google Auth Platform > Branding. If you see Google Auth Platform not configured yet, click Get Started. Enter an app name and support email.
- Under Audience, select Internal. If you cannot, select External and add yourself under Test users.
- Go to Data Access > Add or Remove Scopes. Under Manually add scopes, paste the scopes Google lists. For Gmail:
https://www.googleapis.com/auth/gmail.readonlyandhttps://www.googleapis.com/auth/gmail.compose. For Sheets:https://www.googleapis.com/auth/drive.readonly,https://www.googleapis.com/auth/drive.file,https://www.googleapis.com/auth/spreadsheets.readonlyandhttps://www.googleapis.com/auth/spreadsheets. Click Add to Table, Update, then Save. - Go to Google Auth Platform > Clients > Create Client and select Web application. Add the redirect URI
http://localhost:8765/callback. Verify this step: Claude Code's docs say to register a redirect of the formhttp://localhost:PORT/callback, and a DEV Community write-up used this exact URI for Claude Code. Google's own page ticks Use this client for an AI-powered agent for its documented clients, while that write-up leaves it unticked. - Copy the Client ID and Client Secret.
- Register each server in Claude Code. The
--client-secretflag asks for the secret with masked input, per Claude Code's docs:
claude mcp add-json sheets '{"type":"http","url":"https://sheetsmcp.googleapis.com/mcp/v1","oauth":{"clientId":"YOUR_CLIENT_ID","callbackPort":8765,"scopes":"https://www.googleapis.com/auth/drive.readonly https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/spreadsheets.readonly https://www.googleapis.com/auth/spreadsheets"}}' --client-secret
claude mcp add-json gmail '{"type":"http","url":"https://gmailmcp.googleapis.com/mcp/v1","oauth":{"clientId":"YOUR_CLIENT_ID","callbackPort":8765,"scopes":"https://www.googleapis.com/auth/gmail.readonly https://www.googleapis.com/auth/gmail.compose"}}' --client-secret
- Start
claude, run/mcp, select each server and complete the Google sign-in. Alternatively runclaude mcp login sheets. - Run
claude mcp get sheetsto check that OAuth credentials are configured, then ask Claude to read a named spreadsheet.
Replace YOUR_CLIENT_ID with your own value. Never paste a real secret into a script or a shared file. Claude Code stores the secret in the macOS keychain or a credentials file, not in its config. These commands use local scope by default, so the servers load only in the current project. Add --scope user to make them load in every project.
Which method should you choose?
Use the Slack plugin for Slack, the claude.ai connector for Gmail, and Google's server only when you need Sheets read and write or Google's narrower Gmail behaviour. The table compares the routes as of 14 October 2026.
| Method | Cost | Difficulty | Limits | Best for |
|---|---|---|---|---|
Slack plugin (/plugin install slack@claude-plugins-official) | No MCP fee in Slack's docs | Low | Needs admin-approved MCP; Slack Web API rate limits apply | Searching and posting in Slack from Claude Code |
| claude.ai Gmail connector | No separate fee in Anthropic's help page; requires claude.ai login in Claude Code | Low | Cannot be added with claude mcp add; no attachment content | Reading, drafting and approved sending |
| claude.ai Google Drive connector | Same as above | Low | Reads Sheets; live editing is a separate beta in web and desktop apps | Reading spreadsheet data |
| Google Sheets MCP server (Developer Preview) | Needs a Google Cloud project | High | Preview status; extra steps for Claude Code | Reading and writing Sheets |
| Google Gmail MCP server (Developer Preview) | Needs a Google Cloud project | High | Drafts and labels, no send listed | Teams that want drafts only |
What's free and what costs money?
The vendor docs list no separate fee for MCP itself. What they do state is who can use each piece, as of 14 October 2026.
- Claude connectors: Gmail, Google Calendar and Google Drive connectors are available for all users on Claude and Claude Desktop. The connected service may require its own account or paid plan, per Anthropic's connector guide.
- Custom Google connectors in claude.ai or Claude Desktop: Google says you need a Claude Enterprise, Pro, Max or Team plan. That line is about claude.ai and Claude Desktop, not the Claude Code command line.
- Google MCP servers: Developer Preview membership and a Google Cloud project are required.
- Slack: a workspace where an admin has approved MCP. Slack's pages do not state a plan requirement.
For the pricing of Claude Code itself, check Anthropic's current plans page before you start.
What can go wrong, and how do you fix it?
Most failures come from the wrong connection route, an unapproved Slack app, or expired Google sign-ins. These are the common ones.
- "is Anthropic-hosted and doesn't support local OAuth". You added Gmail or Calendar with
claude mcp add. Runclaude mcp remove <name>, connect the service at claude.ai/customize/connectors, and it will appear in Claude Code. - The claude.ai connector is missing from
/mcp. Claude Code does not load connectors whenANTHROPIC_API_KEY,ANTHROPIC_AUTH_TOKENorapiKeyHelperis active, or when a third-party provider such as Amazon Bedrock is active. Run/statusto see the active method, remove the override, then run/login. - "Incompatible auth server: does not support dynamic client registration". The server needs pre-configured credentials. Use
--client-id,--client-secretand--callback-port, as in the Google steps above. - Redirect URI mismatch. The docs note that Claude Code v2.1.229 sent a
127.0.0.1form and v2.1.231 restoredlocalhost. Upgrade Claude Code and check the URI registered on the OAuth client. - Google tools vanish after about an hour. According to a DEV Community write-up, Google sign-ins from Claude Code carried no refresh token and expired after about an hour, and signing one server in again while its token still worked revoked every server's token. That author recommends signing all servers in together. This is one developer's report and may change.
- Slack sign-in fails. Confirm an admin approved the MCP integration. If your app has an IP allowlist, Slack says requests from other addresses are rejected.
Is this allowed?
Yes, if you use the official routes and stay inside your organisation's approvals. These rules come from the vendors.
- Slack: Only apps published in the Slack Marketplace and internal apps can use MCP, and unlisted apps are prohibited. Admins can audit MCP activity in audit logs. Do not use tools that promise to skip admin approval.
- Google: the Workspace servers inherit your permissions and data governance controls. The OAuth consent step asks you to agree to the Google API Services User Data Policy.
- Prompt injection: Claude Code's docs tell you to verify that you trust each server, because servers that fetch external content can expose you to prompt injection. Google's security page says you must screen prompts and responses for malicious content. Slack advises care when connecting other MCP servers at the same time.
Connecting Gmail, Slack and Sheets together means untrusted text from an email or message can sit next to tools that send or write. Start read-only, and keep approvals on for sends and edits. If you would rather email from a script, see How to Send Emails From Google Sheets Automatically Without Paid Add-ons. For a non-MCP Slack route, see How to Send Slack Messages From Google Sheets.
What's still unclear?
Several details are not settled in the vendor documentation.
- Google's Claude Code recipe: Google's page documents claude.ai, Claude Desktop and Antigravity. The Claude Code redirect URI and the AI-powered agent checkbox come from Claude Code's general OAuth guidance and one independent write-up. Google ticks the checkbox for its own clients, and that write-up leaves it unticked.
- Sign-in lifetime: the hourly expiry and the revoke-all behaviour come from one DEV Community author, not from Google or Anthropic.
- Gmail send ability: Anthropic's Gmail connector lists send, reply and forward. Google's Gmail MCP server lists drafting and labelling only. They are different products, so choose by the actions you want.
- Sheets writes through Anthropic: Anthropic's help page describes reading Sheets through Drive and live editing in the web and desktop apps. It does not say Claude Code can write to Sheets through a connector.
- Developer Preview: Google labels these servers as early access, so names, scopes and limits may change.
- Install string: Slack's two pages show slightly different plugin install commands. Both are from Slack.
Last checked: 14 October 2026.
Frequently asked questions
Can Claude Code send Gmail messages through MCP?
It depends on the connector. Anthropic's Gmail connector, which you add at claude.ai, lists send, reply and forward actions, and asks for your approval by default. Google's own Gmail MCP server, in Developer Preview, lists reading, drafting and labelling, with no send action. Pick the connector that matches how much control you want Claude to have.
Why does claude mcp add fail for Gmail?
Claude Code's documentation says Anthropic-hosted connectors such as Gmail and Google Calendar do not support local OAuth from Claude Code. If you add one with claude mcp add and sign in, Claude Code points you to claude.ai/customize/connectors. Remove your entry, connect Gmail there, and it then appears in Claude Code automatically.
Does Claude Code need an admin to connect to Slack?
Yes, in practice. Slack's documentation lists a workspace with the MCP integration approved by your workspace admin as a prerequisite. It also says admins can approve and manage MCP client integrations. If you cannot authenticate, ask a Slack admin whether the Slack MCP integration has been approved for your workspace.
Is the Google Sheets MCP server production ready?
Not according to Google. The Google Workspace MCP servers are labelled Developer Preview, available through the Google Workspace Developer Preview Program, which grants early access to certain features. You need program membership and a Google Cloud project. Treat it as early access, and expect setup details and limits to change.
Where does Claude Code store MCP server settings?
It depends on scope. Local scope, the default, loads only in the current project and is stored in ~/.claude.json. Project scope writes a .mcp.json file in the project root that you can share through version control. User scope is stored in ~/.claude.json and loads in all your projects. Use claude mcp list to see what is configured.
Can an email or Slack message trick Claude Code into doing something?
It is a documented risk. Claude Code's MCP documentation warns that servers which fetch external content can expose you to prompt injection, and tells you to trust each server before connecting it. Google's Workspace MCP security page says prompts and responses must be screened for malicious content. Keep write actions on approval and start with read-only access.
Sources
- Connect Claude Code to tools via MCP - Claude Code Docs, Anthropic (2026-10-14)
- Slack MCP server overview - Slack Developer Docs, Slack (2026-10-14)
- Connect to Claude - Slack Developer Docs, Slack (2026-10-14)
- Slack MCP and Skills Plugin - Slack Developer Docs, Slack (2026-10-14)
- Configure the Google Workspace MCP servers - Google for Developers, Google (2026-10-14)
- Configure the Gmail MCP server - Google for Developers, Google (2026-10-14)
- Configure security for Google Workspace MCP servers - Google for Developers, Google (2026-10-14)
- Use Google Workspace connectors - Claude Help Center, Anthropic (2026-10-14)
- Get started with connectors - Claude Docs, Anthropic (2026-10-14)
- MCP Configuration for Google Workspace with Claude Code, DEV Community (2026-10-14)