Skip to main content
MindStudio
Pricing
Blog About
My Workspace

How to Connect Claude Code to Notion, Gmail, and Other Apps Using MCP Servers

MCP servers let Claude Code read and write data in your real business tools. Learn how to connect Notion, Gmail, and more to build end-to-end AI workflows.

MindStudio Team RSS
How to Connect Claude Code to Notion, Gmail, and Other Apps Using MCP Servers

What MCP Servers Actually Do for Claude Code

Claude Code is capable out of the box. It can write, edit, and reason about code, answer questions, and help structure your thinking. But by default, it operates in isolation — it can’t read your Notion database, check your Gmail inbox, or write a row to a Google Sheet unless you give it a way in.

That’s exactly what MCP servers do. The Model Context Protocol (MCP) is a standard that lets Claude Code connect to external tools and services. Instead of copying and pasting data into a prompt, you wire up a live connection. Claude can then read from and write to your real business apps, in real time, as part of an end-to-end workflow.

This guide walks through how to set up MCP servers for Notion, Gmail, and other commonly used apps — and how to build workflows that actually do something useful once those connections are live.

If you’re new to the concept, what MCP servers are and how they work is worth reading first. But if you’re ready to set things up, read on.


Before You Start: What You’ll Need

Setting up MCP servers for Claude Code is a technical process. You don’t need to be a seasoned developer, but you do need to be comfortable with a terminal, JSON config files, and API credentials.

Here’s what you’ll need before connecting any app:

  • Claude Code installed and running locally (requires an Anthropic API key or Claude Pro/Team subscription with API access)
  • Node.js (v18 or later) installed — most MCP servers run as Node processes
  • API credentials for each service you want to connect (covered per-service below)
  • A basic understanding of how Claude Code’s claude_desktop_config.json or .mcp.json file works

Claude Code discovers MCP servers through its configuration file. Each server you add gets its own entry with a command to run, any required arguments, and environment variables for auth tokens or API keys.


How Claude Code Reads MCP Server Configuration

Claude Code supports two configuration scopes: global and project-level.

Global configuration is stored at ~/.claude/claude_desktop_config.json (or the platform equivalent). Servers registered here are available in every Claude Code session.

Project-level configuration uses a .mcp.json file in the root of your project directory. Servers here are only active when you’re working in that project. This is useful when different projects need different integrations.

The structure looks like this:

{
  "mcpServers": {
    "notion": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-notion"],
      "env": {
        "NOTION_API_KEY": "your_notion_integration_token"
      }
    }
  }
}

Each entry in mcpServers is a named server. Claude Code starts these as child processes and communicates with them over stdio. The server exposes tools — functions Claude can call — and Claude decides when and how to use them based on your prompt.

One thing to be aware of: MCP servers are not pre-installed. You pull them from npm (or run them locally) each time Claude Code starts. That’s why most commands use npx with the -y flag to skip confirmation prompts.


Connect Notion to Claude Code

Notion is one of the most useful apps to connect because it’s where a lot of teams store structured information — wikis, project databases, meeting notes, CRM data. Once Claude can read and write Notion, it can do things like pull a project brief and generate a task list, or write research notes directly to a database.

Step 1: Create a Notion Integration

  1. Go to Notion’s developer portal and click New integration.
  2. Give it a name (e.g., “Claude Code”), choose your workspace, and set the capabilities you need (read content, update content, insert content).
  3. Copy the Internal Integration Token — this is your API key.

Step 2: Share Pages with Your Integration

Notion integrations don’t have access to your entire workspace by default. You need to explicitly share the pages or databases you want Claude to access.

Open each page or database in Notion, click the menu in the top right, go to Connections, and add your integration.

Step 3: Add the Notion MCP Server to Claude Code

Add the following to your config file:

"notion": {
  "command": "npx",
  "args": ["-y", "@modelcontextprotocol/server-notion"],
  "env": {
    "NOTION_API_KEY": "ntn_xxxxxxxxxxxxxxxxxxxx"
  }
}

Step 4: Test the Connection

Restart Claude Code and run a simple test prompt:

“List the pages in my Notion workspace.”

If everything is configured correctly, Claude will call the Notion MCP server and return a list of pages your integration has access to.

What You Can Do with Notion + Claude Code

  • Pull content from a database and summarize it
  • Create new pages or database entries from unstructured input
  • Search across pages to answer questions about your docs
  • Write structured content — meeting notes, reports, briefs — directly to a Notion page

This pairs especially well with building an agentic business OS with Claude Code, where Notion often serves as the central knowledge store.


Connect Gmail to Claude Code

Gmail integration opens up a different category of use cases: reading incoming emails to trigger actions, drafting replies, parsing order or invoice data, and building lightweight inbox automation.

The Gmail MCP server works through the Google API. Setup is slightly more involved because Google requires OAuth credentials rather than a simple API key.

Step 1: Set Up a Google Cloud Project

  1. Go to the Google Cloud Console and create a new project.
  2. Enable the Gmail API for the project.
  3. Under APIs & Services > Credentials, create an OAuth 2.0 Client ID (choose “Desktop app” as the application type).
  4. Download the credentials.json file.

Step 2: Run the Auth Flow

The Gmail MCP server needs a token file generated from your credentials. Clone or install the server, then run its auth command:

npx @gptscript-ai/gmail-oauth credentials.json token.json

This opens a browser window where you authorize access to your Gmail account. Once complete, a token.json file is saved locally. This is what the MCP server uses to authenticate on your behalf.

Step 3: Add Gmail to Your MCP Config

"gmail": {
  "command": "npx",
  "args": [
    "-y",
    "@gptscript-ai/gmail-oauth",
    "--credentials", "/path/to/credentials.json",
    "--token", "/path/to/token.json"
  ]
}

Paths need to be absolute. Relative paths often fail because Claude Code launches MCP servers from its own working directory, not yours.

Step 4: Test It

Once restarted, try:

“Read my last 5 unread emails and summarize them.”

Claude will call the Gmail server, fetch the messages, and return a summary.

What You Can Do with Gmail + Claude Code

  • Parse incoming emails to extract structured data (amounts, dates, names) — useful for automating data entry from your inbox to an ERP
  • Draft replies based on context and instructions
  • Search for specific email threads and pull content into a workflow
  • Trigger follow-up tasks in other apps based on email content

Connect Google Sheets, Drive, and Docs via Google Workspace

If you’re already doing the Gmail setup, you might as well give Claude access to the rest of Google Workspace. Google Drive, Docs, and Sheets all have MCP servers available, and they share the same OAuth setup.

The Google Workspace MCP server handles all three services through a single connection. The Google Workspace CLI approach gives Claude agents full read and write access across Drive, Docs, and Sheets — which is useful when your workflow touches multiple surfaces.

Once connected, Claude can:

  • Read a Google Sheet and perform analysis or transformation on the data
  • Write query results back to a Sheet
  • Pull a document from Drive and extract structured information
  • Create a new Doc from a template and populate it with generated content

This is particularly useful if you’re building an AI executive assistant with Claude Code and Google Workspace — an agent that manages calendar, email, and documents as a single coherent workflow.


Other Apps Worth Connecting

Notion and Gmail get a lot of attention, but the MCP ecosystem covers a much wider range of tools. Here are other commonly used servers:

Slack

The Slack MCP server lets Claude post messages, read channel history, and look up users. Combined with Gmail and Notion, this creates a full communication loop — Claude can pull an email thread, summarize it, and post the summary to the right Slack channel automatically.

Slack is also moving in this direction itself. Slack AI’s MCP client turns Slackbot into an agentic teammate that can take actions based on conversation context — worth understanding as a parallel development.

GitHub

The GitHub MCP server exposes repositories, issues, pull requests, and commits. Claude can check issue status, read PR diffs, create new issues, or comment on existing ones. This is useful for development workflows where you want Claude to stay in sync with what’s happening in your codebase.

Airtable

Airtable’s structured database format makes it a natural fit for MCP. Claude can query tables, create records, update fields, and filter views. If you’re connecting AI agents to Airtable for automated data workflows, an MCP server is the most direct path.

Linear, Jira, and ClickUp

Project management tools are high-value targets because they’re where work is tracked. MCP servers for Linear, Jira, and ClickUp let Claude create tickets, update statuses, query sprint progress, and pull context about ongoing work. See also: building an AI company research agent with Claude Code and ClickUp.

Databases (PostgreSQL, SQLite, MySQL)

Database MCP servers let Claude run queries directly against your data. This is more advanced — you’ll want to think carefully about read vs. write permissions — but it’s one of the most powerful connections you can make. Claude can explore schemas, run analytical queries, and surface insights without any manual export.


Building End-to-End Workflows with Multiple MCP Servers

Connecting a single app to Claude Code is useful. Connecting several and chaining them together is where things get genuinely powerful.

Here’s a practical example: a content research and publishing workflow.

  1. Claude reads a Notion database of content ideas
  2. Claude searches Gmail for any relevant past emails or client briefs related to the topic
  3. Claude generates a draft and writes it back to a new Notion page
  4. Claude posts a Slack notification to the content team that a draft is ready

Each step uses a different MCP server. Claude coordinates them in sequence based on a single prompt or instruction. No custom code glues them together — the MCP protocol handles the interface, and Claude handles the logic.

This kind of multi-step, multi-tool execution is what separates agentic workflows from traditional automation. A traditional tool like Zapier triggers fixed actions when conditions are met. Claude with MCP servers can reason about what to do next, handle ambiguous inputs, and adapt based on what it finds.

For more on chaining these kinds of operations, Claude Code skill collaboration and chaining workflows covers the architecture in detail.


What to Watch Out For

Token Overhead

Every MCP tool call adds data to Claude’s context window. When you’re pulling large amounts of content — say, 50 emails or a full Notion database — the token cost adds up fast. This affects both speed and cost.

The right approach is to be specific in your prompts. Instead of “read all my emails,” say “read unread emails from the last 24 hours with the label ‘client’.” Filtering at the query level keeps context lean.

Claude Code MCP servers and token overhead covers this in more depth, including how to structure prompts and tool calls to minimize waste.

The MCP Server Trap

Not every MCP server is well-designed for agent use. Some are thin wrappers around an API that dump raw JSON into Claude’s context — which is token-heavy and hard for Claude to reason about efficiently. Others expose too many tools with overlapping purposes, which increases the chance Claude picks the wrong one.

The MCP server trap explains why wrapping an API isn’t enough, and what good agent-readable data architecture actually looks like. Before adding a new server, check how it structures its tool outputs.

Permissions and Scope

Be deliberate about what permissions you grant. An MCP server with write access to Gmail can send emails on your behalf. One with write access to a database can modify or delete records. Start with read-only access during testing, then expand only what’s needed for the workflow.

For OAuth-based services like Gmail and Google Workspace, you can scope credentials precisely. Do this — don’t just request all available scopes because it’s easier.

Running Multiple Servers

Each MCP server you add is a separate process Claude Code manages. In practice, running 5–8 servers simultaneously is fine. Running 20+ starts to introduce startup latency and potential instability, especially on less powerful machines.

Organize your servers by project using the .mcp.json approach. Only load what a given project actually needs.


Where Remy Fits

If MCP servers let Claude Code interact with your existing tools, Remy takes a different angle: it compiles your application spec into a full-stack app with a real backend, database, auth, and deployment built in.

Where Claude Code with MCP is about connecting to tools you already use, Remy is about building new applications that other tools — and other agents — can integrate with. If you’re pulling data from Gmail and Notion to power a workflow, Remy is how you build the application that workflow runs inside.

For example: you could build a client portal in Remy that automatically ingests email data, surfaces it in a structured interface, and writes summaries back to Notion via its own API. The portal itself is the app. The MCP connections are how it talks to the outside world.

Remy apps have real backends (TypeScript), real SQL databases, real auth, and deploy on push. You describe what the app does in an annotated spec, and Remy compiles that into working code. It’s not a no-code tool — it’s a higher-level way to write software.

You can try Remy at mindstudio.ai/remy.


Frequently Asked Questions

What is an MCP server and how does it work with Claude Code?

An MCP server is a local process that exposes a set of tools Claude Code can call. It acts as a bridge between Claude and an external service — Notion, Gmail, GitHub, etc. When you prompt Claude to do something involving an external app, it calls the appropriate tool on the MCP server, the server makes the actual API request, and returns the result to Claude. Claude then uses that result to continue its reasoning or take further action. You can read a deeper explanation in what are MCP servers and how they work.

Do I need to pay for each MCP server?

Most MCP servers are open-source and free to run. You do need to provide your own API credentials for each service you connect (e.g., a Notion integration token, Gmail OAuth credentials). Some services have rate limits on their free API tiers — if you’re running high-volume workflows, you may need a paid API plan for those services.

Can Claude Code write data back to Notion or Gmail, or only read?

Both. Most MCP servers expose tools for both reading and writing. The Notion MCP server can create pages, append content, and update database properties. The Gmail server can send emails and create drafts. Whether you should give Claude write access depends on your workflow — always test in a read-only setup first.

How many MCP servers can I run at once?

There’s no hard limit imposed by Claude Code. In practice, running 5–10 servers simultaneously is reliable on most machines. Beyond that, you may see slower startup times as Claude Code initializes all the processes. Use project-level .mcp.json files to scope which servers load for which workflows, rather than loading everything globally.

Are there security risks to connecting these apps to Claude Code?

Yes, and they’re worth thinking through. An MCP server with write access to Gmail can send emails as you. One with database write access can modify records. The risk is similar to giving any application API access — the difference is that Claude is making decisions about when to use that access, rather than a deterministic script. Scope credentials narrowly, use read-only access during testing, and avoid connecting sensitive systems (payroll, financial accounts) without careful review of the server’s code.

What’s the difference between MCP servers and browser automation for connecting apps?

MCP servers use official APIs — they’re structured, reliable, and don’t break when a UI changes. Browser automation (like Claude Code Computer Use) controls the actual browser interface, which works for apps that don’t have APIs but is slower and more fragile. If the app has an API and an MCP server is available, use that. Fall back to browser automation for apps with no API access.


Key Takeaways

  • MCP servers connect Claude Code to external apps like Notion, Gmail, Google Workspace, Slack, and more — enabling real read/write access, not just chat.
  • Setup involves adding server entries to Claude Code’s config file with the right command, arguments, and API credentials for each service.
  • Notion requires an integration token and explicit page sharing. Gmail requires Google OAuth credentials and a local token file.
  • Multi-server workflows let Claude coordinate across tools in sequence — reading from one app, acting on another, and writing results to a third.
  • Token overhead and permission scope are the two main things to manage carefully as you scale up connections.
  • Remy complements this approach by letting you build the applications that these workflows power — full-stack, deployed, and spec-driven. Try it at mindstudio.ai/remy.

Presented by MindStudio

No spam. Unsubscribe anytime.