TL;DR
- VS Code chat reaches LeadOcean through one
mcp.jsonentry and a browser sign-in. It counts each filter set you describe and returns an exact total, so TAM, SAM and SOM become a handful of counts. - It takes about 15 minutes. The sizing run spends 0 records, because counts and lookups are free.
- Only people returned to you count as records. An optional 10-row spot-check spends 10 of the 1,000 free records.
Prerequisites
- A LeadOcean account from app.leadocean.io. The free plan has no card and gives 1,000 records, one-off.
- VS Code with chat set up. The VS Code MCP docs, September 2026, show how servers are added and managed. Setup details are on Connect LeadOcean to VS Code.
- Optional, for the REST check in Step 6:
curl,jqand a key in your shell as$LEADOCEAN_API_KEY. The chat steps need no key.
export LEADOCEAN_API_KEY="paste-your-key-here"Step 1: Add the LeadOcean MCP server
Create .vscode/mcp.json in your project with one http server. VS Code's config key is servers.
{
"servers": {
"leadocean": {
"type": "http",
"url": "https://api.leadocean.io/mcp"
}
}
}Do not add a headers entry. LeadOcean signs you in with OAuth 2.1 in the browser, so there is nothing to paste. Run MCP: List Servers from the Command Palette, pick leadocean and choose Start Server. Approve the sign-in, then return to VS Code.
Open the tool list: Configure Tools in the chat input for a local session, or Chat: Open Customizations > Tools for a Copilot session. You should see 13 leadocean_ tools. Seven of them never spend records: count leads, count companies, filter list, enum list, account, get export and list exports.
Step 2: Write the buyer in one sentence
A market size is only as good as the buyer definition behind it. Write one sentence that names the industry, company size and role. Keep it to filters LeadOcean holds.
Buyer: engineering leaders (VP or C-level, Engineering) at software companies
with 51 to 500 employees. Product: a developer tool. Question: how big is the
market, how much of it can I sell into from the US, and how many VPs is that?Paste this into chat as the brief. Every later step turns it into counts.
Step 3: Resolve the exact filter values
Filter values are exact strings. "Software" is not an industry value, and "Software Development" is. Make the agent look each value up before it counts anything.
Use leadocean_list_enum_values to find the exact strings for: industry (software),
employee_range, job_level and job_function (engineering). Show me the values you
will use. Do not call any tool that spends records.The agent calls the free lookup and reports back. For this buyer it should settle on these values.
{
"industry": ["Software Development"],
"employeeRange": ["51-200", "201-500"],
"jobLevel": ["VP", "C-Team"],
"jobFunction": ["Engineering"]
}VS Code may ask you to confirm each tool call. Confirm the free ones. Read any prompt that names a spending tool before you accept it.
Step 4: Count TAM, SAM and SOM
Ask for one count per tier. Each tier keeps the filters above it and adds one. Tell the agent to use only the free count tools and to label what each number is.
Use leadocean_count_leads, with facets false, for four counts. Never call a tool
that spends records.
1. TAM: jobLevel VP and C-Team, jobFunction Engineering, industry Software
Development. No size or country filter.
2. Add employeeRange 51-200 and 201-500.
3. SAM: add country US.
4. SOM pool: same as 3, but jobLevel VP only.
Put the results in a table with the exact filters beside each count. Say which
email statuses were counted.A count is a people count. Dollars come from accounts, not people, so the next step counts companies.
Step 5: Count the accounts behind SAM
leadocean_count_companies counts companies for free. It breaks the total down by industry, headcount band, HQ country, HQ state and NAICS.
Use leadocean_count_companies with industry Software Development, employeeRange
51-200 and 201-500, hqCountry US. Give me the total, the split by headcount band
and the top five HQ states. Then multiply the total by $12,000, my annual
contract value, and label the result as a dollar SAM.Put your own contract value in the prompt. LeadOcean holds no figure for your product, so the agent should never guess one. The company count says how many accounts you could sell to. The people count says how many buyers you could write to inside them.
Step 6: Check one count over REST
You can reproduce any chat count from a terminal. The sizing call is a people search with count=true as a query parameter and limit at 1. The body is flat JSON with arrays.
curl -s "https://api.leadocean.io/v1/people/search?count=true" \
-H "x-api-key: $LEADOCEAN_API_KEY" -H "content-type: application/json" \
-d '{
"jobLevel": ["VP", "C-Team"],
"jobFunction": ["Engineering"],
"industry": ["Software Development"],
"employeeRange": ["51-200", "201-500"],
"country": ["US"],
"emailStatus": ["verified", "catch_all_valid", "catch_all"],
"limit": 1
}' | jq '.meta'The REST total is capped at 100,000. For a bigger market, use the MCP count tool, which says when it stopped at the cap. A search with count=true returns no rows, so it spends no records.
What you get
We ran the four counts from Step 4 on 2026-10-21 with leadocean_count_leads, plus the company count from Step 5. Each call spent 0 records.
| Tier | Filters added | Mailable people | All people (totalAll) | Employers |
|---|---|---|---|---|
| TAM | VP and C-Team, Engineering, Software Development | 23,329 | 55,757 | 13,769 |
| Narrowed | + employeeRange 51-200 and 201-500 | 5,680 | 13,579 | 3,496 |
| SAM | + country US | 2,801 | 5,663 | 1,720 |
| SOM pool | VP only | 1,084 | 2,027 | 799 |
The mailable column counts people with a verified, catch_all_valid or catch_all email, which is the tool's default. The totalAll column is the same filters with no email condition. Employers is distinctCompanies, how many companies those people work at.
The agent also returns facets when you leave them on. For the 5,680 row, the 2026-10-21 run split the people by seniority and size, and listed the top countries.
{
"total": 5680,
"totalIsExact": true,
"totalAll": 13579,
"distinctCompanies": 3496,
"credits": 0,
"facets": {
"country": [
{ "value": "US", "count": 2801 },
{ "value": "GB", "count": 294 },
{ "value": "IN", "count": 259 }
],
"seniority": [
{ "value": "c_suite", "count": 3880 },
{ "value": "vp", "count": 1792 },
{ "value": "owner", "count": 8 }
],
"company_size": [
{ "value": "51-200", "count": 3741 },
{ "value": "201-500", "count": 1939 }
]
},
"unsupportedFilters": []
}The country list is cut to three rows here. Read the table as a funnel: 2,801 of the 5,680 sit in the US, and 1,084 of those are VPs.
The Step 5 company count returned 11,577 US software development companies with 51 to 500 employees: 9,261 in the 51-200 band and 2,316 in 201-500. California (3,070), New York (1,107) and Texas (956) lead the HQ states. Only 1,720 of those companies employ a mailable VP or C-level engineering leader in our data. That gap is the difference between your account SAM and your reachable SAM.
Your numbers will move as the data refreshes, so date every count you publish. The counts leave out funding, revenue and headquarters filters on people, which the people count does not support. Those narrow the list further at search time.
Record the cost of the run next to the numbers: five counts and four enum lookups, 0 records spent. The optional 10-row spot-check would spend 10.
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
| Tools never appear in chat | The server is stopped or disabled, or the workspace is not trusted. | Run MCP: List Servers and start leadocean. A server in .vscode/mcp.json follows Workspace Trust, so trust the folder. |
| 401 | Missing, wrong or revoked key on a REST call. | Re-copy the key from app.leadocean.io and export $LEADOCEAN_API_KEY again. |
| 429 | Above your plan's rate: 5 requests a second on Free, 50 on Solo, 200 on Agency, per account. | Wait the Retry-After seconds, then slow the loop. Five counts need nothing near that rate. |
| 402 | Free plan: the 1,000 records are spent. | Counts stay free. Check leadocean_get_account, or move to Solo ($97 a month) or Agency ($497 a month) on pricing. Free records do not reset. |
| Empty results or a count of 0 | A filter value outside the catalogue, such as industry: "Software". | Ask the agent to call leadocean_list_enum_values and use the exact string it returns. |
| Total stops at 100,000 | The REST count is capped at 100,000. | Use leadocean_count_leads, or add a filter and count the pieces. |
FAQ
How many records does sizing a TAM in VS Code cost?
Zero. People counts, company counts, filter lookups and enum lookups are free, however many you run. Records are spent only on people returned by a search, a lookup or an export.
Is a people count the same as a market size?
No. It is the number of reachable buyers in a segment. Multiply accounts by your contract value to get dollars, and use your own price for that step.
Why does the count say "mailable"?
The count tool defaults to verified, catch_all_valid and catch_all emails. Pass emailStatus, hasEmail or reachable to change that. Say which one you used next to every number.
Does VS Code see my API key?
Not through MCP. The server uses OAuth sign-in and no key is pasted into chat. Only the optional REST check reads $LEADOCEAN_API_KEY from your shell.
Can I do this in another editor?
Yes. The same MCP URL works elsewhere. See size your TAM in Claude Code, in Cursor and in Windsurf. More recipes are in the blog hub.
Size your market in VS Code, free
Free to start. No credit card. 1,000 records to spend whenever you like.
Get your free API key →