services:
pipedrive-mcp-server:
build:
context: .
dockerfile: Dockerfile
container_name: pipedrive-mcp-server
restart: unless-stopped
environment:
# Required: Pipedrive API credentials
- PIPEDRIVE_API_TOKEN=${PIPEDRIVE_API_TOKEN}
- PIPEDRIVE_DOMAIN=${PIPEDRIVE_DOMAIN}
# Optional: JWT authentication
- MCP_JWT_SECRET=${MCP_JWT_SECRET:-}
- MCP_JWT_TOKEN=${MCP_JWT_TOKEN:-}
- MCP_JWT_ALGORITHM=${MCP_JWT_ALGORITHM:-HS256}
- MCP_JWT_AUDIENCE=${MCP_JWT_AUDIENCE:-}
- MCP_JWT_ISSUER=${MCP_JWT_ISSUER:-}
# Optional: Rate limiting configuration
- PIPEDRIVE_RATE_LIMIT_MIN_TIME_MS=${PIPEDRIVE_RATE_LIMIT_MIN_TIME_MS:-250}
- PIPEDRIVE_RATE_LIMIT_MAX_CONCURRENT=${PIPEDRIVE_RATE_LIMIT_MAX_CONCURRENT:-2}
# Transport configuration (use 'sse' for Docker deployments)
- MCP_TRANSPORT=${MCP_TRANSPORT:-sse}
- MCP_PORT=${MCP_PORT:-3000}
- MCP_ENDPOINT=${MCP_ENDPOINT:-/message}
# Node environment
- NODE_ENV=production
# Expose the SSE port
ports:
- "${MCP_PORT:-3000}:${MCP_PORT:-3000}"
# Use stdin/stdout for MCP communication (only needed for stdio transport)
stdin_open: true
tty: true
# Health check
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:${MCP_PORT:-3000}/health", "||", "exit", "1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Logging configuration
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"