rafaeljegundo/pipedrive-mcp-server
If you are the rightful owner of pipedrive-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server that provides comprehensive access to Pipedrive CRM data, enabling users to fetch deals, activities, pipeline statistics, and gain AI-powered insights about their sales pipeline.
Pipedrive MCP Server
A Model Context Protocol (MCP) server that provides comprehensive access to Pipedrive CRM data. Fetch deals, activities, pipeline statistics, and get AI-powered insights about your sales pipeline.
Features
- 🔍 Deal Management - Fetch and filter deals by pipeline, stage, owner, and status
- 📊 Pipeline Analytics - Get comprehensive statistics and insights about your pipelines
- 📋 Activity Tracking - Access activities, tasks, and next steps for deals
- 🤖 AI Analysis (Optional) - Get actionable insights about deal health and priorities
- 🔐 Secure - API credentials stored safely in environment variables
Installation
- Clone or download this repository:
git clone https://github.com/yourusername/pipedrive-mcp.git
cd pipedrive-mcp
- Install dependencies:
npm install
- Set up your environment variables:
cp .env.example .env
- Edit
.env
with your Pipedrive API token:
PIPEDRIVE_API_TOKEN=your_pipedrive_api_token_here
# Optional: For AI analysis features
OPENAI_API_KEY=your_openai_api_key_here
Getting Your Pipedrive API Token
- Log into your Pipedrive account
- Go to Settings & Privacy → Personal Preferences → API
- Copy your personal API token
Configuration for Claude Desktop
Add this server to your Claude Desktop configuration:
macOS
Edit ~/Library/Application Support/Claude/claude_desktop_config.json
:
Windows
Edit %APPDATA%\Claude\claude_desktop_config.json
:
Add the following to the mcpServers
section:
{
"mcpServers": {
"pipedrive": {
"command": "node",
"args": ["/absolute/path/to/pipedrive-mcp/src/index.js"],
"env": {
"PIPEDRIVE_API_TOKEN": "your_token_here"
}
}
}
}
Available Tools
pipedrive_get_deals
Fetch deals with various filters.
Parameters:
status
- Deal status: open, won, lost, deleted, all_not_deleted (default: open)pipeline_id
- Pipeline ID to filter bystage_id
- Stage ID to filter byuser_id
- Owner ID to filter byfilter_id
- Use a predefined filterlimit
- Number of deals to return (max 500, default: 100)sort
- Sort field and direction (e.g., "value DESC")
pipedrive_get_deal
Get detailed information about a specific deal.
Parameters:
deal_id
- The ID of the deal (required)
pipedrive_get_activities
Fetch activities (tasks, calls, meetings, etc.).
Parameters:
deal_id
- Filter by deal IDuser_id
- Filter by user IDtype
- Activity status: all, done, undone (default: all)limit
- Number of activities to return (default: 100)
pipedrive_get_pipelines
Get list of all pipelines in your Pipedrive account.
pipedrive_get_stages
Get stages for a specific pipeline.
Parameters:
pipeline_id
- Pipeline ID (defaults to pipeline 1)
pipedrive_get_pipeline_stats
Get comprehensive statistics for a pipeline including:
- Total deals and value
- Breakdown by stage and owner
- Activity metrics
- Deal probability analysis
Parameters:
pipeline_id
- Pipeline ID to analyze
pipedrive_analyze_deals
AI-powered analysis of deals for actionable insights (requires OpenAI API key).
Parameters:
pipeline_id
- Pipeline to analyzestage_id
- Specific stage to analyzeuser_id
- Analyze deals for specific ownerlimit
- Maximum deals to analyze (default: 50)model
- AI model to use (default: gpt-4o-mini)
Usage Examples
Once configured in Claude Desktop, you can ask Claude:
- "Show me all open deals in pipeline 1"
- "What deals need immediate attention?"
- "Get activities for deal #123"
- "Show pipeline statistics and identify bottlenecks"
- "Which deals are at risk of stalling?"
- "What are the next steps for high-value deals?"
Environment Variables
Variable | Required | Description |
---|---|---|
PIPEDRIVE_API_TOKEN | Yes | Your Pipedrive API token |
PIPEDRIVE_BASE_URL | No | Custom Pipedrive domain (default: https://api.pipedrive.com) |
DEFAULT_PIPELINE_ID | No | Default pipeline ID when not specified (default: 1) |
OPENAI_API_KEY | No | OpenAI API key for AI analysis features |
OPENAI_BASE_URL | No | Custom OpenAI-compatible endpoint |
Development
Run the server locally for testing:
npm start
Run with file watching for development:
npm run dev
Troubleshooting
"Pipedrive API error"
- Check that your API token is valid
- Ensure you have access to the requested resources
- Verify pipeline and stage IDs exist
AI analysis not working
- Ensure
OPENAI_API_KEY
is set in your environment - Check that you have API credits available
- Try a smaller
limit
parameter to reduce token usage
No deals returned
- Verify the pipeline_id exists (use
pipedrive_get_pipelines
first) - Check that you have permission to view deals in that pipeline
- Try removing filters to see all available deals
Security Notes
- Never commit your
.env
file or expose API tokens - Use environment variables or secure credential storage
- The server only has read access to Pipedrive data
- AI analysis is optional and processed locally
License
MIT
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.