I Moved Our Pipedrive into Our Own CRM in One Night and Connected It to Claude over MCP

Our sales team at Hiretop used Pipedrive for about eight years, and we liked it. We wanted Claude to read and change the CRM directly, so a rep could ask “which of my deals have no next step?” and get the answer from the real data, or say “add a task to call Acme tomorrow at 11” and have it done.
So one night I copied our Pipedrive into a CRM we built ourselves, ZeroEntry, and connected it to Claude. It now holds our real data: 5,212 deals and 5,200 people.
The stack
- Cloudflare Workers for the server, D1 (SQLite) for the data, KV for OAuth state.
- A plain JavaScript front end with no build step.
- An MCP server at
/mcpon the same Worker, with OAuth from@cloudflare/workers-oauth-provider, so it can be added in Claude as a custom connector. - Cloudflare Access in front of the app. The MCP, token, register and
.well-knownpaths bypass Access, because Claude has to reach them before anyone signs in.
Moving the data: three scripts
1. The core records, from CSV
Pipedrive exports organizations, people and deals as CSV. The first script turns them into one SQL file that you run with wrangler d1 execute, first --local, then --remote.
It keeps the Pipedrive IDs as the CRM IDs, so companies, people and deals stay linked without a lookup table. It keeps created and stage change dates, maps Won and Lost to the matching stages and carries over the lost reason. An owners.json file maps Pipedrive owner names to CRM users. Leads from people who left go to someone else and keep a “Pipedrive owner: name” note. The script refuses to run on a database that already has records.
2. The history, from the API
Activities, notes and emails are not in the CSV export, so the second script reads them from the Pipedrive API. Activities become tasks: open ones are the next steps, done ones show in the timeline. Each item attaches to the deal if there is one, otherwise to the person, otherwise to the company. It is safe to run twice: tasks dedupe on the Pipedrive ID, emails on the message ID, notes on record, time and text. You need an admin’s API token, because other users’ activities are only visible to admins.
3. Deals created after the move
The team kept working while I tested, so a third script brings in deals created in Pipedrive later. By then the IDs no longer match, so it matches by content: a company by name, a person by LinkedIn link or else by name, a deal by title and creation time.
The import also turned up something we had not noticed: 105 groups of duplicate people, 94 of them with the same LinkedIn profile. Usually it was one person entered again each time they changed jobs, so their history was split across records.
Cleaning up eight years of data
A straight copy also brings over eight years of clutter, so I cleaned it up in the same pass:
- Leads with no activity for more than 180 days went to a Long term stage. That was 380 deals.
- Tasks overdue by more than 90 days, or sitting on deals that were already won or lost, were marked done. That was 190 tasks.
- A lead now counts as rotting after 45 days without activity.
- The lost reasons list is the team’s own (No response, No need, Not interested and so on), not a generic one.
Without that, the first thing Claude would have said about “my deals with no next step” was a list of people we stopped talking to years ago.
Connecting it to Claude
The MCP server has 14 tools:
search, get_deal, list_deals, create_deal, update_deal, upsert_contact, upsert_company, add_note, create_task, list_tasks, complete_task, log_email, pipeline_summary, list_linkedin_accounts.
In Claude you add it under Settings, Connectors, Add custom connector, and sign in. Claude then works in the CRM as you, with your role, and every change shows in the record’s history under your name.
Claude reads mail and calendar with its own Gmail and Google Calendar connectors and writes the result into the CRM. Emails are matched by message ID and calendar events by event ID, so a daily run does not create duplicates.
Things I ask it during the day look like this:
- “Which of my deals have no next step?”
- “Add a task to call Acme tomorrow at 11.”
- “Log my last email from Maria to her deal.”
LinkedIn conversations, without touching LinkedIn
Our team writes to leads from 15 LinkedIn profiles, and one SDR runs two of them. Every deal and task keeps the profile the conversation runs from, which is what list_linkedin_accounts is for.
LinkedIn’s User Agreement does not allow bots, scrapers or extensions that automate the site, so nothing here runs inside LinkedIn. The profile owner downloads the export LinkedIn gives every member (Settings & Privacy, Data privacy, Get a copy of your data), and Claude turns messages.csv into deals with the person, the company, a summary of the conversation and a follow-up task. In November 2026 we brought in 408 deals this way from four profiles.
Lead scoring
Claude also scores each deal from 0 to 9. It reads the history in the CRM, then searches the web for fresh signals: open engineering roles and when they were posted, funding, headcount, HQ country, layoffs. A role from the last 60 days or a round from the last 90 adds points; older ones add nothing. The rules live in the CRM settings as a Claude skill, so an admin can change them for a different market. In one week of November 2026 it scored 31 new deals: one maybe, five with open engineering roles, three agencies, and the rest old conversations with nothing fresh behind them.
Calls
Claude Meetings, which Anthropic launched in beta on 12 November, covers internal Google Meet calls. On Team plans it only takes notes when someone from outside the company joins, and on Enterprise it stays out of those calls unless an owner allows them. I wrote up the details here: what Claude Meetings is.
Our client calls go through Realtimer, the call assistant we make. It runs on your computer, so no bot joins the meeting. On the Pro plan it saves the text of each call, never the audio, and Claude reads it through the Realtimer connector. When you ask “read my call with Northwind and update the deal”, Claude adds a summary note, turns the agreed next steps into dated tasks and moves the deal if the stage changed.
Making it fast on D1
I measured every change before and after:
- A deal page used to need two rounds of requests. Now one request returns the deal, the person, the company, the tasks and the history together, in about 0.16 s.
- The first contacts list counted each person’s deals and last contact row by row. On 5,200 people that meant reading about 4 million rows for one page. It now reads the people first and fetches their numbers in one grouped query.
- The Won and Lost screen used to load every closed deal at once: 2.5 MB and 380 ms. The first page with totals is now about 166 KB and 154 ms.
- The server looked up who you are on every call, about 120 ms. It now keeps that for a minute, and the same call takes about 41 ms.
- Pages you have seen open from memory, then refresh in the background and redraw only if something changed. Loading also starts when the mouse rests on a deal or a person.
The cache gave us one bug. We added Undo, with 8 seconds to take a change back, and in testing I moved a deal to the next stage and pressed Undo at once. The database had the old stage again, but the page still showed the new one: a request that started before the Undo finished after it and wrote the old page into the cache. Now every change clears the cache when it starts and again when it finishes, and a request that started before a change can no longer write to the cache. That bug is also why the project has tests that run in a real Chrome: 39 browser scenarios and 160 server checks.
Two things I’d tell anyone doing this on D1
- The D1 free plan allows 50 queries per request, so batch your writes.
- Change the schema only with new numbered migrations. Never edit one that already ran.
Code
The repository is aryzh/zeroentry. The code is not public yet. It will be released under the MIT license. I also timed ZeroEntry against Pipedrive on the same laptop, and the numbers are in this Medium post.
If you have moved off Pipedrive or HubSpot, I’d like to hear how you handled the activity history: hello@realtimer.ai.