SalesDrive API
TypeScript client and MCP server for SalesDrive CRM API.

Packages
| Package | Description | NPM | | ------------------------------------------------------------------------------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | @dannychirkov/salesdrive-api-client | TypeScript API client |  | | @dannychirkov/salesdrive-transport-fetch | Fetch-based HTTP transport |  | | @dannychirkov/salesdrive-mcp-server | MCP server for AI assistants |  |
Quick Start
Using the API Client
npm install @dannychirkov/salesdrive-api-client @dannychirkov/salesdrive-transport-fetch
import { createClient, orderService, referenceService } from '@dannychirkov/salesdrive-api-client';
import { createFetchTransport } from '@dannychirkov/salesdrive-transport-fetch';
// Create transport
const transport = createFetchTransport({
apiKey: 'your-api-key',
baseUrl: 'https://your-account.salesdrive.me',
});
// Create client with services
const client = createClient({
transport,
apiKey: 'your-api-key',
baseUrl: 'https://your-account.salesdrive.me',
})
.extend(orderService)
.extend(referenceService);
// Use the client
const orders = await client.orders.list({ limit: 10 });
console.log(orders.data);
const statuses = await client.reference.getStatuses();
console.log(statuses.data);
Using with Claude (MCP Server)
Add to your Claude Desktop configuration (~/.config/claude/mcp.json or equivalent):
{
"mcpServers": {
"salesdrive": {
"command": "npx",
"args": ["-y", "@dannychirkov/salesdrive-mcp-server"],
"env": {
"SALESDRIVE_API_KEY": "your-api-key",
"SALESDRIVE_BASE_URL": "https://your-account.salesdrive.me"
}
}
}
}
Now you can ask Claude:
- "Show me the last 10 orders"
- "Create a new order for customer John Doe"
- "What payment methods are available?"
- "Update order #123 status to completed"
Features
- Full TypeScript Support - Complete type definitions for all API endpoints
- Plugin Architecture - Only import the services you need
- Transport Agnostic - Use fetch, axios, or your own HTTP client
- MCP Integration - Ready-to-use server for AI assistants
- Rate Limit Handling - Built-in retry logic for rate limits
API Coverage
| Feature | Client | MCP | | ----------------------------- | ------ | --- | | Orders (create, update, list) | ✅ | ✅ | | Products (update, delete) | ✅ | ✅ | | Categories (update, delete) | ✅ | ✅ | | Payments (add, list) | ✅ | ✅ | | Payment Methods | ✅ | ✅ | | Delivery Methods | ✅ | ✅ | | Order Statuses | ✅ | ✅ | | Currency Rates | ✅ | ✅ | | Invoices | ✅ | ✅ | | Sales Invoices | ✅ | ✅ | | Cash Orders | ✅ | ✅ | | Contracts | ✅ | ✅ | | Checks (Fiscal) | ✅ | ✅ | | Acts | ✅ | ✅ | | Product Arrivals | ✅ | ✅ |
Development
# Install dependencies
npm install
# Build all packages
npm run build --workspaces
# Run tests
npm test --workspaces
# Type check
npm run type-check --workspaces
License
Author
Danny Chirkov (@dannychirkov)











