This is a Model Context Protocol (MCP) server that connects to the Pipedrive API v2. It allows you to expose Pipedrive data and functionality to LLM applications like Claude.
- Read-only access to Pipedrive data
- Exposes deals, persons, organizations, and pipelines
- Includes all fields including custom fields
- Predefined prompts for common operations
- Docker support with multi-stage builds
- JWT authentication support
- Built-in rate limiting for API requests
- Advanced deal filtering (by owner, status, date range, value, etc.)
- ngrok integration for public tunnel access
-
Clone this repository
-
Install dependencies:
npm install -
Create a
.envfile in the root directory with your configuration:PIPEDRIVE_API_TOKEN=your_api_token_here PIPEDRIVE_DOMAIN=your-company.pipedrive.com -
Build the project:
npm run build -
Start the server:
npm start
-
Copy
.env.exampleto.envand configure your settings:PIPEDRIVE_API_TOKEN=your_api_token_here PIPEDRIVE_DOMAIN=your-company.pipedrive.com MCP_TRANSPORT=sse # Use SSE transport for Docker MCP_PORT=3000 -
Build and run with Docker Compose:
docker-compose up -d
-
The server will be available at
http://localhost:3000- SSE endpoint:
http://localhost:3000/sse - Health check:
http://localhost:3000/health
- SSE endpoint:
Pull and run the pre-built image from GitHub Container Registry:
For SSE transport (HTTP access):
docker run -d \
-p 3000:3000 \
-e PIPEDRIVE_API_TOKEN=your_api_token_here \
-e PIPEDRIVE_DOMAIN=your-company.pipedrive.com \
-e MCP_TRANSPORT=sse \
-e MCP_PORT=3000 \
ghcr.io/consulteer/pipedrive-mcp-server:mainFor stdio transport (local use):
docker run -i \
-e PIPEDRIVE_API_TOKEN=your_api_token_here \
-e PIPEDRIVE_DOMAIN=your-company.pipedrive.com \
ghcr.io/consulteer/pipedrive-mcp-server:mainAdd the MCP server to your existing application's docker-compose.yml:
services:
# Your existing services...
pipedrive-mcp-server:
image: ghcr.io/consulteer/pipedrive-mcp-server:main
container_name: pipedrive-mcp-server
restart: unless-stopped
ports:
- "3000:3000"
environment:
- PIPEDRIVE_API_TOKEN=${PIPEDRIVE_API_TOKEN}
- PIPEDRIVE_DOMAIN=${PIPEDRIVE_DOMAIN}
- MCP_TRANSPORT=sse
- MCP_PORT=3000
- PIPEDRIVE_RATE_LIMIT_MIN_TIME_MS=${PIPEDRIVE_RATE_LIMIT_MIN_TIME_MS:-250}
- PIPEDRIVE_RATE_LIMIT_MAX_CONCURRENT=${PIPEDRIVE_RATE_LIMIT_MAX_CONCURRENT:-2}
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/health", "||", "exit", "1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"Then add the required environment variables to your .env file.
Required:
PIPEDRIVE_API_TOKEN- Your Pipedrive API tokenPIPEDRIVE_DOMAIN- Your Pipedrive domain (e.g.,your-company.pipedrive.com)
Optional (JWT Authentication):
MCP_JWT_SECRET- JWT secret for authenticationMCP_JWT_TOKEN- JWT token for authenticationMCP_JWT_ALGORITHM- JWT algorithm (default: HS256)MCP_JWT_AUDIENCE- JWT audienceMCP_JWT_ISSUER- JWT issuer
When JWT authentication is enabled, all SSE requests (/sse and the message endpoint) must include an Authorization: Bearer <token> header signed with the configured secret.
Optional (Rate Limiting):
PIPEDRIVE_RATE_LIMIT_MIN_TIME_MS- Minimum time between requests in milliseconds (default: 250)PIPEDRIVE_RATE_LIMIT_MAX_CONCURRENT- Maximum concurrent requests (default: 2)
Optional (Transport Configuration):
MCP_TRANSPORT- Transport type:stdio(default, for local use) orsse(for Docker/HTTP access)MCP_PORT- Port for SSE transport (default: 3000, only used whenMCP_TRANSPORT=sse)MCP_ENDPOINT- Message endpoint path for SSE (default: /message, only used whenMCP_TRANSPORT=sse)
Optional (ngrok Configuration):
MCP_NGROK_ENABLED- Enable ngrok tunnel to expose server publicly (default: false, only used whenMCP_TRANSPORT=sse)MCP_NGROK_AUTHTOKEN- ngrok authtoken (required ifMCP_NGROK_ENABLED=true). Get your token from ngrok dashboard
When you need to expose your MCP server publicly (e.g., for testing with remote clients), you can use ngrok:
- Sign up for a free ngrok account at https://ngrok.com/
- Get your authtoken from https://dashboard.ngrok.com/get-started/your-authtoken
- Add to your
.envfile:MCP_TRANSPORT=sse MCP_NGROK_ENABLED=true MCP_NGROK_AUTHTOKEN=your_ngrok_authtoken_here
- Start the server with
npm run devornpm start - The console will display your public ngrok URL:
🌐 ngrok tunnel established! Public URL: https://abc123.ngrok.io SSE endpoint: https://abc123.ngrok.io/sse Message endpoint: https://abc123.ngrok.io/message Health check: https://abc123.ngrok.io/health
To use this server with Claude for Desktop:
- Configure Claude for Desktop by editing your
claude_desktop_config.json:
{
"mcpServers": {
"pipedrive": {
"command": "node",
"args": ["/path/to/pipedrive-mcp-server/build/index.js"],
"env": {
"PIPEDRIVE_API_TOKEN": "your_api_token_here",
"PIPEDRIVE_DOMAIN": "your-company.pipedrive.com"
}
}
}
}- Restart Claude for Desktop
- In the Claude application, you should now see the Pipedrive tools available
get-users: Get all users/owners from Pipedrive to identify owner IDs for filteringget-deals: Get deals with flexible filtering options (search by title, date range, owner, stage, status, value range, etc.)get-deal: Get a specific deal by ID (including custom fields)get-deal-notes: Get detailed notes and custom booking details for a specific dealsearch-deals: Search deals by termget-persons: Get all persons from Pipedrive (including custom fields)get-person: Get a specific person by ID (including custom fields)search-persons: Search persons by termget-organizations: Get all organizations from Pipedrive (including custom fields)get-organization: Get a specific organization by ID (including custom fields)search-organizations: Search organizations by termget-pipelines: Get all pipelines from Pipedriveget-pipeline: Get a specific pipeline by IDget-stages: Get all stages from all pipelinessearch-leads: Search leads by termsearch-all: Search across all item types (deals, persons, organizations, etc.)
list-all-deals: List all deals in Pipedrivelist-all-persons: List all persons in Pipedrivelist-all-pipelines: List all pipelines in Pipedriveanalyze-deals: Analyze deals by stageanalyze-contacts: Analyze contacts by organizationanalyze-leads: Analyze leads by statuscompare-pipelines: Compare different pipelines and their stagesfind-high-value-deals: Find high-value deals
This repository is based on the original work of Will Dent and Juho Koskela. The original repository can be found at https://github.com/WillDent/pipedrive-mcp-server.
MIT