@revfleet/hscli 0.8.7 → 0.8.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/CHANGELOG.md +204 -0
  2. package/CONTRIBUTING.md +120 -0
  3. package/README.md +14 -6
  4. package/brand/readme-hero.svg +25 -0
  5. package/dist/cli.js +10 -0
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/account/index.js +5 -6
  8. package/dist/commands/account/index.js.map +1 -1
  9. package/dist/commands/api/index.js +43 -3
  10. package/dist/commands/api/index.js.map +1 -1
  11. package/dist/commands/auth/index.js +32 -6
  12. package/dist/commands/auth/index.js.map +1 -1
  13. package/dist/commands/cms/hubdb.js +31 -0
  14. package/dist/commands/cms/hubdb.js.map +1 -1
  15. package/dist/commands/cms/index.js +27 -0
  16. package/dist/commands/cms/index.js.map +1 -1
  17. package/dist/commands/cms/source-code.js +21 -0
  18. package/dist/commands/cms/source-code.js.map +1 -1
  19. package/dist/commands/communication-preferences/index.js +11 -12
  20. package/dist/commands/communication-preferences/index.js.map +1 -1
  21. package/dist/commands/crm/shared.d.ts +1 -0
  22. package/dist/commands/crm/shared.js +3 -4
  23. package/dist/commands/crm/shared.js.map +1 -1
  24. package/dist/commands/events/index.js +7 -8
  25. package/dist/commands/events/index.js.map +1 -1
  26. package/dist/commands/marketing/index.js +3 -4
  27. package/dist/commands/marketing/index.js.map +1 -1
  28. package/dist/commands/settings/index.js +12 -13
  29. package/dist/commands/settings/index.js.map +1 -1
  30. package/dist/core/http.d.ts +27 -0
  31. package/dist/core/http.js +87 -18
  32. package/dist/core/http.js.map +1 -1
  33. package/dist/core/plugins.d.ts +5 -2
  34. package/dist/core/plugins.js +18 -1
  35. package/dist/core/plugins.js.map +1 -1
  36. package/dist/core/telemetry-context.d.ts +13 -0
  37. package/dist/core/telemetry-context.js +30 -0
  38. package/dist/core/telemetry-context.js.map +1 -0
  39. package/dist/mcp/hubspot-modules.d.ts +30 -0
  40. package/dist/mcp/hubspot-modules.js +305 -0
  41. package/dist/mcp/hubspot-modules.js.map +1 -0
  42. package/dist/mcp/server.d.ts +2 -0
  43. package/dist/mcp/server.js +30 -26
  44. package/dist/mcp/server.js.map +1 -1
  45. package/docs/ARCHITECTURE.md +39 -0
  46. package/docs/CAPABILITY_LIBRARY.md +638 -0
  47. package/docs/CMS_SETUP.md +349 -0
  48. package/docs/COMMAND_COMPATIBILITY.md +24 -0
  49. package/docs/COMMAND_TREE.md +183 -0
  50. package/docs/COMMERCE_SETUP.md +400 -0
  51. package/docs/COMPARISON.md +146 -0
  52. package/docs/COOKBOOK.md +800 -0
  53. package/docs/INTEGRATIONS_NOTIFICATIONS_SETUP.md +352 -0
  54. package/docs/MARKETING_SETUP.md +503 -0
  55. package/docs/MCP.md +171 -0
  56. package/docs/OPERATIONAL_PLAYBOOKS.md +322 -0
  57. package/docs/OPERATIONS_SETUP.md +362 -0
  58. package/docs/PLUGIN_GUIDE.md +158 -0
  59. package/docs/POLICY_EXAMPLE.json +57 -0
  60. package/docs/PORTAL_SETUP.md +683 -0
  61. package/docs/PUBLISHING.md +154 -0
  62. package/docs/RELEASE_GOVERNANCE.md +34 -0
  63. package/docs/REPORTING_SETUP.md +310 -0
  64. package/docs/ROADMAP-DATE-BASED-API.md +103 -0
  65. package/docs/ROADMAP_PHASE1_TO_3.md +96 -0
  66. package/docs/SAFETY_MODEL.md +37 -0
  67. package/docs/SALES_SETUP.md +369 -0
  68. package/docs/SERVICE_SETUP.md +403 -0
  69. package/docs/TESTING_PLAN.md +89 -0
  70. package/docs/TIERS.md +320 -0
  71. package/docs/TUTORIALS/audit-portal-writes.md +150 -0
  72. package/docs/TUTORIALS/secure-agent-writes.md +177 -0
  73. package/docs/TUTORIALS/trace-replay-repro.md +147 -0
  74. package/docs/WHY_HOW_WHAT.md +81 -0
  75. package/package.json +7 -2
@@ -0,0 +1,503 @@
1
+ # Marketing Setup Guide
2
+
3
+ > See also: [PORTAL_SETUP.md](PORTAL_SETUP.md) · [SALES_SETUP.md](SALES_SETUP.md) · [REPORTING_SETUP.md](REPORTING_SETUP.md)
4
+
5
+ Complete configuration guide for HubSpot Marketing Hub settings. Covers email, campaigns, forms, ads, social, SEO, lead scoring, and ABM. Each section shows the UI path, settings, and hscli commands where API support exists.
6
+
7
+ **Prerequisites:**
8
+ - Portal authenticated (`hscli auth whoami`)
9
+ - Private App scopes: `marketing-email`, `marketing.campaigns.read/write`, `forms`, `content`
10
+ - Domain and email authentication complete (see [PORTAL_SETUP.md](./PORTAL_SETUP.md) Phase 2)
11
+
12
+ ---
13
+
14
+ ## 1. Email Configuration
15
+
16
+ **Where:** Settings > Marketing > Email
17
+
18
+ ### 1.1 Sending Domains
19
+
20
+ | Setting | What to configure | Why it matters |
21
+ |---------|-------------------|----------------|
22
+ | Sending domain | Your authenticated email domain (e.g., `yourcompany.com`) | Emails sent from unauthenticated domains land in spam |
23
+ | DKIM/SPF records | DNS records provided by HubSpot | Proves email authenticity, improves deliverability |
24
+ | DMARC policy | TXT record at your DNS registrar | Controls what happens when authentication fails |
25
+
26
+ > **API:** Domain verification is UI + DNS only. No hscli command.
27
+
28
+ ### 1.2 Subscription Types
29
+
30
+ **Where:** Settings > Marketing > Email > Subscription Types
31
+
32
+ | Setting | What to configure | Why it matters |
33
+ |---------|-------------------|----------------|
34
+ | Subscription types | Define categories (Marketing, Sales, Newsletter, Product Updates, etc.) | Contacts opt in/out per type — required for CAN-SPAM/GDPR |
35
+ | Default subscription | Which type new contacts are enrolled in | Controls initial email eligibility |
36
+ | Opt-in process | Single opt-in vs double opt-in | Double opt-in required in some jurisdictions (Germany, Austria) |
37
+
38
+ > **API:** Subscription types can be managed via the Email Subscriptions API. Scope: `communication_preferences.read/write`.
39
+
40
+ ### 1.3 Email Footer & Compliance
41
+
42
+ **Where:** Settings > Marketing > Email > Configuration > Footer
43
+
44
+ | Setting | What to configure | Why it matters |
45
+ |---------|-------------------|----------------|
46
+ | Company name | Legal entity name | CAN-SPAM requirement |
47
+ | Company address | Full physical mailing address | CAN-SPAM requirement — must appear in every marketing email |
48
+ | Unsubscribe link | Automatically included by HubSpot | Required by law — do not remove |
49
+
50
+ ### 1.4 Frequency Caps
51
+
52
+ **Where:** Settings > Marketing > Email > Configuration > Frequency
53
+
54
+ | Setting | What to configure | Why it matters |
55
+ |---------|-------------------|----------------|
56
+ | Max emails per contact | Limit per time period (e.g., max 3/week) | Prevents over-sending and unsubscribes |
57
+ | Non-marketing emails | Whether transactional emails count toward the cap | Transactional emails typically bypass frequency caps |
58
+ | Time window | Daily, weekly, or monthly cap period | Match to your sending cadence |
59
+
60
+ ### 1.5 Email Health
61
+
62
+ **Where:** Settings > Marketing > Email > Health
63
+
64
+ | Setting | What to configure | Why it matters |
65
+ |---------|-------------------|----------------|
66
+ | Hard bounce handling | Auto-remove hard bounces | Protects sender reputation |
67
+ | Graymail suppression | Enable/disable | Stops sending to contacts who never open |
68
+ | Spam complaint threshold | Monitor via postmaster tools | High complaint rates trigger ISP blocks |
69
+
70
+ > **API:** UI only. Monitor via HubSpot email health dashboard.
71
+
72
+ ---
73
+
74
+ ## 2. Email Templates & Design
75
+
76
+ **Where:** Marketing > Email > Templates (or Design Manager)
77
+
78
+ | Setting | What to configure | Why it matters |
79
+ |---------|-------------------|----------------|
80
+ | Brand kit colors | Primary, secondary, accent colors | Consistent branding across all emails |
81
+ | Default font | Font family and sizes | Brand consistency |
82
+ | Logo placement | Header logo and dimensions | Automatic inclusion in templates |
83
+ | Saved sections | Reusable content blocks (headers, footers, CTAs) | Speeds up email creation |
84
+ | Global modules | Shared modules across templates | Single update propagates everywhere |
85
+
86
+ **hscli:**
87
+ ```bash
88
+ # List email templates
89
+ hscli marketing emails list --limit 20
90
+
91
+ # Get email details
92
+ hscli marketing emails get <emailId>
93
+
94
+ # Create an email (requires template ID)
95
+ hscli marketing emails create --data '{
96
+ "name": "March Newsletter",
97
+ "subject": "Your Monthly Update",
98
+ "type": "REGULAR"
99
+ }' --force
100
+ ```
101
+
102
+ > **API:** `marketing-email` scope. Emails can be created, updated, and listed via API. Template design is primarily UI-based.
103
+
104
+ ---
105
+
106
+ ## 3. Marketing Campaigns
107
+
108
+ **Where:** Marketing > Campaigns
109
+
110
+ Campaigns are containers that group related marketing assets (emails, landing pages, forms, CTAs, social posts, ads, workflows) for unified tracking and ROI reporting.
111
+
112
+ | Setting | What to configure | Why it matters |
113
+ |---------|-------------------|----------------|
114
+ | Campaign name | Descriptive name (e.g., "Q1 2026 Product Launch") | Organizes marketing efforts |
115
+ | Goal | Campaign objective (awareness, lead gen, etc.) | Tracks success metrics |
116
+ | Audience | Target segment or list | Defines who sees the campaign |
117
+ | Start/end dates | Campaign duration | Bounds reporting windows |
118
+ | Budget | Planned spend | ROI calculation |
119
+ | Associated assets | Emails, landing pages, forms, CTAs, blog posts, social posts | All attributed to this campaign |
120
+
121
+ **hscli:**
122
+ ```bash
123
+ # List campaigns
124
+ hscli marketing campaigns list --limit 20
125
+
126
+ # Get campaign details
127
+ hscli marketing campaigns get <campaignId>
128
+
129
+ # Create a campaign
130
+ hscli marketing campaigns create --data '{
131
+ "name": "Q1 Product Launch",
132
+ "type": "CONTENT_CAMPAIGN"
133
+ }' --force
134
+ ```
135
+
136
+ > **API:** `marketing.campaigns.read/write` scope. Campaign CRUD is supported. Asset association is done via each asset's campaign property.
137
+
138
+ ---
139
+
140
+ ## 4. Landing Pages
141
+
142
+ **Where:** Marketing > Landing Pages (creation) | Settings > Content > Templates (defaults)
143
+
144
+ | Setting | What to configure | Why it matters |
145
+ |---------|-------------------|----------------|
146
+ | Default template | Choose starter template or custom theme template | Consistency across landing pages |
147
+ | Custom domain | Landing page subdomain (e.g., `go.yourcompany.com`) | Professional URLs, branded experience |
148
+ | Default meta description | SEO meta for new pages | Search engine visibility |
149
+ | Thank-you redirect | Default post-submission URL or inline thank-you message | Conversion flow completion |
150
+ | A/B testing | Enable variation testing | Optimize conversion rates |
151
+ | Stylesheets | Global CSS for landing pages | Consistent design without per-page styling |
152
+
153
+ > **API:** Landing pages are a subset of CMS pages. Use the Pages API with `content` scope. hscli `cms pages` commands can manage landing pages.
154
+
155
+ **hscli:**
156
+ ```bash
157
+ # List landing pages
158
+ hscli cms pages list --limit 10
159
+
160
+ # Get a specific page
161
+ hscli cms pages get <pageId>
162
+ ```
163
+
164
+ ---
165
+
166
+ ## 5. Forms
167
+
168
+ **Where:** Marketing > Forms (creation) | Settings > Marketing > Forms (defaults)
169
+
170
+ ### 5.1 Form Defaults
171
+
172
+ | Setting | What to configure | Why it matters |
173
+ |---------|-------------------|----------------|
174
+ | Submission notifications | Email address(es) to notify on form submit | Sales team gets notified of new leads |
175
+ | Follow-up emails | Auto-send email after submission | Confirm receipt, deliver promised content |
176
+ | Cookie tracking | Enable/disable form pre-fill from cookies | Progressive profiling depends on this |
177
+ | CAPTCHA | Enable reCAPTCHA | Block spam submissions |
178
+
179
+ ### 5.2 Form Field Types
180
+
181
+ | Field type | Use case |
182
+ |------------|----------|
183
+ | Text (single-line) | Names, titles, short answers |
184
+ | Text (multi-line) | Comments, descriptions |
185
+ | Dropdown select | Predefined options (industry, country) |
186
+ | Radio buttons | Single selection from small set |
187
+ | Checkboxes | Multi-selection (interests, products) |
188
+ | Date picker | Dates (event dates, birthdays) |
189
+ | File upload | Documents, images |
190
+ | Number | Numeric values (employee count, revenue) |
191
+ | Dependent fields | Show field B only when field A = X |
192
+
193
+ ### 5.3 Progressive Profiling
194
+
195
+ **Where:** Form editor > Field settings > Progressive fields
196
+
197
+ | Setting | What to configure | Why it matters |
198
+ |---------|-------------------|----------------|
199
+ | Queued questions | Fields shown only when known fields are already populated | Gathers more data over time without long forms |
200
+ | Max queued per visit | How many progressive fields per submission | Balances data collection with user experience |
201
+
202
+ **hscli:**
203
+ ```bash
204
+ # List all forms
205
+ hscli forms list --limit 20
206
+
207
+ # Get form details (fields, configuration)
208
+ hscli forms get <formId>
209
+
210
+ # Create a form
211
+ hscli forms create --data '{
212
+ "name": "Contact Us",
213
+ "formType": "HUBSPOT",
214
+ "configuration": {
215
+ "language": "en",
216
+ "postSubmitAction": {"type": "thank_you", "value": "Thanks for reaching out!"}
217
+ },
218
+ "fieldGroups": [
219
+ {"fields": [{"name": "email", "required": true}]},
220
+ {"fields": [{"name": "firstname"}, {"name": "lastname"}]},
221
+ {"fields": [{"name": "message", "fieldType": "textarea"}]}
222
+ ]
223
+ }' --force
224
+ ```
225
+
226
+ > **API:** `forms` scope. Full CRUD on forms including field configuration.
227
+
228
+ ---
229
+
230
+ ## 6. Ads
231
+
232
+ **Where:** Settings > Marketing > Ads
233
+
234
+ ### 6.1 Connect Ad Accounts
235
+
236
+ | Platform | What to connect | Requirements |
237
+ |----------|----------------|--------------|
238
+ | Google Ads | Google Ads account | Google account with Ads access |
239
+ | Facebook/Meta Ads | Facebook Business Manager | Admin access to ad account |
240
+ | LinkedIn Ads | LinkedIn Campaign Manager | Campaign Manager access |
241
+
242
+ ### 6.2 Ad Settings
243
+
244
+ | Setting | What to configure | Why it matters |
245
+ |---------|-------------------|----------------|
246
+ | Auto-tracking | Automatically add tracking parameters to ad URLs | Attributes conversions to specific ads |
247
+ | Audience sync | Sync HubSpot lists to ad audiences | Target/exclude contacts in ad platforms |
248
+ | ROI reporting | Connect revenue data to ad spend | Measure true ad ROI |
249
+ | Lead sync | Auto-create contacts from lead gen forms | Facebook/LinkedIn lead form submissions create HubSpot contacts |
250
+ | Attribution window | How long after ad click to count conversion | Accurate attribution reporting |
251
+
252
+ > **API:** UI only for account connection. Ad performance data is available via the Analytics API.
253
+
254
+ ---
255
+
256
+ ## 7. Social Media
257
+
258
+ **Where:** Settings > Marketing > Social
259
+
260
+ ### 7.1 Connect Social Accounts
261
+
262
+ | Platform | Supported features |
263
+ |----------|-------------------|
264
+ | Facebook Pages | Publish, monitor, report |
265
+ | Instagram Business | Publish, monitor, report |
266
+ | Twitter/X | Publish, monitor |
267
+ | LinkedIn (company + personal) | Publish, report |
268
+ | YouTube | Monitoring only |
269
+
270
+ ### 7.2 Social Settings
271
+
272
+ | Setting | What to configure | Why it matters |
273
+ |---------|-------------------|----------------|
274
+ | Publishing defaults | Default accounts for new posts | Saves time in publishing workflow |
275
+ | Auto-publish blog posts | Share new blog posts automatically | Consistent promotion |
276
+ | Link shortening | Use HubSpot link shortener | Cleaner URLs, tracking |
277
+ | Social monitoring | Keywords, hashtags, mentions to track | Brand awareness, engagement |
278
+
279
+ > **API:** Social publishing is primarily UI. Some endpoints exist for reading social data via the Analytics API.
280
+
281
+ ---
282
+
283
+ ## 8. SEO
284
+
285
+ **Where:** Marketing > SEO (tool) | Settings > Content > SEO
286
+
287
+ | Setting | What to configure | Why it matters |
288
+ |---------|-------------------|----------------|
289
+ | Target domains | Which domains to track for SEO | Focus SEO efforts on your properties |
290
+ | Topic clusters | Core topics + pillar pages + subtopic content | Content strategy aligned to search intent |
291
+ | Recommendations | On-page SEO suggestions per page | Improves search ranking |
292
+ | Google Search Console | Connect for keyword data | See actual search queries driving traffic |
293
+ | Canonical URLs | Default canonical URL strategy | Prevents duplicate content penalties |
294
+ | Sitemap | Auto-generated sitemap | Search engines discover your pages |
295
+
296
+ > **API:** UI only. SEO tools are interactive and not exposed via API.
297
+
298
+ ---
299
+
300
+ ## 9. Lead Scoring
301
+
302
+ **Where:** Settings > Properties > Contact scoring (or Marketing > Lead Scoring for HubSpot Score)
303
+
304
+ ### 9.1 HubSpot Score (Manual)
305
+
306
+ | Criteria type | Examples | Points |
307
+ |---------------|----------|--------|
308
+ | **Positive attributes** | Viewed pricing page, downloaded whitepaper, attended webinar | +5 to +20 |
309
+ | **Negative attributes** | Unsubscribed, competitor domain, no activity in 90 days | -5 to -20 |
310
+ | **Demographic** | Job title = VP+, company size > 50, industry match | +10 to +15 |
311
+ | **Behavioral** | Form submissions, email opens/clicks, page views | +5 to +10 |
312
+
313
+ ### 9.2 Score Thresholds
314
+
315
+ | Threshold | Action |
316
+ |-----------|--------|
317
+ | Score >= 50 | Lifecycle stage → MQL |
318
+ | Score >= 80 | Lifecycle stage → SQL, notify sales |
319
+ | Score < 0 | Suppress from marketing emails |
320
+
321
+ ### 9.3 Predictive Lead Scoring (Enterprise)
322
+
323
+ **Where:** Settings > Properties > Predictive lead scoring (Enterprise only)
324
+
325
+ | Setting | What to configure | Why it matters |
326
+ |---------|-------------------|----------------|
327
+ | Likelihood to close | HubSpot AI model, auto-calculated | Prioritizes sales outreach |
328
+ | Contact priority | Tier 1/2/3 based on predictive score | Focus on highest-value leads |
329
+
330
+ > **API:** Lead score is a contact property (`hubspotscore`). Readable via API but scoring rules are configured in UI only.
331
+
332
+ **hscli:**
333
+ ```bash
334
+ # Read a contact's lead score
335
+ hscli crm contacts get <contactId> --json
336
+
337
+ # Search for MQLs with score above threshold
338
+ hscli crm contacts search --data '{
339
+ "filterGroups": [{
340
+ "filters": [{
341
+ "propertyName": "hubspotscore",
342
+ "operator": "GTE",
343
+ "value": "50"
344
+ }]
345
+ }],
346
+ "limit": 20
347
+ }'
348
+ ```
349
+
350
+ ---
351
+
352
+ ## 10. ABM (Account-Based Marketing)
353
+
354
+ **Where:** Contacts > Target Accounts (tool) | Settings > Properties > Company scoring
355
+
356
+ ### 10.1 Ideal Customer Profile (ICP)
357
+
358
+ | Property | Example criteria |
359
+ |----------|-----------------|
360
+ | Industry | SaaS, FinTech, Healthcare |
361
+ | Company size | 50–500 employees |
362
+ | Revenue | $5M–$50M ARR |
363
+ | Geography | North America, EU |
364
+ | Technology stack | Uses Salesforce, Slack, AWS |
365
+
366
+ ### 10.2 Target Account Tiers
367
+
368
+ | Tier | Description | Treatment |
369
+ |------|-------------|-----------|
370
+ | Tier 1 | Perfect ICP match, high revenue potential | 1:1 personalized outreach, dedicated rep |
371
+ | Tier 2 | Good ICP match, moderate potential | 1:few campaigns, semi-personalized |
372
+ | Tier 3 | Partial match, lower potential | 1:many programmatic campaigns |
373
+
374
+ ### 10.3 Company Scoring
375
+
376
+ | Setting | What to configure | Why it matters |
377
+ |---------|-------------------|----------------|
378
+ | ICP tier property | Custom company property for tier assignment | Segments target accounts |
379
+ | Buying role property | Contact role within the buying committee | Maps stakeholders per account |
380
+ | Target account flag | Boolean property on company | Enables ABM reporting and automation |
381
+
382
+ > **API:** Company properties are fully manageable via API. Target account designation is a company property.
383
+
384
+ **hscli:**
385
+ ```bash
386
+ # Search for Tier 1 target accounts
387
+ hscli crm companies search --data '{
388
+ "filterGroups": [{
389
+ "filters": [{
390
+ "propertyName": "icp_tier",
391
+ "operator": "EQ",
392
+ "value": "tier_1"
393
+ }]
394
+ }],
395
+ "limit": 50
396
+ }'
397
+
398
+ # Create ICP tier property
399
+ hscli crm properties create companies --data '{
400
+ "name": "icp_tier",
401
+ "label": "ICP Tier",
402
+ "type": "enumeration",
403
+ "fieldType": "select",
404
+ "groupName": "companyinformation",
405
+ "options": [
406
+ {"label": "Tier 1", "value": "tier_1", "displayOrder": 0},
407
+ {"label": "Tier 2", "value": "tier_2", "displayOrder": 1},
408
+ {"label": "Tier 3", "value": "tier_3", "displayOrder": 2}
409
+ ]
410
+ }' --force
411
+ ```
412
+
413
+ ---
414
+
415
+ ## Setup Checklist
416
+
417
+ ### Email Configuration
418
+ ```
419
+ [ ] Sending domain authenticated (DKIM + SPF verified)
420
+ [ ] DMARC record configured at DNS registrar
421
+ [ ] Subscription types defined (Marketing, Sales, Newsletter, etc.)
422
+ [ ] Default subscription type selected
423
+ [ ] Double opt-in enabled (if required by jurisdiction)
424
+ [ ] Email footer configured (company name + physical address)
425
+ [ ] Frequency caps set (max emails per contact per time period)
426
+ [ ] Hard bounce auto-removal enabled
427
+ [ ] Graymail suppression configured
428
+ ```
429
+
430
+ ### Email Templates & Design
431
+ ```
432
+ [ ] Brand kit colors configured
433
+ [ ] Default fonts set
434
+ [ ] Logo uploaded and placed in default header
435
+ [ ] Saved sections created (header, footer, CTA blocks)
436
+ [ ] Default email template selected
437
+ ```
438
+
439
+ ### Campaigns
440
+ ```
441
+ [ ] Campaign naming convention established
442
+ [ ] First campaign created with goal and dates
443
+ [ ] Assets associated (email, landing page, form, CTA)
444
+ ```
445
+
446
+ ### Landing Pages
447
+ ```
448
+ [ ] Default landing page template selected
449
+ [ ] Custom landing page domain configured (if applicable)
450
+ [ ] Default meta description set
451
+ [ ] Thank-you page/redirect configured
452
+ ```
453
+
454
+ ### Forms
455
+ ```
456
+ [ ] Default submission notification recipients set
457
+ [ ] CAPTCHA enabled on public-facing forms
458
+ [ ] Cookie tracking enabled for progressive profiling
459
+ [ ] At least one lead capture form created
460
+ [ ] Follow-up email configured for primary forms
461
+ ```
462
+
463
+ ### Ads
464
+ ```
465
+ [ ] Google Ads account connected (if applicable)
466
+ [ ] Facebook/Meta Ads account connected (if applicable)
467
+ [ ] LinkedIn Ads account connected (if applicable)
468
+ [ ] Auto-tracking enabled
469
+ [ ] Audience sync configured for key lists
470
+ ```
471
+
472
+ ### Social Media
473
+ ```
474
+ [ ] Facebook Page connected
475
+ [ ] LinkedIn company page connected
476
+ [ ] Instagram Business account connected (if applicable)
477
+ [ ] Twitter/X account connected (if applicable)
478
+ [ ] Auto-publish for blog posts configured (if desired)
479
+ ```
480
+
481
+ ### SEO
482
+ ```
483
+ [ ] Target domains configured
484
+ [ ] Google Search Console connected
485
+ [ ] At least one topic cluster created
486
+ [ ] Sitemap verified
487
+ ```
488
+
489
+ ### Lead Scoring
490
+ ```
491
+ [ ] Positive scoring attributes defined
492
+ [ ] Negative scoring attributes defined
493
+ [ ] Score thresholds set (MQL, SQL triggers)
494
+ [ ] Lifecycle stage automation tied to score thresholds
495
+ ```
496
+
497
+ ### ABM
498
+ ```
499
+ [ ] Ideal Customer Profile criteria defined
500
+ [ ] ICP tier property created on companies
501
+ [ ] Target accounts identified and tiered
502
+ [ ] Buying role property created on contacts (if applicable)
503
+ ```
package/docs/MCP.md ADDED
@@ -0,0 +1,171 @@
1
+ # MCP Support (`hscli mcp`)
2
+
3
+ > See also: [ARCHITECTURE.md](ARCHITECTURE.md) · [SAFETY_MODEL.md](SAFETY_MODEL.md) · [COMMAND_TREE.md](COMMAND_TREE.md)
4
+
5
+ `hscli` now exposes a Model Context Protocol (MCP) server over **stdio**.
6
+
7
+ ## Run
8
+
9
+ ```bash
10
+ npm run build
11
+ node dist/cli.js mcp
12
+ ```
13
+
14
+ Or if installed globally:
15
+
16
+ ```bash
17
+ hscli mcp
18
+ ```
19
+
20
+ ## Profile isolation and safety defaults
21
+
22
+ - **Profile isolation**: set `HSCLI_MCP_PROFILE=<profile>` to hard-lock the MCP server to one auth profile.
23
+ - If a tool call requests a different profile, the server rejects it.
24
+ - **Write tools are dry-run by default**:
25
+ - `force: true` is required to execute actual writes.
26
+ - Without `force`, write tools return a dry-run payload (`{ dryRun: true, method, path, body }`).
27
+ - **Lifecycle coverage for CRM objects**:
28
+ - standard object tools now include delete, merge, batch read/upsert/archive.
29
+ - **Strict object type allowlist**:
30
+ - Object tools: `contacts`, `companies`, `deals`, `tickets`
31
+ - Properties/associations object types: `contacts`, `companies`, `deals`, `tickets`
32
+ - Pipeline object types: `deals`, `tickets`
33
+ - **Secrets redaction**:
34
+ - Token-like fields and bearer strings are redacted in MCP tool outputs and errors.
35
+
36
+ ## Claude Desktop setup
37
+
38
+ Add a server entry in your Claude Desktop MCP config:
39
+
40
+ ```json
41
+ {
42
+ "mcpServers": {
43
+ "hscli": {
44
+ "command": "node",
45
+ "args": ["/absolute/path/to/hscli/dist/cli.js", "mcp"],
46
+ "env": {
47
+ "HSCLI_HOME": "/absolute/path/to/.revfleet",
48
+ "HSCLI_MCP_PROFILE": "default"
49
+ }
50
+ }
51
+ }
52
+ }
53
+ ```
54
+
55
+ If `hscli` is on your PATH you can use:
56
+
57
+ ```json
58
+ {
59
+ "mcpServers": {
60
+ "hscli": {
61
+ "command": "hscli",
62
+ "args": ["mcp"]
63
+ }
64
+ }
65
+ }
66
+ ```
67
+
68
+ ## OpenAI-compatible MCP clients
69
+
70
+ Use a stdio server command equivalent to:
71
+
72
+ - command: `hscli`
73
+ - args: `mcp`
74
+
75
+ If your client accepts env vars, set:
76
+
77
+ - `HSCLI_HOME` to the auth profile directory containing `auth.json`
78
+ - `HSCLI_MCP_PROFILE` to force strict profile isolation
79
+
80
+ ## Tool catalog
81
+
82
+ ### Contacts
83
+ - `crm_contacts_list`
84
+ - `crm_contacts_get`
85
+ - `crm_contacts_search`
86
+ - `crm_contacts_create` *(write, dry-run by default)*
87
+ - `crm_contacts_update` *(write, dry-run by default)*
88
+ - `crm_contacts_delete` *(write, dry-run by default)*
89
+ - `crm_contacts_merge` *(write, dry-run by default)*
90
+ - `crm_contacts_batch_read`
91
+ - `crm_contacts_batch_upsert` *(write, dry-run by default)*
92
+ - `crm_contacts_batch_archive` *(write, dry-run by default)*
93
+
94
+ ### Companies
95
+ - `crm_companies_list`
96
+ - `crm_companies_get`
97
+ - `crm_companies_search`
98
+ - `crm_companies_create` *(write, dry-run by default)*
99
+ - `crm_companies_update` *(write, dry-run by default)*
100
+ - `crm_companies_delete` *(write, dry-run by default)*
101
+ - `crm_companies_merge` *(write, dry-run by default)*
102
+ - `crm_companies_batch_read`
103
+ - `crm_companies_batch_upsert` *(write, dry-run by default)*
104
+ - `crm_companies_batch_archive` *(write, dry-run by default)*
105
+
106
+ ### Deals
107
+ - `crm_deals_list`
108
+ - `crm_deals_get`
109
+ - `crm_deals_search`
110
+ - `crm_deals_create` *(write, dry-run by default)*
111
+ - `crm_deals_update` *(write, dry-run by default)*
112
+ - `crm_deals_delete` *(write, dry-run by default)*
113
+ - `crm_deals_merge` *(write, dry-run by default)*
114
+ - `crm_deals_batch_read`
115
+ - `crm_deals_batch_upsert` *(write, dry-run by default)*
116
+ - `crm_deals_batch_archive` *(write, dry-run by default)*
117
+
118
+ ### Tickets
119
+ - `crm_tickets_list`
120
+ - `crm_tickets_get`
121
+ - `crm_tickets_search`
122
+ - `crm_tickets_create` *(write, dry-run by default)*
123
+ - `crm_tickets_update` *(write, dry-run by default)*
124
+ - `crm_tickets_delete` *(write, dry-run by default)*
125
+ - `crm_tickets_merge` *(write, dry-run by default)*
126
+ - `crm_tickets_batch_read`
127
+ - `crm_tickets_batch_upsert` *(write, dry-run by default)*
128
+ - `crm_tickets_batch_archive` *(write, dry-run by default)*
129
+
130
+ ### Engagements
131
+ - `crm_notes_*` (`list/get/search/create/update/delete`)
132
+ - `crm_calls_*` (`list/get/search/create/update/delete`)
133
+ - `crm_tasks_*` (`list/get/search/create/update/delete`)
134
+ - `crm_emails_*` (`list/get/search/create/update/delete`)
135
+ - `crm_meetings_*` (`list/get/search/create/update/delete`)
136
+
137
+ ### Properties
138
+ - `crm_properties_list`
139
+ - `crm_properties_get`
140
+ - `crm_properties_create` *(write, dry-run by default)*
141
+ - `crm_properties_update` *(write, dry-run by default)*
142
+
143
+ ### Associations
144
+ - `crm_associations_list`
145
+ - `crm_associations_create` *(write, dry-run by default)*
146
+ - `crm_associations_remove` *(write, dry-run by default)*
147
+
148
+ ### Imports
149
+ - `crm_imports_create` *(write, dry-run by default)*
150
+ - `crm_imports_list`
151
+ - `crm_imports_get`
152
+ - `crm_imports_errors`
153
+
154
+ ### Owners
155
+ - `crm_owners_list`
156
+
157
+ ### Pipelines
158
+ - `crm_pipelines_list`
159
+ - `crm_pipelines_get`
160
+
161
+ ### Custom Objects
162
+ - `crm_custom_schemas_list|get|create|update`
163
+ - `crm_custom_records_list|get|search|create|update|delete`
164
+
165
+ ### Raw API
166
+ - `hub_api_request` *(write methods dry-run by default)*
167
+
168
+ ## Notes
169
+
170
+ - MCP transport is stdio only in this implementation.
171
+ - Existing auth + HTTP core logic is reused (`getToken`, `HubSpotClient`, `maybeWrite`, redaction).