mcp-pipedrive

iamsamuelfraga/mcp-pipedrive

3.2

If you are the rightful owner of mcp-pipedrive and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The Pipedrive MCP Server is a comprehensive Model Context Protocol server that integrates with the Pipedrive CRM API, enabling seamless automation of sales workflows through natural language conversations.

Tools
10
Resources
0
Prompts
0

Pipedrive MCP Server

npm version License: MIT Node Version

The most complete and robust Pipedrive MCP implementation for Claude

A production-ready Model Context Protocol server that provides Claude with comprehensive access to the Pipedrive CRM API. This server enables seamless automation of sales workflows, deal management, contact organization, and activity tracking through natural language conversations.

Features

  • 100+ Tools Across 10 Categories - Complete coverage of Pipedrive's core functionality
  • Advanced Rate Limiting - 10 requests/second with burst capacity up to 100 requests
  • Multi-Level Caching - 5-15 minute TTL for frequently accessed data
  • Retry Logic - Exponential backoff for failed requests (429, 500, 502, 503, 504)
  • Comprehensive Error Handling - Detailed error messages with actionable suggestions
  • Full TypeScript Support - Type-safe schemas and interfaces throughout
  • Zod Validation - Runtime validation for all inputs with helpful error messages
  • MCP Resources - Read-only access to pipelines, custom fields, and user info
  • MCP Prompts - 5 guided workflows for common operations
  • Performance Metrics - Built-in tracking for request duration and success rates
  • Read-Only Mode - Optional safety mode that blocks all write operations
  • Toolset Filtering - Enable/disable specific tool categories as needed

Tool Categories

CategoryToolsDescription
Deals23Complete deal lifecycle management including creation, updates, stage movement, participants, products, and files
Persons12Contact management with custom fields, activities, deals, files, and follower management
Organizations12Company/organization management with relationships to persons, deals, and activities
Activities8Task, call, and meeting scheduling with due dates and completion tracking
Files7File upload, download, management, and remote file linking
Search6Universal search and entity-specific search across deals, persons, organizations, and products
Pipelines8Pipeline and stage management, including stage conversion statistics
Notes5Note creation and management for deals, persons, and organizations
Fields8Custom field discovery and metadata for all entity types
System5Health checks, metrics, user info, currencies, and cache management

Installation

Global Installation

npm install -g @iamsamuelfraga/mcp-pipedrive

Using npx (No Installation Required)

npx -y @iamsamuelfraga/mcp-pipedrive

Configuration

Prerequisites

  1. Get your Pipedrive API token from Settings > API
  2. Have Claude Desktop installed

Claude Desktop Setup

macOS

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "pipedrive": {
      "command": "npx",
      "args": ["-y", "@iamsamuelfraga/mcp-pipedrive"],
      "env": {
        "PIPEDRIVE_API_TOKEN": "your_api_token_here"
      }
    }
  }
}
Windows

Edit %APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "pipedrive": {
      "command": "npx",
      "args": ["-y", "@iamsamuelfraga/mcp-pipedrive"],
      "env": {
        "PIPEDRIVE_API_TOKEN": "your_api_token_here"
      }
    }
  }
}

Environment Variables

VariableRequiredDefaultDescription
PIPEDRIVE_API_TOKENYes-Your Pipedrive API token
PIPEDRIVE_READ_ONLYNofalseEnable read-only mode (blocks all write operations)
PIPEDRIVE_TOOLSETSNodeals,persons,organizations,activitiesComma-separated list of enabled tool categories
LOG_LEVELNoinfoLogging level (debug, info, warn, error)

Advanced Configuration Examples

Read-Only Mode

Perfect for exploratory use or when you want to prevent accidental modifications:

{
  "mcpServers": {
    "pipedrive": {
      "command": "npx",
      "args": ["-y", "@iamsamuelfraga/mcp-pipedrive"],
      "env": {
        "PIPEDRIVE_API_TOKEN": "your_token",
        "PIPEDRIVE_READ_ONLY": "true"
      }
    }
  }
}
Filtered Toolsets

Only enable specific tool categories:

{
  "mcpServers": {
    "pipedrive": {
      "command": "npx",
      "args": ["-y", "@iamsamuelfraga/mcp-pipedrive"],
      "env": {
        "PIPEDRIVE_API_TOKEN": "your_token",
        "PIPEDRIVE_TOOLSETS": "deals,persons,search"
      }
    }
  }
}
Debug Logging

Enable verbose logging for troubleshooting:

{
  "mcpServers": {
    "pipedrive": {
      "command": "npx",
      "args": ["-y", "@iamsamuelfraga/mcp-pipedrive"],
      "env": {
        "PIPEDRIVE_API_TOKEN": "your_token",
        "LOG_LEVEL": "debug"
      }
    }
  }
}

Usage Examples

Example 1: Creating a Deal with Contact

Claude, create a new deal for "Enterprise Software License" worth $50,000.
The contact is John Smith (john@acme.com). Set the expected close date
to the end of next month and add a follow-up call for tomorrow.

Claude will:

  1. Search for or create the person "John Smith"
  2. Create the deal linked to this person
  3. Schedule a call activity for tomorrow
  4. Provide a summary with IDs and next steps

Example 2: Searching for Contacts

Find all contacts at Acme Corporation and show me their recent deals.

Claude will:

  1. Search organizations for "Acme Corporation"
  2. Get all persons associated with that organization
  3. Retrieve deals for each person
  4. Present organized results with totals

Example 3: Managing Activities

Show me all overdue activities for my open deals and reschedule them
to next week.

Claude will:

  1. List all activities with done=false and past due dates
  2. Filter for activities linked to open deals
  3. Update each activity with new dates next week
  4. Provide a summary of rescheduled items

Example 4: Using Custom Fields

Before creating this deal, show me what custom fields are available
for deals and explain what each one means.

Claude will:

  1. Access the pipedrive://custom-fields resource
  2. Extract deal-specific custom fields
  3. Display field names, types, and options
  4. Explain how to use them in deal creation

Example 5: Pipeline Management

Generate a pipeline report showing deal counts and total values for
each stage in my sales pipeline.

Claude will:

  1. Use the pipedrive://pipelines resource
  2. Get deal summaries grouped by stage
  3. Calculate totals and percentages
  4. Format as a readable report

Example 6: Weekly Review Workflow

Run the weekly pipeline review prompt.

Claude will:

  1. Execute the weekly-pipeline-review prompt
  2. Gather all open deals by stage
  3. Calculate metrics (won/lost, approaching close, stale deals)
  4. Generate actionable recommendations

Architecture

Core Components

  • PipedriveClient - HTTP client with rate limiting, caching, and retry logic
  • Rate Limiter - Bottleneck-based limiter (10 req/s, burst capacity)
  • Cache Layer - TTL-based cache with LRU eviction (500 item max)
  • Retry Handler - Exponential backoff for transient failures
  • Metrics Collector - Request tracking and performance monitoring
  • Error Handler - Standardized error formatting with context

Tool Structure

Each tool follows a consistent pattern:

  1. Zod Schema - Input validation with descriptive errors
  2. Description - Detailed usage instructions for the LLM
  3. Handler - Async function that calls PipedriveClient

Resources

Three MCP resources provide read-only reference data:

  • pipedrive://pipelines - All pipelines with stages and deal counts
  • pipedrive://custom-fields - Custom field definitions for all entities
  • pipedrive://current-user - Authenticated user info and permissions

Prompts

Five guided workflows for common operations:

  • create-deal-workflow - Complete deal creation with person and activity
  • sales-qualification - BANT qualification checklist
  • follow-up-sequence - Multi-day activity sequence
  • weekly-pipeline-review - Pipeline health report
  • lost-deal-analysis - Lost deal pattern analysis

Performance

Rate Limiting

  • Default: 10 requests/second (100ms between requests)
  • Burst: 100 token reservoir that refills every minute
  • Auto-retry: 429 errors automatically retry after 5 seconds

Caching Strategy

Data TypeTTLReason
Pipelines10 minPipeline structures change infrequently
Custom Fields15 minField definitions are relatively static
User Info1 minUser data may change during session
List Requests5 minDefault for paginated results

Metrics

The server tracks:

  • Total requests and success rate
  • Average response time
  • Error rate by type
  • Cache hit rate
  • Rate limit events

Access metrics with the system/metrics tool.

API Reference

This MCP server implements the Pipedrive REST API v1. For detailed API documentation, see:

Advanced Usage

Custom Field Discovery

Before creating or updating entities, check available custom fields:

// Access via MCP resource
pipedrive://custom-fields

// Or use field tools
fields/deal-fields
fields/person-fields
fields/org-fields
fields/activity-fields

Error Handling

All tools return structured errors with:

  • Error type (validation, authentication, rate limit, etc.)
  • Detailed message
  • Suggested actions
  • Original API error (if applicable)

Workflow Automation

Chain multiple tools together for complex workflows:

  1. Lead Qualification

    • Search for person
    • Get their deals and activities
    • Create qualification note
    • Update deal stage
  2. Deal Pipeline Movement

    • Get deal details
    • Check custom field requirements
    • Update custom fields
    • Move to next stage
    • Create next activity
  3. Reporting

    • List deals by stage
    • Get deal summaries
    • Calculate metrics
    • Format as markdown

Troubleshooting

See for common issues and solutions.

Quick fixes:

  • Authentication errors: Verify your API token at https://app.pipedrive.com/settings/api
  • Rate limiting: Reduce request frequency or enable caching
  • Validation errors: Check tool input schema and required fields
  • Not seeing tools in Claude: Restart Claude Desktop after config changes

Contributing

We welcome contributions! Please see for guidelines.

Development Setup

# Clone the repository
git clone https://github.com/iamsamuelfraga/mcp-pipedrive.git
cd mcp-pipedrive

# Install dependencies
npm install

# Build the project
npm run build

# Run tests
npm test

# Run with auto-reload during development
npm run dev

Running Tests

# Run all tests
npm test

# Run with coverage
npm run test:coverage

# Run with UI
npm run test:ui

Security

Please see for our security policy and how to report vulnerabilities.

Important: Never commit your API token to version control. Always use environment variables.

License

This project is licensed under the MIT License - see the file for details.

Credits

Inspired by mcp-holded - an excellent MCP server implementation for Holded CRM.

Support

Changelog

See for version history and release notes.

Roadmap

  • Webhook support for real-time updates
  • Bulk operations for mass updates
  • Advanced filtering with complex queries
  • Export/import functionality
  • Integration with other CRMs
  • GraphQL support

Made with dedication by Samuel Fraga