Strategy
How to Use Claude Code for CRM Data Cleanup(Without a Developer)
A practitioner's guide to using Claude Code for CRM data cleanup in HubSpot live through MCP, with a CSV fallback for destructive bulk merges.
Your HubSpot instance is full of duplicate contacts, company names spelled four different ways, and properties nobody remembers creating. You know it needs fixing. Asking engineering to write cleanup scripts is a non-starter, because they're busy and the queue is long.
Claude Code changes the math on this. It's Anthropic's agentic coding tool, and it can handle CRM data cleanup directly against HubSpot, without you writing code, without a developer, and most of the time without exporting a single CSV. You describe the cleanup in plain English. Claude Code searches HubSpot, shows you what it would change, and updates the records on your approval.
This guide covers what Claude Code is, how it cleans CRM data live through the HubSpot MCP, how to set it up, a worked example you can run today, and the one case where a CSV is still the right tool.
What Claude Code actually is
Claude Code gets confused with the chat box at claude.ai. They're different products. The chat box answers questions in a browser tab. Claude Code is an agentic tool that runs on your own computer and does work for you. You can use it in a terminal, in a desktop app, in your browser at claude.ai/code, or inside an editor like VS Code.
The piece that matters for CRM work is the connection layer. Claude Code talks to outside systems through MCP, short for Model Context Protocol. HubSpot offers an MCP server, and once it's connected, Claude Code can search and update records in HubSpot directly. The same way a HubSpot user clicks around the UI, Claude Code reads through the API, with the permissions of the account you signed in with.
It also keeps context in a project file, so it remembers your setup between sessions instead of starting cold every time. And it runs under a paid Claude plan, the same kind of account that powers your everyday Claude usage.
How Claude Code handles CRM data cleanup: live or via CSV
The default workflow is live, through MCP. You don't export anything. You tell Claude Code what to fix. It searches HubSpot, shows you what it found, and updates the records on your approval. Most cleanup jobs belong here: standardising fields, filling blanks, fixing formatting, tagging records, normalising job titles.
CSV mode is still the right answer for one specific case: destructive bulk merges, where you want the entire result in a single file you can review before anything touches the CRM. The clearest example is large-scale deduplication, where HubSpot's contact merge is hard to undo and a mistake hits many records at once.
Approach | Use when | What it looks like |
|---|---|---|
Live via MCP | Standardising fields, filling blanks, fixing formats, batch updates | Claude Code reads from HubSpot, proposes the change, you approve, it updates records in batches |
CSV fallback | Destructive bulk merges, especially deduplication at scale | Export from HubSpot, Claude Code writes a cleaned file, you review, you re-import with "Update existing records" |
Both approaches keep a review step. The difference is granularity. Live mode reviews changes batch by batch, with the option to stop and adjust mid-run. CSV mode reviews the entire result in one file before a single record ships back into HubSpot.
Setting up Claude Code for HubSpot cleanup
Setup is a one-time job. After this, every cleanup is a conversation.
1. Install Claude Code. The desktop app is the simplest route for a non-technical user. If you're comfortable in a terminal, `npm install -g @anthropic-ai/claude-code` works too. Sign in with a paid Claude plan.
2. Connect the HubSpot MCP server. HubSpot offers an MCP server, and Claude Code adds it through a single connector setup. You authenticate with your own HubSpot login, so Claude Code inherits exactly the permissions you already have. Nothing more, nothing less.
3. Open a working folder for cleanup notes and the occasional CSV. Keeping changes documented in one place makes it easier to track what was cleaned, when, and by whom.
Step two is the one that unlocks everything. Without the HubSpot MCP, you're stuck doing every job in CSV mode. With it, most jobs never need a CSV at all.
A worked example: standardising company names in HubSpot
Inconsistent company naming is the most common mess at the top of HubSpot. "IBM Corp", "IBM Corporation", and "IBM" all show up as different accounts. Reports break. Routing breaks. Account-based outbound becomes guesswork. Here's the full workflow, live through MCP.
Step 1: Describe the job
Open Claude Code with the HubSpot MCP connected, and describe what needs fixing in plain English:
```
Find every HubSpot company where the name ends in "Corp",
"Corporation", "Inc.", "Inc", "LLC", or "Ltd". For each one,
propose a cleaned name without the suffix. Show me the first
20 before you change anything.
```
Step 2: Review what Claude Code found
Claude Code searches HubSpot through the MCP, finds the matching companies, and shows you the proposed changes as a table: current name, proposed name, record ID. You eyeball the first 20. If something looks off, for example "Adobe Inc." should arguably stay as "Adobe Inc." because there are multiple Adobes, you tell Claude Code in plain English and it adjusts the rule.
Step 3: Approve in batches
Once the proposed changes look right, you tell Claude Code to apply them. It updates records in batches and reports progress as it goes. If anything errors, it stops, tells you which records failed and why, and waits for your call on what to do next.
Step 4: Spot check in HubSpot
Open HubSpot, search a handful of the updated companies, and confirm the names look right. Because the work happened live through MCP rather than through a re-import, the change is already in front of you, no further import step needed.
The same four steps cover other live jobs. Filling blank lifecycle stages. Fixing phone number formats. Tagging contacts missing a required property. Normalising job titles for segmentation. The instruction changes. The workflow doesn't.
When CSV mode is still the right call
Large-scale deduplication is the case to be careful about. HubSpot's contact merge is hard to reverse, and getting it wrong on thousands of records is a problem the live workflow can't undo cleanly.
The CSV fallback handles this in four steps:
1. Export the affected contacts from HubSpot with email, names, company, create date, and last activity date.
2. Tell Claude Code which row to keep per duplicate (usually the most recent last activity date) and to produce a cleaned file with one row per unique email.
3. Review the cleaned file as a whole. Confirm the row count dropped as expected and the right versions survived.
4. Re-import into HubSpot with "Update existing records" and email as the unique identifier.
You still don't write code. You still don't pull in a developer. You just get the safety of reviewing the entire result before anything is committed.
Where Claude Code stops being the right tool
Claude Code is strong for one-time and ad hoc cleanup. It is not the tool for everything.
If you're cleaning the same dataset every month, that's recurring work, and it belongs in a scheduled n8n workflow or a HubSpot workflow. If your cleanup needs live external data, for example enriching blank company fields from a current data source, that's an enrichment job and a tool like Clay is the better fit. Claude Code is for the job you do once, or the job too messy to script in advance.
Tool | Best for | Not for |
|---|---|---|
Claude Code | One-time bulk cleanup, deduplication, exploratory fixes | Scheduled recurring cleanup |
HubSpot workflows | Ongoing property updates, triggered if/then logic | Complex transformations on large exports |
n8n | Multi-step automations, API integrations on a schedule | One-off fixes a CSV handles faster |
Two more limits worth knowing. Large jobs take longer to process, so for a very large contact base it's worth filtering the work down to the segment you actually need to clean. And live mode acts on live data, so for destructive bulk operations like merges, stay in CSV mode where you get a full-result review before anything ships.
FAQ
Do I need a paid Claude account to use Claude Code?
Yes. Claude Code runs under a paid Claude plan, or on Anthropic API billing. There's no free-tier access for it.
Does Claude Code work with HubSpot live, or only with CSV files?
Both, and live is the default. With the HubSpot MCP server connected, Claude Code searches and updates HubSpot records directly with no export required. CSV is the fallback, mainly for destructive bulk merges where you want to review the entire result before anything is re-imported.
Is Claude Code safe for sensitive CRM data?
Claude Code runs locally and acts only with the permissions you give it. In live mode, it uses your existing HubSpot login, so it can't reach anything you couldn't already reach yourself. For regulated data such as GDPR or HIPAA records, review Anthropic's data handling terms and redact fields you don't need before you start.
Can I use Claude Code for Salesforce or other CRMs?
Yes. For live use it depends on whether an MCP server exists for that system. HubSpot and Salesforce both have options. For everything else, a CSV export works the same way it does for HubSpot.
Partner UP works with GTM and RevOps teams on CRM data cleanup, HubSpot architecture, and workflow automation. If you're spending more time fixing your data than using it, reach out at hello@partneruphq.com or book a call at calendly.com/eleilademir.