pipedrive-mcp-client
v1.2.0
Published
Client library for Pipedrive API with MCP and HTTP support
Maintainers
Readme
Pipedrive API Client
A modern JavaScript client for the Pipedrive API with support for all major Pipedrive resources.
Installation
npm install pipedrive-mcp-clientUsage
Using the Complete Client
import { PipedriveClient } from 'pipedrive-mcp-client';
const client = new PipedriveClient('your-api-token');
// Working with deals
const deals = await client.deals.getDeals({ limit: 10 });
const deal = await client.deals.getDealById(123);
const newDeal = await client.deals.createDeal({
title: 'New Deal',
value: 1000,
currency: 'USD'
});
// Working with persons
const persons = await client.persons.getPersons();
const person = await client.persons.getPersonById(456);
// Working with organizations
const orgs = await client.organizations.getOrganizations();Using Individual Services
import { DealsService } from 'pipedrive-mcp-client/deals';
import { PersonsService } from 'pipedrive-mcp-client/persons';
const dealsService = new DealsService('your-api-token');
const personsService = new PersonsService('your-api-token');
const deals = await dealsService.getDeals();
const persons = await personsService.getPersons();Available Services
deals- Manage dealspersons- Manage persons/contactsorganizations- Manage organizationsnotes- Manage notesactivities- Manage activitiespipelines- Manage pipelinesusers- Manage users
API Documentation
Deals Service
// Get deals with filters
const deals = await client.deals.getDeals({
filter_id: 123,
user_id: 456,
stage_id: 789,
status: 'open',
limit: 100
});
// Get a specific deal
const deal = await client.deals.getDealById(123);
// Create a deal
const newDeal = await client.deals.createDeal({
title: 'New Deal',
value: 1000,
currency: 'USD',
person_id: 456,
org_id: 789
});
// Update a deal
const updatedDeal = await client.deals.updateDeal(123, {
title: 'Updated Deal'
});
// Delete a deal
await client.deals.deleteDeal(123);[Continue with documentation for other services...]
Error Handling
All methods return promises and throw errors when something goes wrong. You should wrap your calls in try-catch blocks:
try {
const deals = await client.deals.getDeals();
} catch (error) {
console.error('Error fetching deals:', error.message);
}License
MIT
