Market sizing by persona: count the market, then the CRM gap
This recipe uses the official Cognism and HubSpot MCP servers, and both work in Claude and ChatGPT. Steps that write, send or spend credits wait for your approval.
Who is this for?
Marketers and RevOps people who want a market size by persona before a campaign, and a count of how many matching contacts are already in the CRM. Cognism supplies free company and people counts from its dictionaries, and HubSpot supplies the contact count. Cognism can be swapped for Explorium AgentSource for free company and prospect statistics, and HubSpot for Salesforce.
What do you get?
Sizing table for four logistics segments. Sample output: every company and person in it is fictional.
Campaign segments for Fernhill Software (fictional): logistics operations leaders in the United States and Canada. Dictionary values used: - Industry: Freight and logistics services - Regions: United States, Canada - Department: Operations - Seniority: Director, VP Counts only. No Cognism records returned.
| Segment | Companies | People | HubSpot contacts | Gap | Filters |
|---|---|---|---|---|---|
| US, Operations, Director | 1240 | 3860 | 214 | 3646 | HubSpot industry is Logistics and job title contains Director. Partial match. |
| US, Operations, VP | 1240 | 1105 | 61 | 1044 | HubSpot has no seniority field. Title contains VP. Not the same filter. |
| Canada, Operations, Director | 310 | 640 | 18 | 622 | Same title rule as the US Director row. Partial match. |
| Canada, Operations, VP | 310 | 190 | 7 | 183 | Same title rule as the US VP row. Not the same filter. |
Company counts repeat across Director and VP. Don't add them into one total. Already in HubSpot, inside the US Director row: Dana Okafor, [email protected], Director of Operations, Larkspur Freightworks (fictional). No HubSpot records were changed.
How long does it take, and what does it cost?
Estimate About 15–25 minutes, most of it confirming filters and reading the gap table.
Assumptions: One campaign of about four segments, each with an industry, a region, a department and a seniority.
- Cognism: Dictionary lookups plus one company count and one people count per segment. Those calls are free. No record search and no contact reveal. Some tools use credits. company_search and people_search use 1 search token per record returned; people_search with the contacts view also uses 1 credit per person record (contact reveal). Counts and dictionary/account tools are free. Up to 100 records per call. Source: docs.cognism.com, checked 2026-10-16
- HubSpot: Reads only: one contact search per segment. No records created or edited. Credit use not confirmed by HubSpot.
Exact credit costs depend on your plan with each vendor. Check the tool pages before a large run.
Which MCP servers does it use?
Every server is confirmed in: ClaudeChatGPT
-
ClaudeChatGPTClaude CodeCursorCopilotRead onlySome tools use credits
https://mcp.cognism.com/mcp -
ClaudeChatGPTRead + writeCredits not confirmedNeeds admin or IT
https://mcp.hubspot.com
How do I set it up in a chat app?
Every server in this recipe is confirmed for Claude and ChatGPT. Connect each one, then paste the prompts below into one conversation.
- Connect Cognism without code (Claude, ChatGPT)
- Connect HubSpot without code (Claude, ChatGPT)
Developer setup
Auth setup and mcp.json for Claude Code and Cursor
- Cognism: Sign in with OAuth in your client (run
/mcpin Claude Code). Do it once interactively, and the client stores and refreshes the token. - HubSpot: Sign in with OAuth in your client (run
/mcpin Claude Code). Do it once interactively, and the client stores and refreshes the token.
Put this in .mcp.json (Claude Code, project root) or ~/.cursor/mcp.json (Cursor). Swap the example keys for your own, and don't commit real ones. Remove the // comment lines if your client requires strict JSON.
{
"mcpServers": {
"cognism": {
"url": "https://mcp.cognism.com/mcp"
},
"hubspot": {
"url": "https://mcp.hubspot.com"
}
}
}
Step-by-step prompts
- Look up {industries}, {regions}, {departments} and {seniorities} in the Cognism dictionaries. Show the exact dictionary value next to each word I used. Don't return company or person records.
- For each segment I confirm, run a Cognism company count and a people count with those dictionary values. Show the company count, the people count and the filters applied. Use the count tools only. If a count isn't available, stop and tell me how many search tokens a record search would use. Don't return records unless I approve it.
- Search HubSpot contacts for each segment with the closest properties I have, such as {industry_property} and {title_property}. Show the contact count and the exact filters for each segment. Don't change any records.
- Give me one table: segment, Cognism companies, Cognism people, HubSpot contacts, and the gap, which is Cognism people minus HubSpot contacts. Flag any row where the HubSpot filters differ from the Cognism dictionary values. Keep each segment on its own row when companies repeat across personas. Keep the table here as text.
Can I run it on a schedule? (optional)
- Run it by hand before a campaign, when you are choosing who to target.
- Rerun it when the persona or the region changes. Counts are free, so a repeat doesn't spend search tokens.
- If you schedule it, keep it to dictionary lookups and counts. A scheduled run should not return records.
Where does this go wrong?
- A dictionary value that isn't the segment you meant. Show the dictionary value next to your words before counting. Don't count a segment until you confirm the value. Industries and regions have near-matches that change the total.
- A people or company search instead of a count. company_search and people_search use 1 search token per record returned, and the contacts view also uses 1 credit per person record. Counts are free. If the result is a list of records, stop. A call returns at most 100 records, so a list is not the market size.
- HubSpot properties that don't match the Cognism filters. Print the Cognism dictionary values and the HubSpot property filters on the same row. If HubSpot has no department or seniority property, say the gap isn't comparable for that row.
- The same companies counted in more than one persona. Director and VP counts often share one company set. Keep each segment on its own row, and don't add company counts across personas.
Gotchas
- Cognism requires new packages with API/MCP access. Existing packages must upgrade.
- Cognism company counts, people counts and dictionary tools are free. company_search and people_search use 1 search token per record returned. people_search with the contacts view also uses 1 credit per person record (contact reveal). A search call returns at most 100 records. This recipe uses counts only.
- Cognism is read-only. Claude connects through a custom connector (Settings > Connectors > Add custom connector). ChatGPT requires developer mode enabled by your workspace admin.
- A rep can't connect HubSpot alone. Non-admin users need a Super Admin to approve the connector first.
- Explorium AgentSource instead? Its business and prospect statistics tools are free. fetch-businesses and fetch-prospects use 1 credit per returned result, so use the statistics tools for a count. Claude and ChatGPT are not confirmed for it, and setup needs an AgentSource API key.
- Using Salesforce instead? Count contacts with a SOQL query. Salesforce needs Enterprise Edition or above (Developer Edition also works) and an admin-created External Client App. Every tool call counts against the org's daily Salesforce API request quota. ChatGPT requires developer mode.
Download
Get the prompts, guardrails and expected output as one Markdown file. Paste it into a Claude Project or ChatGPT project's instructions, or save it as CLAUDE.md for Claude Code.
New recipe and breakage notes every week
Vendor sites: HubSpot. If we join an affiliate program, these links will be labeled as affiliate links.