{"_id":"@craftpipe/crmbridge-mcp","name":"@craftpipe/crmbridge-mcp","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@craftpipe/crmbridge-mcp","version":"1.0.0","description":"Sales pipeline and CRM intelligence MCP server — HubSpot, Pipedrive, Salesforce","type":"module","main":"dist/index.js","bin":{"crmbridge-mcp":"dist/index.js"},"scripts":{"build":"tsc","test":"vitest run","test:watch":"vitest","typecheck":"tsc --noEmit","clean":"rm -rf dist"},"dependencies":{"@modelcontextprotocol/sdk":"^1.12.0","better-sqlite3":"^12.9.0","zod":"^4.3.6"},"devDependencies":{"@types/better-sqlite3":"^7.6.0","@types/node":"^25.6.0","typescript":"^6.0.2","vitest":"^4.1.4"},"engines":{"node":">=18.0.0"},"keywords":["mcp","developer-tools","craftpipe","ai-tools","crm","hubspot","pipedrive","salesforce","sales","pipeline"],"license":"MIT","gitHead":"148d60e00df059a5229dcd73c120319d6cb951d4","_id":"@craftpipe/crmbridge-mcp@1.0.0","_nodeVersion":"20.19.6","_npmVersion":"11.8.0","dist":{"integrity":"sha512-Bh5039Ahrhy6Xn/n/HlnA71jN0zBEcfNrVZ7tcaouxkRFWNSsjyU/eqdf0ozFzpR8raBUc3c+B4ijIhdgBCAGA==","shasum":"cd63c828751b7bf984d3cfbaa77d1270870f2b16","tarball":"https://registry.npmjs.org/@craftpipe/crmbridge-mcp/-/crmbridge-mcp-1.0.0.tgz","fileCount":3,"unpackedSize":10167,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC4TK6YZMAiOvV6XmALER53ixoTWUvQt7JN0rSVmATAzAIhAMCiv+Hkdfx6LPQFOaQLtyzi8t5QI/vneqW5fmTo7GfS"}]},"_npmUser":{"name":"craftpipe","email":"info@heijnesdigital.com"},"directories":{},"maintainers":[{"name":"craftpipe","email":"info@heijnesdigital.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/crmbridge-mcp_1.0.0_1776261680329_0.7826049822913093"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-15T14:01:20.178Z","1.0.0":"2026-04-15T14:01:20.504Z","modified":"2026-04-15T14:01:20.770Z"},"maintainers":[{"name":"craftpipe","email":"info@heijnesdigital.com"}],"description":"Sales pipeline and CRM intelligence MCP server — HubSpot, Pipedrive, Salesforce","keywords":["mcp","developer-tools","craftpipe","ai-tools","crm","hubspot","pipedrive","salesforce","sales","pipeline"],"license":"MIT","readme":"<div align=\"center\">\r\n  <img src=\".github/assets/banner.svg\" alt=\"CRMBridge MCP\" width=\"100%\"/>\r\n</div>\r\n\r\n<div align=\"center\">\r\n\r\n[![npm version](https://img.shields.io/npm/v/crmbridge-mcp?color=3b82f6&label=npm)](https://www.npmjs.com/package/crmbridge-mcp)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-3b82f6.svg)](LICENSE)\r\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.4-3b82f6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)\r\n[![Node.js](https://img.shields.io/badge/Node.js-18%2B-3b82f6?logo=node.js&logoColor=white)](https://nodejs.org/)\r\n[![MCP](https://img.shields.io/badge/MCP-Compatible-3b82f6)](https://modelcontextprotocol.io/)\r\n[![Tests](https://img.shields.io/badge/tests-245%20passing-22c55e)](https://github.com/craftpipe/crmbridge-mcp)\r\n\r\n**Sales pipeline and CRM intelligence for AI agents.**\r\nConnect Claude, Cursor, or any MCP-compatible agent to HubSpot, Pipedrive, Salesforce, and Zoho CRM — read-only, no webhooks, no setup beyond an access token.\r\n\r\n</div>\r\n\r\n---\r\n\r\n## Overview\r\n\r\nCRMBridge MCP gives AI agents direct read access to your CRM data:\r\n\r\n```mermaid\r\ngraph LR\r\n    A[AI Agent<br/>Claude / Cursor] -->|MCP Tools| B[CRMBridge MCP]\r\n    B --> C[HubSpot ✅]\r\n    B --> D[Pipedrive ✅]\r\n    B --> E[Salesforce ✅]\r\n    B --> F[Zoho CRM ✅]\r\n\r\n    style A fill:#1e293b,stroke:#3b82f6,color:#fff\r\n    style B fill:#1e3a5f,stroke:#3b82f6,color:#fff\r\n    style C fill:#1e293b,stroke:#22c55e,color:#fff\r\n    style D fill:#1e293b,stroke:#22c55e,color:#fff\r\n    style E fill:#1e293b,stroke:#22c55e,color:#fff\r\n    style F fill:#1e293b,stroke:#22c55e,color:#fff\r\n```\r\n\r\n**Use cases:** Ask your AI agent to summarize your pipeline, find stale deals, identify top customers by lifecycle stage, or search contacts by company — all without leaving your coding environment.\r\n\r\n---\r\n\r\n## Quick Start\r\n\r\n### npx (no install required)\r\n\r\n```bash\r\nnpx crmbridge-mcp\r\n```\r\n\r\n### Claude Desktop\r\n\r\nAdd to your `claude_desktop_config.json`:\r\n\r\n```json\r\n{\r\n  \"mcpServers\": {\r\n    \"crmbridge\": {\r\n      \"command\": \"npx\",\r\n      \"args\": [\"-y\", \"crmbridge-mcp\"],\r\n      \"env\": {\r\n        \"HUBSPOT_ACCESS_TOKEN\": \"your-hubspot-private-app-token\"\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n**Config file location:**\r\n- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`\r\n- Windows: `%APPDATA%\\Claude\\claude_desktop_config.json`\r\n\r\n### Getting a HubSpot Token\r\n\r\n1. Go to **HubSpot Settings → Integrations → Private Apps**\r\n2. Create a new private app\r\n3. Grant scopes: `crm.objects.contacts.read`, `crm.objects.deals.read`, `crm.pipelines.read`\r\n4. Copy the access token\r\n\r\n---\r\n\r\n## Tools\r\n\r\n### Phase 1 — Core CRM Access (Free, HubSpot)\r\n\r\n| Tool | Description |\r\n|:-----|:-----------|\r\n| `list_contacts` | Paginated contacts with lifecycle stage, owner, and date filters |\r\n| `list_deals` | Deals by stage, pipeline, amount range, and close date |\r\n| `get_pipeline` | Pipeline overview with stages, positions, and weighted values |\r\n| `search_contacts` | Full-text search by name, email, company, or phone |\r\n\r\n### Phase 2 — Extended Access (Free)\r\n\r\n| Tool | Description |\r\n|:-----|:-----------|\r\n| `activity_feed` | Recent CRM activities — emails, calls, meetings, notes |\r\n| `deal_stage_history` | Stage progression with timestamps and duration |\r\n| `contact_timeline` | Chronological touchpoint history per contact |\r\n\r\n### Phase 3 — Pro Features (requires `PRO_LICENSE`)\r\n\r\n| Tool | Description |\r\n|:-----|:-----------|\r\n| `pipeline_forecast` | Weighted forecast with conservative / realistic / optimistic scenarios |\r\n| `deal_scoring` | Deal health score 0-100 with specific risk factors |\r\n| `churn_signals` | At-risk customer detection with confidence scores |\r\n| `cohort_analysis` | Monthly cohorts with retention and LTV metrics |\r\n| `crm_hygiene` | Data quality report — duplicates, stale deals, missing fields |\r\n| `cross_crm_sync` | Diff contacts and deals across two CRMs (dry-run, never writes) |\r\n\r\n---\r\n\r\n## Provider Support\r\n\r\n| Provider | Status | Auth | Notes |\r\n|:---------|:-------|:-----|:------|\r\n| HubSpot | ✅ | `HUBSPOT_ACCESS_TOKEN` | Private app token or OAuth2 |\r\n| Pipedrive | ✅ | `PIPEDRIVE_API_TOKEN` + `PIPEDRIVE_COMPANY_DOMAIN` | API key in query string |\r\n| Salesforce | ✅ | `SALESFORCE_ACCESS_TOKEN` + `SALESFORCE_INSTANCE_URL` | OAuth2 Bearer token |\r\n| Zoho CRM | ✅ | `ZOHO_ACCESS_TOKEN` + `ZOHO_REGION` (optional) | OAuth2, regions: us/eu/in/au/cn |\r\n\r\n---\r\n\r\n## Example Usage\r\n\r\n### List contacts by lifecycle stage\r\n```\r\nList all HubSpot contacts with lifecycle_stage = \"customer\"\r\n```\r\n\r\n### Search for a contact\r\n```\r\nSearch HubSpot for contacts at Acme Corp\r\n```\r\n\r\n### Pipeline overview\r\n```\r\nShow me the full HubSpot sales pipeline with all stages\r\n```\r\n\r\n### Find large deals\r\n```\r\nList HubSpot deals with amount over $10,000 in the Contract Sent stage\r\n```\r\n\r\n---\r\n\r\n## Environment Variables\r\n\r\n| Variable | Required | Description |\r\n|:---------|:---------|:-----------|\r\n| `HUBSPOT_ACCESS_TOKEN` | For HubSpot | Private app token from HubSpot Settings |\r\n| `PIPEDRIVE_API_TOKEN` | For Pipedrive | API token from Pipedrive Personal preferences |\r\n| `PIPEDRIVE_COMPANY_DOMAIN` | For Pipedrive | Your Pipedrive subdomain (e.g. `mycompany`) |\r\n| `SALESFORCE_ACCESS_TOKEN` | For Salesforce | OAuth2 access token |\r\n| `SALESFORCE_INSTANCE_URL` | For Salesforce | Your Salesforce instance URL (e.g. `https://myorg.my.salesforce.com`) |\r\n| `ZOHO_ACCESS_TOKEN` | For Zoho CRM | OAuth2 access token from Zoho |\r\n| `ZOHO_REGION` | For Zoho CRM | API region: `us` (default), `eu`, `in`, `au`, `cn` |\r\n| `PRO_LICENSE` | For Pro tools | License key from craftpipe.dev (format: `CPK-...`) |\r\n\r\n---\r\n\r\n## Architecture\r\n\r\nCRMBridge uses a **provider-based adapter pattern** — each CRM has an adapter implementing the shared `CrmProvider` interface. All operations are **read-only**; CRMBridge never writes to your CRM.\r\n\r\n```\r\nsrc/\r\n  index.ts              — McpServer with 13 tools + Zod schemas\r\n  types.ts              — Shared types (Contact, Deal, Pipeline, ...)\r\n  adapters/\r\n    types.ts            — CrmProvider interface + query types\r\n    hubspot.ts          — HubSpot v3 API adapter\r\n    pipedrive.ts        — Pipedrive v1 API adapter\r\n    salesforce.ts       — Salesforce REST API v59.0 adapter (SOQL)\r\n    zoho.ts             — Zoho CRM v6 API adapter\r\n  tools/\r\n    list_contacts.ts    — Contacts with filters + audit log\r\n    list_deals.ts       — Deals with filters + audit log\r\n    get_pipeline.ts     — Pipeline stages + audit log\r\n    search_contacts.ts  — Full-text search + audit log\r\n    activity_feed.ts    — CRM activities with filters\r\n    deal_stage_history.ts — Stage changes, duration, skipped stages\r\n    contact_timeline.ts — Chronological contact events\r\n  lib/\r\n    providers.ts        — Cached provider factory (hubspot/pipedrive/salesforce/zoho)\r\n    fetch-retry.ts      — Retry on 429/5xx with exponential backoff\r\n    audit.ts            — SQLite audit log at ~/.crmbridge/audit.db\r\n  premium/\r\n    gate.ts             — requirePro() license gate\r\n    pipeline_forecast.ts — 3-scenario weighted forecast\r\n    deal_scoring.ts     — 0-100 deal health scoring\r\n    churn_signals.ts    — At-risk customer detection\r\n    cohort_analysis.ts  — Monthly cohort retention + LTV\r\n    crm_hygiene.ts      — Data quality issue detection\r\n    cross_crm_sync.ts   — Dry-run cross-CRM diff\r\n```\r\n\r\n**Audit log:** All tool calls are logged to `~/.crmbridge/audit.db` (SQLite, 90-day retention). Sensitive values (tokens, keys) are automatically redacted.\r\n\r\n---\r\n\r\n## Development\r\n\r\n```bash\r\ngit clone https://github.com/craftpipe/crmbridge-mcp\r\ncd crmbridge-mcp\r\nnpm install\r\nnpm test          # vitest run — 245 tests\r\nnpm run build     # tsc → dist/\r\nnpm run typecheck # tsc --noEmit\r\n```\r\n\r\n---\r\n\r\n## License\r\n\r\nMIT — see [LICENSE](LICENSE)\r\n\r\n---\r\n\r\n<div align=\"center\">\r\n  <sub>Built by <a href=\"https://craftpipe.dev\">Craftpipe</a> — AI-powered developer tools</sub>\r\n</div>\r\n","readmeFilename":"README.md","_rev":"1-78e0850e7ac1541fa5e617e8e4940701"}