Claude Code CRM Integration: Connect Any CRM to AI in 2026
By Kushal Magar · April 26, 2026 · 14 min read
Key Takeaway
Claude Code integrates with any CRM via MCP servers (Salesforce, HubSpot) or direct REST API calls (Pipedrive, Close, Attio). The fastest setup: HubSpot native connector in under 10 minutes. The most powerful: Salesforce MCP with the @salesforce/mcp package. For CRMs with missing or stale contact data, pair Claude Code with SyncGTM to enrich records first — then let Claude query and act on clean, enriched data.
Claude Code CRM integration gives your AI assistant direct access to your pipeline data. Instead of copying contact records into chat windows, Claude can query Salesforce via SOQL, update HubSpot deals in bulk, pull Pipedrive stages into a report, and trigger enrichment workflows — all from a single prompt.
This guide covers three integration patterns: MCP servers (Salesforce and HubSpot), direct REST API calls (Pipedrive and beyond), and SyncGTM data pipelines that keep your CRM clean before Claude ever queries it. Each section includes working configuration examples and the specific failure modes to avoid.
According to Gartner's 2025 CRM AI Adoption Report, only 23% of CRM deployments have a working AI query layer as of Q4 2025. Teams that do ship AI-connected CRM workflows report 2–3x faster pipeline reporting cycles. The bottleneck is not the AI model — it is the integration plumbing.
TL;DR
- Salesforce: Use the
@salesforce/mcppackage — 60+ tools, 20–30 min setup, covers SOQL queries, bulk updates, and metadata - HubSpot: Native Claude connector via Settings — under 10 min setup, reads and writes CRM records directly from the Claude.ai interface
- Pipedrive (and others): Direct REST API integration — Claude writes and runs HTTP calls using your API key; works for any CRM with an accessible API
- Security rule: Never store API keys in
.mcp.jsonor CLAUDE.md — use environment variables or system credential stores - Data quality first: SyncGTM enriches your CRM with verified emails and firmographics before Claude queries it — garbage in, garbage out still applies to AI pipelines
Why Connect Claude Code to a CRM?
Claude Code CRM integration closes the gap between your AI assistant and your revenue data. Without integration, every CRM task requires manual context — copying records, pasting CSV exports, describing pipeline stages. With integration, Claude has direct read and write access.
The practical difference is significant. GTM teams using Claude Code with CRM access report replacing 4–6 hours of weekly RevOps work. Common use cases include:
- Pipeline reporting: “Summarize all open opportunities closing this quarter, grouped by stage and owner” — returns a formatted table in seconds
- Bulk data cleanup: “Find all contacts with missing company name and update them from the Account object” — Claude writes and runs the update script
- Lead routing: “Query all new leads from the last 48 hours where Industry = SaaS and assign them to rep ID 0051234”
- Custom field creation: “Add an ICP_Score__c field to the Contact object — number type, max 100”
- Deal analysis: “Which deals closed-lost in Q1 had a deal size above $10k? List the loss reason field for each”
For teams already using Claude Code for GTM workflows, CRM integration is the highest-ROI next step. See how GTM teams use Claude Code across revenue operations for the broader context on what this enables.
Three Integration Patterns Explained
There are three ways to connect Claude Code to a CRM in 2026. The right pattern depends on which CRM you use and how much control you need over the integration.
| Pattern | Best For | Setup Time | CRMs |
|---|---|---|---|
| MCP Server | Developers and RevOps; max tool coverage | 20–30 min | Salesforce, HubSpot (via mcp-remote) |
| Native Connector | Non-technical users; Claude.ai interface | <10 min | HubSpot |
| Direct REST API | Any CRM with an API; max flexibility | 15–20 min | Pipedrive, Close, Attio, any CRM |
MCP servers are the gold standard. They give Claude a set of named, typed tools that abstract away raw HTTP — Claude knows exactly which operations are available, what parameters they need, and what errors to expect. Model Context Protocol is Anthropic's open standard for this — think of it as USB-C for AI tool integrations.
Direct REST API integration is the fallback for CRMs without a published MCP server. Claude is capable of writing and running API calls from scratch — you just need to provide the base URL, authentication method, and a brief description of the objects you want to interact with.
Salesforce: MCP Server Integration
Salesforce is the most capable claude code crm integration target in 2026. The @salesforce/mcp package published by the Salesforce CLI team exposes 60+ tools across 7 toolsets — data operations, metadata, users, orgs, testing, code analysis, and DevOps Center.
The integration uses the Salesforce CLI for authentication. Claude never handles credentials directly — the CLI credential store manages OAuth tokens.
Prerequisites
- Node.js 18+ (
node --versionto check) - Salesforce CLI:
npm install -g @salesforce/cli - Claude Code:
npm install -g @anthropic-ai/claude-code - Salesforce org with API access (Developer Edition, sandbox, or production)
Step 1: Authorize your Salesforce org
# Authorize a production or Developer Edition org sf org login web --alias my-crm-org # Authorize a sandbox sf org login web --instance-url https://test.salesforce.com --alias my-crm-sandbox # Confirm sf org list
Step 2: Configure .mcp.json
Place this file in your project root. Claude reads it on startup and connects to the Salesforce MCP server automatically.
{
"mcpServers": {
"salesforce": {
"command": "npx",
"args": [
"-y",
"@salesforce/mcp",
"--orgs",
"my-crm-org",
"--toolsets",
"data,metadata,users",
"--dynamic-tools"
]
}
}
}Use --dynamic-tools to load tools on-demand rather than all 60+ at once. This keeps Claude's context window efficient for long sessions.
Step 3: Test the integration
Starter prompts — paste these into Claude Code
- “List all open opportunities closing this quarter. Show stage, amount, owner, and close date.”
- “Find all Contacts where Email is null. How many are there?”
- “Show me this org's API usage limits as a percentage of daily capacity.”
For the complete Salesforce MCP setup walkthrough — including connected app creation, token management, and Windows-specific issues — see the Claude Code Salesforce MCP setup guide.
Common failure: token expiry
Salesforce OAuth tokens expire based on your org's Session Settings. When a session expires, Claude returns an authentication error. Fix: run sf org login web --alias my-crm-org and restart Claude Code. Set Session Timeout to 8+ hours in Salesforce Setup for developer orgs.
HubSpot: Native Connector Integration
HubSpot launched the first native CRM connector for Claude AI in 2025. It is the fastest claude code crm integration option available — under 10 minutes from start to first query.
The connector works through the Claude.ai interface. It brings HubSpot contact, company, and deal records into Claude's context — and lets Claude create and update records, log activities, and generate AI insights directly from the chat window.
Option A: HubSpot Native Connector (Claude.ai)
- In Claude.ai, open Settings → Connectors → search for HubSpot
- Click Connect and complete the HubSpot OAuth flow
- Grant the scopes shown — contacts, companies, deals, activities are required for full CRM access
- Return to Claude.ai — HubSpot data is now available in any conversation
After connecting, test with: “Show me my 10 most recently updated HubSpot contacts. Include email, company, and last activity date.”
Option B: HubSpot via MCP Server (Claude Code)
For Claude Code (the CLI tool), use the HubSpot MCP server or connect via mcp-remote. You need a HubSpot Private App access token with the required scopes.
{
"mcpServers": {
"hubspot": {
"command": "npx",
"args": ["-y", "@hubspot/mcp-server"],
"env": {
"HUBSPOT_ACCESS_TOKEN": "pat-na1-xxxxxxxxxxxxxxxxxxxx"
}
}
}
}HubSpot Private App scopes to enable
crm.objects.contacts.readandcrm.objects.contacts.writecrm.objects.companies.readandcrm.objects.companies.writecrm.objects.deals.readandcrm.objects.deals.writecrm.schemas.contacts.read
For enrichment workflows where SyncGTM populates HubSpot fields before Claude queries them, see SyncGTM + HubSpot integration guide.
Pipedrive: REST API Integration
Pipedrive does not have a published MCP server as of April 2026. The integration pattern is direct REST API — Claude writes and runs HTTP calls against the Pipedrive REST API v1. This same pattern works for Close, Attio, and any other CRM with a REST API.
Step 1: Generate a Pipedrive API token
- Log in to Pipedrive
- Go to Settings → Personal preferences → API
- Copy your personal API token
Store this token as an environment variable — never hardcode it in a script or paste it into Claude directly.
# Add to your shell profile or .env file export PIPEDRIVE_API_TOKEN="your-token-here" # Verify echo $PIPEDRIVE_API_TOKEN
Step 2: Create a helper script
Give Claude a thin wrapper script to make API calls. This is faster than asking Claude to reconstruct the authentication pattern each session.
#!/usr/bin/env python3
# pipedrive_helper.py — place in your project root
import os
import requests
import json
import sys
API_TOKEN = os.environ.get("PIPEDRIVE_API_TOKEN")
BASE_URL = "https://api.pipedrive.com/v1"
def api_get(endpoint, params=None):
"""GET request to Pipedrive API."""
params = params or {}
params["api_token"] = API_TOKEN
response = requests.get(f"{BASE_URL}{endpoint}", params=params)
return response.json()
def api_post(endpoint, data):
"""POST request to Pipedrive API."""
params = {"api_token": API_TOKEN}
response = requests.post(
f"{BASE_URL}{endpoint}",
json=data,
params=params
)
return response.json()
if __name__ == "__main__":
# Quick test: fetch first 5 deals
result = api_get("/deals", {"limit": 5, "status": "open"})
print(json.dumps(result, indent=2))Step 3: Prompt Claude to use the script
Example prompt
“Using pipedrive_helper.py, fetch all open deals in stage 'Proposal Sent'. Format the results as a table with deal title, value, contact name, and expected close date. Then tell me which deals have not been updated in more than 14 days.”
This pattern works for any CRM. The key is giving Claude a script that handles authentication — so you never paste credentials into the chat, and Claude does not need to reconstruct the auth pattern from memory each time.
For Pipedrive enrichment workflows — auto-filling contact emails, phone numbers, and company data — the SyncGTM + Pipedrive integration handles that before Claude ever queries the records.
SyncGTM: Enrich Your CRM Before Claude Queries It
Claude Code CRM integration is only as good as the data in your CRM. If contacts are missing emails, phone numbers, or firmographic fields, Claude's reports and automations will reflect those gaps.
SyncGTM is a GTM automation platform that enriches CRM records automatically. It pulls verified contact data from 50+ providers using waterfall enrichment — trying each provider in sequence until a verified result is found — and syncs the results back to Salesforce, HubSpot, or Pipedrive.
What SyncGTM adds to your CRM before Claude queries it
- Verified work email addresses (waterfall across 50+ providers)
- Direct and mobile phone numbers
- Company firmographics: industry, headcount, revenue, tech stack
- ICP scores and fit signals
- Buying signals: job postings, funding events, tech changes, news triggers
- LinkedIn profile URLs for every contact
The workflow is: SyncGTM runs enrichment on a schedule (daily, weekly, or trigger-based) → your CRM records stay current → Claude Code queries those records and gets complete, accurate data for every task it runs.
A concrete example: you ask Claude to “email all contacts at Series B companies who joined the pipeline last week.” Without enrichment, the funding stage field is blank for 60% of contacts. With SyncGTM enrichment running, that field is populated — and Claude's query returns the right set.
See the sign-up enrichment workflow for how to set up automatic CRM enrichment on every new record, and the best Salesforce enrichment tools in 2026 for a full comparison of enrichment providers.
| Task | Claude Code (MCP) | SyncGTM |
|---|---|---|
| Query pipeline records | Yes | No |
| Bulk field updates | Yes | Partial |
| Deploy metadata / custom fields | Yes (Salesforce) | No |
| Waterfall email enrichment | No | Yes — 50+ providers |
| Phone number enrichment | No | Yes |
| Buying signal detection | No | Yes |
| ICP scoring | No | Yes |
Security and Compliance Considerations
Connecting an AI coding assistant to live CRM data requires explicit security decisions. These are the non-negotiable rules for production integrations.
Use a dedicated integration user
Create a separate CRM user specifically for Claude Code integrations. Grant only the object and field permissions required for the workflows you are automating. Never use an admin account — Claude respects permission boundaries, but accidents (and prompt injection attacks) are less damaging with a scoped user.
Store credentials in environment variables, not config files
Never do this
// .mcp.json — DO NOT store tokens here
{
"mcpServers": {
"hubspot": {
"env": {
"HUBSPOT_ACCESS_TOKEN": "pat-na1-xxxx" // ← hardcoded credential
}
}
}
}Do this instead
# Set in shell profile or CI/CD secret manager
export HUBSPOT_ACCESS_TOKEN="pat-na1-xxxx"
# .mcp.json references the env var — no credential in the file
{
"mcpServers": {
"hubspot": {
"env": {
"HUBSPOT_ACCESS_TOKEN": "$HUBSPOT_ACCESS_TOKEN"
}
}
}
}Test in a sandbox first
For Salesforce: always connect a Developer Edition org or sandbox before production. Run write operations (bulk updates, field changes) against test data first. A single mistaken bulk update on production can affect thousands of records — and CRM field history has limits.
Add IP allowlists for production integrations
Both Salesforce and HubSpot support IP-based access restrictions. If your integration runs from a fixed IP (a server, CI/CD runner, or static office IP), add it to the allowlist on the connected app or private app settings. This prevents token misuse from unexpected locations.
CRM Integration Comparison Table
Side-by-side comparison of all three claude code crm integration approaches across the dimensions that matter for GTM and RevOps teams.
| Dimension | Salesforce MCP | HubSpot Connector | Pipedrive REST API |
|---|---|---|---|
| Setup time | 20–30 min | <10 min | 15–20 min |
| Technical skill needed | Medium (CLI, JSON) | Low (UI-based) | Medium (Python/bash) |
| Tool coverage | 60+ tools, 7 toolsets | Contacts, deals, activities | Full API surface |
| Bulk operations | Yes — Bulk API | Limited | Via custom script |
| Metadata / schema changes | Yes — Metadata toolset | No | Via API calls |
| Auth mechanism | SF CLI credential store | OAuth (HubSpot) | API token (env var) |
| Works in Claude.ai UI | No (CLI only) | Yes | No (CLI only) |
| Sandbox support | Yes | Test accounts only | Dev account |
Which Integration Approach Is Right for You?
The answer depends on your CRM, your team's technical depth, and how you plan to use Claude Code.
Choose Salesforce MCP if:
- Your team runs on Salesforce and needs full SOQL and metadata access
- You have RevOps or engineering capacity to manage CLI-based auth
- You need bulk operations, Apex testing, or custom field deployment via AI
- You are building automated pipelines that run on a schedule or trigger
Choose HubSpot Native Connector if:
- Your team uses HubSpot and you want the fastest possible setup
- Non-technical users need to query CRM data from Claude.ai
- You primarily need read access, activity logging, and basic record creation
- You do not need bulk operations or schema-level changes
Choose Direct REST API if:
- Your CRM is Pipedrive, Close, Attio, or any platform without an MCP server
- You need maximum flexibility over which endpoints Claude can access
- You want to build a custom integration layer that is tightly scoped to your use case
- Your team has basic Python or bash scripting ability
For teams already using Claude Code across their GTM stack — not just CRM — the top GTM MCPs for Claude Code covers the full set of integrations worth stacking alongside your CRM connection.
For teams new to Claude Code in a sales context, the Claude Code for sales teams setup guide covers the adoption and workflow fundamentals before diving into CRM-specific integrations.
Claude Queries Your CRM. SyncGTM Fills What's Missing.
Claude Code CRM integration is most powerful when your contact data is complete. SyncGTM enriches every record with verified emails, phone numbers, firmographics, and buying signals from 50+ providers — automatic sync to Salesforce, HubSpot, and Pipedrive.
Try SyncGTM Free — No Credit Card