Table of contents

Thousands of companies trust Merge to accelerate AI from PoC to production.
Get a demo

How to connect a Pipedrive MCP with Cursor (4 steps)

Jon Gitlin
Senior Content Marketing Manager
at Merge

The moment you start building something in Cursor that integrates with Pipedrive, whether it's a deal sync, a reporting job, or a tool that creates activities from another system, you need details that only live in your Pipedrive account.

What are the custom field keys on a deal, given that they're opaque hashes rather than readable names? Which stage IDs belong to which pipeline? What does a person record actually return?

Without the MCP connection, answering those questions means leaving the editor, authenticating against Pipedrive's API separately, running test calls, and pasting responses back into the session where the integration code is being written.

To help your developers inspect Pipedrive's data model and query real records without leaving Cursor, we'll show you how to connect Pipedrive with Merge Agent Handler's Pipedrive MCP server.

How it works

Merge Agent Handler connects Cursor to the Pipedrive API through the Merge CLI.

You install the CLI, authenticate once, and run a single setup command from your project root.

That command writes a ## Merge CLI section to the project's .cursorrules file, which tells Cursor's agent when to call merge search-tools and merge execute-tool to reach Pipedrive.

Once connected, Merge handles your Pipedrive API token storage and refresh so you never store credentials locally or rewire auth when a token changes.

Related: How to use the Pipedrive MCP in Claude Code

Prerequisites

Before getting started, you'll need the following:

  • A Merge Agent Handler account
  • Cursor installed
  • pipx installed (run pipx --version to confirm, or install via pip install pipx)
  • A Pipedrive account with API access to the company data you want to query

If you want to connect Merge Agent Handler's Pipedrive MCP with internal or customer-facing agentic products, you can follow the steps in our docs.

1. Install the Merge CLI

Run the following to install the Merge CLI: pipx install merge-api

Verify your installation: merge --version

2. Log in to Merge

Authenticate the CLI with your Merge Agent Handler account: merge login

This links the CLI to your account so it can make authorized requests to Pipedrive on your behalf.

3. Connect the CLI to Cursor

Run the following from the root of the project where you want to use Merge tools:

merge setup cursor

This writes a ## Merge CLI section to .cursorrules so Cursor knows to use the CLI for third-party services. The command is idempotent, safe to re-run if you need to reset.

Related: The steps for connecting a Pipedrive MCP with Codex

4. Authenticate Pipedrive

Open a Cursor chat in your project and try a prompt like:

Fetch the custom field definitions and a sample deal for my account so I can write the field-mapping code with the correct keys.

The first time you invoke a Pipedrive tool, a Magic Link will appear to complete connector authentication.

{{this-blog-only-cta}}

Pipedrive MCP FAQ

In case you have more questions on setting up and using the Pipedrive MCP in Cursor, we've addressed several more commonly-asked questions below.

What can you do once the Pipedrive MCP is connected to Cursor?

With Pipedrive connected, Cursor can:

  • Fetch custom field keys before writing mapping code: retrieve the hashed custom field identifiers and their definitions so the field-mapping you write resolves to the keys your account actually uses, not readable names that don't exist in the API
  • Inspect a deal object's JSON before writing a parser: pull a real deal to see the exact field set and nesting so the parsing or transformation code you write matches what Pipedrive returns
  • Look up pipeline and stage IDs before writing transition logic: fetch the real pipeline and stage IDs so the conditionals and endpoint parameters you write reference identifiers that resolve in your account
  • Check a person or organization record shape before writing the interface: retrieve a real record so the type or model you write captures the fields and formats Pipedrive sends
  • Validate activity field formats before writing filter logic: pull sample activities so the filter expressions and date handling you write match the actual field names and value formats
  • Confirm endpoint parameters before writing API call code: query the relevant objects so the query parameters and payload structure you write are correctly formed from the first request

Why use Merge Agent Handler vs. a self-hosted Pipedrive MCP server?

You can connect directly to Pipedrive's API using an API token. The REST API is well-documented, token generation is quick, and for a single developer building against their own account the setup is fast.

The access control problem appears when you scale beyond one developer or one agent.

A Pipedrive token carries the full permissions of the account that generated it, so sharing it across agents or teammates means every agent operates with that same reach, with no way to restrict which operations a given agent can call. Rotating the token means updating every system that holds it at once.

Merge Agent Handler handles Pipedrive authentication centrally.

You define exactly which Pipedrive operations each agent can call: an agent that inspects deal and field structure for code generation can read records without reaching write operations like creating deals or moving stages. Every call is logged with the timestamp, tool, and inputs, so you have a full record of what each agent read or changed.

For teams running multiple agents against a shared Pipedrive account, that combination of scoped access and central logging is the difference between a controlled deployment and a shared credential problem.

Why connect Pipedrive to Cursor?

Pipedrive's API data, custom field keys, deal object structure, pipeline and stage IDs, activity formats, isn't something you can accurately reconstruct from documentation alone.

These values are account-specific: custom field keys are opaque hashes, stage IDs are integers unique to your pipelines, and the field set on a deal reflects how your team has configured it.

Connecting Pipedrive to Cursor puts that discovery step inside the editor.

When you're writing a sync and need the real custom field keys, you fetch them. When you're writing stage-transition logic and need the stage IDs, you query the pipeline. When you're writing a parser and need the deal object shape, you pull a sample.

The data that makes the integration code correct stays in the same session where the code is being written, instead of forcing a separate API exploration phase before development can start.

Can I use Merge Agent Handler's Pipedrive MCP with my employees?

Yes, Agent Handler for Employees is built to help organizations provision, secure, and govern how employees connect AI tools like Cursor to operational systems like Pipedrive.

Common patterns include:

  • Provisioning and access control via SCIM with identity providers like Okta and Microsoft Entra ID, so IT can manage which Pipedrive accounts and data types an employee's agent can reach by role or team
  • DLP and policy enforcement on tool calls, so admins can block queries that would return sensitive contact or deal data before results reach the editor session
  • User-level audit logging so security and IT teams can review which deals, contacts, and activities were accessed, by which employee identity, and when

The result is that employees can use the Pipedrive MCP to write syncs against real deal objects, build reporting features grounded in actual activity data, and write field-mapping code that resolves real custom field keys, and more, while IT keeps centralized control over which data each agent can reach.

Jon Gitlin
Senior Content Marketing Manager
@Merge

Jon Gitlin is the Managing Editor of Merge's blog. He has several years of experience in the integration and automation space; before Merge, he worked at Workato, an integration platform as a service (iPaaS) solution, where he also managed the company's blog. In his free time he loves to watch soccer matches, go on long runs in parks, and explore local restaurants.

Read more

How our product designer uses AI to move at engineering speed

AI

Agent Handler’s Quartr connector is live! Here's how your AI can securely use it 

Company

How Merge activates institutional knowledge with Agent Handler’s Notion connector 

AI

Subscribe to the Merge Blog

Get stories from Merge straight to your inbox

Subscribe

Connect Cursor to thousands of tools with Merge Agent Handler

Use Merge Agent Handler’s 150+ connectors (including Pipedrive) to power reliable, secure, and powerful agents.

Get started for free
But Merge isn’t just a Unified 
API product. Merge is an integration platform to also manage customer integrations.  gradient text
But Merge isn’t just a Unified 
API product. Merge is an integration platform to also manage customer integrations.  gradient text
But Merge isn’t just a Unified 
API product. Merge is an integration platform to also manage customer integrations.  gradient text
But Merge isn’t just a Unified 
API product. Merge is an integration platform to also manage customer integrations.  gradient text