How to Use MCP Servers with Claude Code to Automate Your Business Apps
Connect Claude Code to Notion, Gmail, HubSpot, and more using MCP servers. Learn how to read and write data across your tools with a single prompt.
What MCP Servers Actually Do for Your Business Tools
Most people using Claude Code are still treating it like a smarter text editor — prompting it to write functions, fix bugs, or draft content. That’s useful, but it barely scratches what’s possible when you add MCP servers to the picture.
MCP (Model Context Protocol) servers are what let Claude Code reach outside its own context and interact with real tools — your Notion workspace, your Gmail inbox, your HubSpot CRM. Instead of copying data into a chat window, Claude can read from and write to these systems directly, in response to a single prompt.
This guide covers how to set that up. You’ll learn what MCP servers are, how to configure them inside Claude Code, and how to build practical automation workflows across Notion, Gmail, HubSpot, and other business apps.
If you want to understand the protocol itself before jumping into setup, this overview of what MCP servers are and how they work is worth reading first.
What You Need Before Starting
Before configuring any MCP server, make sure you have the following in place:
- Claude Code installed and running (requires an active Anthropic account)
- Node.js 18+ on your machine — most MCP servers are npm packages
- API credentials or OAuth tokens for the tools you want to connect (Notion integration token, Gmail OAuth credentials, HubSpot API key, etc.)
- A basic understanding of how Claude Code’s configuration file works
You don’t need to write code to use MCP servers, but you will need to edit a JSON config file. That’s covered in the next section.
How to Configure MCP Servers in Claude Code
Claude Code uses a configuration file called claude_desktop_config.json (on macOS, it lives at ~/Library/Application Support/Claude/claude_desktop_config.json). This is where you register each MCP server you want Claude to use.
The Basic Structure
Every MCP server entry follows the same pattern:
{
"mcpServers": {
"server-name": {
"command": "npx",
"args": ["-y", "@package/server-name"],
"env": {
"API_KEY": "your-api-key-here"
}
}
}
}
The command field tells Claude how to launch the server process. Most community-built MCP servers are npm packages, so npx with the -y flag (auto-confirm install) is the standard pattern.
Adding Multiple Servers
You can register as many servers as you need in a single config file. Claude Code will make all of them available as tools in every session:
{
"mcpServers": {
"notion": {
"command": "npx",
"args": ["-y", "@notionhq/notion-mcp-server"],
"env": {
"NOTION_API_TOKEN": "secret_your_token_here"
}
},
"gmail": {
"command": "npx",
"args": ["-y", "@gptscript-ai/gmail-mcp-server"],
"env": {
"GMAIL_CREDENTIALS": "/path/to/credentials.json"
}
},
"hubspot": {
"command": "npx",
"args": ["-y", "@hubspot/mcp-server"],
"env": {
"HUBSPOT_ACCESS_TOKEN": "your-access-token"
}
}
}
}
After saving changes, restart Claude Code. The tools exposed by each server will appear automatically when you start a new session.
One thing to keep in mind: each MCP server you add increases the token overhead on every request. If you’re adding many servers, be selective about which ones you keep active. There’s a deeper look at this in the Claude Code MCP servers and token overhead guide if you want to optimize for cost.
Connecting Claude Code to Notion
Notion is one of the most popular MCP targets for business users. The official Notion MCP server (@notionhq/notion-mcp-server) gives Claude read and write access to pages, databases, and blocks.
Setting Up the Notion Integration
Before configuring the MCP server, you need a Notion integration token:
- Go to notion.so/my-integrations
- Create a new internal integration
- Copy the “Internal Integration Token” (starts with
secret_) - In your Notion workspace, open any page or database you want Claude to access, click the
...menu, and add your integration under “Connections”
Then add the server to your Claude Code config as shown above.
What Claude Can Do With Notion
Once connected, you can prompt Claude with natural language and it will execute the right Notion API calls:
- Read a database: “Show me all the tasks in my Product Roadmap database where status is ‘In Progress’”
- Create a page: “Add a new page to my Meeting Notes database titled ‘Client Sync – April 18’ with the following agenda…”
- Update properties: “Set the priority of the ‘Redesign homepage’ task to High and assign it to Sarah”
- Search across pages: “Find all pages in my workspace that mention the Henderson account”
The key shift here: Claude isn’t just generating text about your data. It’s querying, reading, and writing to the actual database.
A Practical Notion Workflow Example
Say you run a weekly team meeting and want to auto-generate a structured notes page. You could prompt:
“Create a new page in my Meeting Notes database for today’s team sync. Pull the three highest-priority open tasks from the Sprint Board database and include them in an ‘Action Items’ section. Format it with sections for Agenda, Discussion, and Next Steps.”
Claude reads from the Sprint Board, creates the notes page, and structures the content — all from that one prompt.
Connecting Claude Code to Gmail
Gmail automation is where MCP servers start feeling genuinely useful for daily operations. With the right server configured, Claude can draft, send, search, label, and reply to emails without you opening the Gmail UI.
Getting Gmail OAuth Credentials
Gmail requires OAuth 2.0, which is slightly more involved than a simple API key:
- Go to the Google Cloud Console and create a new project (or use an existing one)
- Enable the Gmail API under “APIs & Services”
- Create OAuth 2.0 credentials and download the
credentials.jsonfile - On first run, you’ll be prompted to authorize access in a browser — this generates a
token.jsonfile that the server uses for subsequent requests
Point the GMAIL_CREDENTIALS environment variable at your credentials.json path.
What Claude Can Do With Gmail
With Gmail connected, typical prompts look like:
- Search and summarize: “Find all emails from HubSpot in the last 7 days and summarize what each one is about”
- Draft and send: “Write and send a follow-up email to the last message in my thread with Alex Chen. Keep it short — just confirm the meeting time and ask if he needs anything before we meet”
- Bulk label: “Find all emails with subject lines containing ‘invoice’ that are older than 30 days and label them ‘Archive’”
- Compose from context: “Draft a reply to the most recent email from [client name] thanking them for the feedback and letting them know we’ll address the issues by end of week”
Combining Gmail With Other Tools
The real value comes when Gmail is one tool in a multi-step workflow. For example, Claude can read a Notion project database, identify tasks that are overdue, and send a summary email to the relevant stakeholders — all in a single prompt chain.
This is the kind of workflow that would require a Zapier setup with multiple steps, conditional logic, and manual configuration. With Claude Code and MCP servers, you describe the outcome and Claude figures out the steps. If you’re curious how this compares to trigger-based tools, this breakdown of why AI-native workflows beat Zapier + GPT combinations covers the tradeoffs well.
Connecting Claude Code to HubSpot
HubSpot is where Claude Code gets especially powerful for sales and marketing teams. With the HubSpot MCP server, Claude can read and update contacts, deals, companies, and activity logs.
Setting Up HubSpot
HubSpot uses private app access tokens for API authentication:
- In your HubSpot account, go to Settings → Integrations → Private Apps
- Create a new private app and select the scopes you need (CRM objects, contacts, deals, etc.)
- Copy the access token and add it to your MCP config under
HUBSPOT_ACCESS_TOKEN
What Claude Can Do With HubSpot
Once the server is running:
- Pull contact data: “Show me all contacts added in the last 14 days who haven’t been contacted yet”
- Update deal stages: “Move the Acme Corp deal to ‘Proposal Sent’ and log a note that the proposal was emailed today”
- Create new records: “Add a new contact: John Martinez, john@example.com, CFO at Riverstone Partners. Add a note that we met at the SF conference”
- Generate pipeline reports: “List all deals in ‘Negotiation’ stage with a close date in the next 30 days, sorted by deal value”
For teams building more sophisticated HubSpot automation, building a HubSpot AI agent without writing code covers how to extend this further.
A HubSpot + Gmail Workflow
Here’s where multi-tool automation pays off. One prompt:
“Find all HubSpot contacts who are in ‘Demo Scheduled’ stage and haven’t had any activity in the last 5 days. Draft a check-in email for each one and show me the drafts before sending.”
Claude pulls the contact list from HubSpot, reads recent activity, drafts personalized emails in Gmail, and presents them for review. That workflow would typically require a dedicated sales ops hire or a complex automation platform to build.
Building Multi-Tool Automation Workflows
Single-tool MCP connections are useful. Multi-tool workflows are where Claude Code starts acting like an actual business automation system.
The Architecture
When you have multiple MCP servers configured, Claude can pass data between tools within a single session. It treats each server’s exposed functions as available tools, and it can call them in sequence, use output from one as input to another, and reason about the combined result.
This is meaningfully different from traditional automation where you define each step in advance. Claude decides which tools to call based on what you ask.
Three Multi-Tool Workflow Examples
1. Weekly pipeline review:
“Check HubSpot for all deals closing this month. For each deal over $10k, find any related email threads in Gmail. Then create a Notion page with a summary of each deal, the relevant email context, and recommended next actions.”
2. Onboarding automation:
“A new client just signed. Their name is Bright Solutions, contact is Maria Torres at maria@brightsolutions.com. Add them to HubSpot as a new company and contact. Create an onboarding checklist page in Notion. Send Maria a welcome email with our onboarding doc link.”
3. Content pipeline management:
“Check the Content Calendar database in Notion. Find any posts scheduled for this week that don’t have a ‘Draft Complete’ status. Email the relevant writers a reminder with the due dates and post titles.”
Tips for Reliable Multi-Tool Workflows
- Be explicit about sequencing when it matters. If step B depends on the result of step A, say so in your prompt.
- Use confirmation steps for destructive actions. For anything that sends emails or modifies live CRM data, prompt Claude to show you a summary before executing.
- Test on small datasets first. Run a workflow on 2–3 records before applying it to your full database.
- Log results somewhere. Ask Claude to write a summary of what it did to Notion or a local file so you have an audit trail.
For teams that want to push this further into scheduled and recurring workflows, Claude Code routines and scheduled tasks covers how to automate these on a time-based trigger.
Common Mistakes (and How to Avoid Them)
Giving Claude Too Many Tools at Once
Every MCP server you register exposes its tools to Claude on every request. If you have 10 servers active, Claude sees 50–100 available tool definitions. This increases token usage and can slow responses or cause Claude to select the wrong tool.
Keep only the servers you actively use. Add and remove them as your workflows change.
Skipping Permission Scoping
When setting up OAuth or API keys, it’s tempting to grant full access. For production use, scope permissions to exactly what you need. If a workflow only needs to read HubSpot contacts and send Gmail drafts, don’t give it write access to your entire CRM.
Not Validating Before Sending
Claude will execute actions when you ask it to. If you prompt “send the follow-up email to everyone in the stalled deals list,” it will try to do exactly that. Build review steps into your workflows — especially for anything that reaches external people.
A good habit: end any prompt involving external actions with “show me what you plan to do before executing.”
Using MCP Servers as a Simple API Wrapper
Just registering an API as an MCP server doesn’t automatically make it agent-friendly. If the data coming back is poorly structured or requires Claude to make multiple round-trips to understand context, the workflow gets expensive and unreliable. There’s a detailed explanation of this problem in the MCP server trap and agent-readable data architecture.
Other Tools Worth Connecting
Beyond Notion, Gmail, and HubSpot, there’s an active ecosystem of MCP servers worth exploring:
- GitHub — read and write code, manage issues, create PRs
- Slack — send messages, read channel history, post summaries (Slack is also building its own native MCP client)
- Linear — manage engineering issues and sprints
- Airtable — read and write structured data across bases
- Stripe — query transactions, check subscription status, manage customer records
- PostgreSQL / SQLite — direct database access for Claude to query your own data
- Google Drive / Docs / Sheets — read and write across the Google Workspace suite
For full Google Workspace integration specifically, using the Google Workspace CLI with Claude Code gives a more complete picture of what’s possible there.
Where Remy Fits
If you’re reading this and thinking “I want this kind of automation embedded directly into my product, not just running from my terminal,” that’s where Remy becomes relevant.
Remy compiles annotated specs into full-stack applications — backend, database, auth, deployment. When you need MCP-style integrations baked into a real app (not a personal Claude Code session), Remy gives you the infrastructure to do it.
The difference is scope. Claude Code with MCP servers is excellent for personal workflows, ad hoc automation, and connecting your own tools. Remy is for when you want to ship that logic as an actual product — with a UI, user accounts, and production-grade data handling.
The integration breadth that comes with Remy’s infrastructure (built on the platform behind MindStudio, which connects to 1,000+ tools) means you’re not starting from scratch when you want to build something like a client-facing CRM tool, an internal ops dashboard, or an automated reporting system.
If you’re at the point where your Claude Code workflows are complex enough that you wish they were a real application, try Remy.
Frequently Asked Questions
What is an MCP server in Claude Code?
An MCP server is a local process that exposes tool functions Claude Code can call. When you configure one, Claude gains the ability to read from and write to external systems — databases, APIs, SaaS tools — using those functions. The Model Context Protocol is the standard that defines how these tool calls are structured. You can read a full explanation of what MCP servers are and how they work for more detail.
Do I need to write code to use MCP servers with Claude Code?
No. Most MCP servers are pre-built npm packages. Setup involves editing a JSON config file and providing API credentials. Once that’s done, you interact with your connected tools through natural language prompts in Claude Code — no code required.
Is it safe to give Claude access to my business tools?
It depends on how you configure it. A few practices help: scope API permissions to the minimum needed, use separate API keys or OAuth apps specifically for Claude (not your primary production credentials), and build confirmation steps into any workflow that modifies live data or sends external communications. Never give Claude access to production payment systems or sensitive personal data unless you’ve carefully reviewed the workflow.
How many MCP servers can I have active at once?
There’s no hard limit, but practical limits apply. Each active server increases the token overhead on every Claude request. Most users get best results keeping 3–6 relevant servers active rather than registering everything available. You can always add and remove servers from your config file as your workflows change.
Can Claude Code run MCP-powered workflows automatically, without my input?
Claude Code itself is primarily interactive — you prompt it and it responds. But you can combine it with scheduled execution (via cron jobs, task schedulers, or Claude’s own routine features) to run workflows on a schedule. Using Claude Code scheduled tasks for business automation covers how to set this up.
What’s the difference between MCP servers and Claude Code Skills?
Claude Code Skills are pre-built, reusable workflow packages — think of them as higher-level capabilities that may use MCP servers internally. MCP servers are the lower-level tool connections. You can use Skills to get up and running quickly with common workflows, and MCP servers when you need direct, customized access to a specific API or tool.
Key Takeaways
- MCP servers connect Claude Code to real business tools — Notion, Gmail, HubSpot, and more — so it can read and write data directly from a prompt.
- Setup requires editing a JSON config file with your server packages and API credentials. Most servers are npm packages that run locally.
- Multi-tool workflows are where Claude Code’s real value shows: it can chain calls across Notion, Gmail, and HubSpot in a single prompt, passing data between them without manual intervention.
- Practical safeguards matter: scope permissions tightly, limit how many servers are active at once, and build confirmation steps into any workflow that sends emails or modifies live records.
- For teams that want this kind of automation inside a real, deployed application, Remy provides the full-stack infrastructure to build it properly.