pipedrive-mcp

pipedrive-mcp

MCP server for Pipedrive CRM providing 88 tools for full CRUD on deals, persons, organizations, activities, and more, with custom field resolution and safety guards.

Category
Visit Server

README

pipedrive-mcp

A Model Context Protocol (MCP) server for Pipedrive CRM. Provides 88 tools covering deals, persons, organizations, activities, notes, pipelines, products, leads, files, mail, users, filters, custom fields, webhooks, and shortcut tools for common CRM workflows.

Why this exists

We use Pipedrive as our primary CRM at Comma Compliance. We wanted a way for our non-developer team members to interact with Pipedrive through AI assistants - searching contacts, updating deals, logging activities - without needing to learn the API or build custom integrations.

We're big fans of MCP as a protocol. APIs are great for structured integrations, but MCP hits a different sweet spot - self-documenting tools, built-in schema validation, and a natural interface for conversational interaction. It makes internal tools accessible to people who would never write a curl command. This is the first of several MCP servers we plan to open source, alongside an open source MCP server management tool we're building internally (coming soon).

The existing open source Pipedrive MCP servers we evaluated had issues: single-file monoliths, hardcoded field keys, silent pagination truncation, no write support, stale v1-only implementations. So we built this one from scratch with proper modular architecture, full CRUD, custom field resolution by name, and safety guards on destructive operations.

We've been running this internally for several weeks against our production Pipedrive instance. The test suite includes integration tests recorded from real API responses (sanitized for publication).

Features

  • Full CRUD for deals, persons, organizations, activities, notes, products, leads, mail, and webhooks
  • Custom field resolution - reference fields by human-readable name (e.g. {"Tier": "Enterprise"}) instead of API keys
  • Explicit pagination - cursor/offset tokens with no silent truncation
  • Safety guards - destructive operations require explicit confirmation and support dry_run previews
  • Structured errors - Claude-friendly error messages with category, guidance, and retryability
  • Rate limiting - respects Pipedrive's rate limits with automatic backoff
  • v1/v2 API support - uses v2 where available, falls back to v1 where needed

Quick start

git clone https://github.com/comma-compliance/pipedrive-mcp.git
cd pipedrive-mcp
npm install
npm run build

Configuration

Copy .env.example to .env and set your Pipedrive credentials:

PIPEDRIVE_API_TOKEN=your-api-token-here
PIPEDRIVE_COMPANY_DOMAIN=yourcompany

Find your API token in Pipedrive under Settings > Personal preferences > API.

Your company domain is the subdomain in your Pipedrive URL (e.g. yourcompany for yourcompany.pipedrive.com).

Optional settings

Variable Default Description
PIPEDRIVE_REQUEST_TIMEOUT_MS 30000 HTTP request timeout
PIPEDRIVE_DEFAULT_LIMIT 25 Default page size
PIPEDRIVE_MAX_LIMIT 100 Maximum page size
PIPEDRIVE_RATE_LIMIT_GENERAL_PER_2S 8 General rate limit per 2s
PIPEDRIVE_RATE_LIMIT_SEARCH_PER_2S 4 Search rate limit per 2s
PIPEDRIVE_FIELD_CACHE_TTL_MS 300000 Field metadata cache TTL (5 min)
PIPEDRIVE_ENABLE_WRITE_TOOLS true Set false to expose only read tools
LOG_LEVEL info debug, info, warn, error
SENTRY_DSN (none) Sentry DSN to enable error tracking (omit to disable)
SENTRY_ENVIRONMENT production Sentry environment tag
SENTRY_RELEASE (none) Sentry release tag

Usage with Claude Code

Add to your .mcp.json:

{
  "mcpServers": {
    "pipedrive": {
      "type": "stdio",
      "command": "node",
      "args": ["dist/index.js"],
      "cwd": "/path/to/pipedrive-mcp",
      "env": {
        "PIPEDRIVE_API_TOKEN": "your-api-token",
        "PIPEDRIVE_COMPANY_DOMAIN": "yourcompany"
      }
    }
  }
}

Usage with Codex

Create a codex.json or pass the server config when launching Codex:

{
  "mcpServers": {
    "pipedrive": {
      "type": "stdio",
      "command": "node",
      "args": ["dist/index.js"],
      "cwd": "/path/to/pipedrive-mcp",
      "env": {
        "PIPEDRIVE_API_TOKEN": "your-api-token",
        "PIPEDRIVE_COMPANY_DOMAIN": "yourcompany"
      }
    }
  }
}

Or if running via Docker:

{
  "mcpServers": {
    "pipedrive": {
      "type": "stdio",
      "command": "docker",
      "args": ["run", "--rm", "-i", "-e", "PIPEDRIVE_API_TOKEN=your-api-token", "-e", "PIPEDRIVE_COMPANY_DOMAIN=yourcompany", "pipedrive-mcp"]
    }
  }
}

Usage with Docker

docker build -t pipedrive-mcp .
docker run -e PIPEDRIVE_API_TOKEN=xxx -e PIPEDRIVE_COMPANY_DOMAIN=yourcompany pipedrive-mcp

Tools

Deals (8 tools)

pipedrive_deals_list pipedrive_deals_get pipedrive_deals_search pipedrive_deals_summary pipedrive_deals_move_stage pipedrive_deals_create pipedrive_deals_update pipedrive_deals_delete

Persons (7 tools)

pipedrive_persons_list pipedrive_persons_get pipedrive_persons_search pipedrive_persons_create pipedrive_persons_update pipedrive_persons_delete pipedrive_persons_merge

Organizations (7 tools)

pipedrive_organizations_list pipedrive_organizations_get pipedrive_organizations_search pipedrive_organizations_create pipedrive_organizations_update pipedrive_organizations_delete pipedrive_organizations_merge

Activities (7 tools)

pipedrive_activities_list pipedrive_activities_get pipedrive_activities_create pipedrive_activities_update pipedrive_activities_mark_done pipedrive_activities_delete pipedrive_activity_types_list

Notes & Comments (10 tools)

pipedrive_notes_list pipedrive_notes_get pipedrive_notes_create pipedrive_notes_update pipedrive_notes_delete pipedrive_note_comments_list pipedrive_note_comments_get pipedrive_note_comments_create pipedrive_note_comments_update pipedrive_note_comments_delete

Pipelines & Stages (4 tools)

pipedrive_pipelines_list pipedrive_pipelines_get pipedrive_stages_list pipedrive_stages_get

Products (10 tools)

pipedrive_products_list pipedrive_products_get pipedrive_products_create pipedrive_products_update pipedrive_products_delete pipedrive_products_search pipedrive_deal_products_list pipedrive_deal_products_add pipedrive_deal_products_update pipedrive_deal_products_delete

Leads (6 tools)

pipedrive_leads_list pipedrive_leads_get pipedrive_leads_create pipedrive_leads_update pipedrive_leads_delete pipedrive_leads_search

Mail (8 tools)

pipedrive_mail_threads_list pipedrive_mail_threads_get pipedrive_mail_thread_messages_list pipedrive_mail_messages_get pipedrive_mail_threads_update pipedrive_mail_threads_delete pipedrive_deal_mail_messages_list pipedrive_person_mail_messages_list

Read and manage synced email threads and messages from Pipedrive's mailbox. List threads by folder (inbox, drafts, sent, archive), read individual messages with optional body content, link threads to deals or leads, and look up mail associated with a specific deal or person.

Files (3 tools)

pipedrive_files_list pipedrive_files_get pipedrive_files_upload

Users (3 tools)

pipedrive_users_list pipedrive_users_get pipedrive_users_permissions

Filters (3 tools)

pipedrive_filters_list pipedrive_filters_get pipedrive_filters_results

Custom Fields (1 tool)

pipedrive_custom_fields_list

Webhooks (3 tools)

pipedrive_webhooks_list pipedrive_webhooks_create pipedrive_webhooks_delete

Shortcuts (8 tools)

pipedrive_me pipedrive_my_open_deals pipedrive_my_overdue_activities pipedrive_my_upcoming_activities pipedrive_recently_updated pipedrive_my_pipeline_summary pipedrive_stale_deals pipedrive_people_needing_followup

These are opinionated wrappers around the core tools designed for common CRM workflows. They auto-resolve the current user from the API token so you don't need to know your numeric owner ID.

All shortcut tools support an optional as_user parameter for shared API token scenarios (e.g. multiple team members accessing Pipedrive through a single MCP server). Pass a name or email and it resolves against the Pipedrive users list:

{ "name": "pipedrive_my_open_deals", "arguments": { "as_user": "Sasha" } }
{ "name": "pipedrive_my_overdue_activities", "arguments": { "as_user": "sasha@company.com" } }
Tool What it does
pipedrive_me Show current user profile, or resolve a teammate by name/email
pipedrive_my_open_deals Open deals owned by the current user, sorted by recently updated
pipedrive_my_overdue_activities Past-due undone activities
pipedrive_my_upcoming_activities Activities in the next N days (default 7)
pipedrive_recently_updated Deals, persons, or orgs updated in the last N days
pipedrive_my_pipeline_summary Stage-by-stage breakdown with deal counts and total values
pipedrive_stale_deals Open deals not updated in N+ days (default 30)
pipedrive_people_needing_followup Contacts with no next activity scheduled

Custom fields

Reference custom fields by name instead of API key:

{
  "name": "pipedrive_deals_update",
  "arguments": {
    "deal_id": 42,
    "custom_fields_by_name": {
      "Tier": "Enterprise",
      "Expected Revenue": 50000
    }
  }
}

Use pipedrive_custom_fields_list to discover available fields for each entity type.

Safety guards

All destructive operations require explicit confirmation:

  • Delete tools require confirm: "DELETE"
  • Merge tools require confirm: "MERGE"
  • Webhook create/delete require confirm: "YES"

All destructive tools support dry_run: true to preview what would happen without executing.

Set PIPEDRIVE_ENABLE_WRITE_TOOLS=false to disable all write operations entirely.

Development

npm run dev          # Watch mode
npm test             # Run tests
npm run test:watch   # Watch tests
npm run lint         # Type check

Testing

Tests use vitest with nock for HTTP mocking. No live API calls are made during tests.

npm test

Architecture

src/
  index.ts                 # Entry point
  server.ts                # MCP server setup
  config.ts                # Environment variable loading
  logging.ts               # Structured logging
  mcp/                     # MCP protocol helpers
  pipedrive/               # HTTP client, pagination, rate limiting, retries
  services/                # Custom fields, summaries, guards, cache
  schemas/                 # Zod input schemas per entity
  tools/                   # Tool handlers per entity
  presenters/              # Response formatting

Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repo and create a feature branch
  2. npm install && npm run build to verify the build
  3. Make your changes - follow the existing patterns (one file per entity in src/tools/ and src/schemas/)
  4. Add tests for new functionality
  5. npm test to make sure everything passes
  6. npm run lint to verify types
  7. Open a PR with a clear description of what you changed and why

A few ground rules:

  • No @ts-ignore - fix the types properly
  • No hardcoded Pipedrive field keys or option IDs
  • All destructive tools must require explicit confirmation and support dry_run
  • Use native fetch (not axios)
  • Never commit real Pipedrive data - sanitize any test fixtures

License

MIT

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured