Pre-Black Friday: 20% off, for as long as you stayEARLYBFon Solo and AgencyEnds Nov 28Start free

How-to guide

How to Size Your TAM in Claude Code (2026)

Add one MCP URL, describe your buyer as filters, and count the market for free. No records spent on sizing.

Get your free API key →Free to start. No credit card. 1,000 records to spend whenever you like.

TL;DR

  • Claude Code counts your market through one MCP URL. You write the buyer as filters, and LeadOcean returns the number of reachable people.
  • It takes about 10 minutes. The sizing spends 0 records. An optional five-row spot-check spends 5 of your 1,000 free ones.
  • A count is an exact number you can defend, not a guess. On 2026-10-01 we counted 4,672 mailable US software sales leaders. On 2026-10-21 we counted 12,380 US software companies.

Prerequisites

  • A LeadOcean account from app.leadocean.io. The free plan has no card and 1,000 records, one-off.
  • Claude Code installed. The MCP route signs you in with OAuth, so no key is pasted into the chat.
  • For the REST step only: your key in the shell as $LEADOCEAN_API_KEY, plus curl and jq.
bash
export LEADOCEAN_API_KEY="paste-your-key-here"

Step 1: Connect the LeadOcean MCP server

Add the hosted server over HTTP, then sign in. Claude Code's docs say to run /mcp inside a session to authenticate a remote server.

bash
claude mcp add --transport http leadocean https://api.leadocean.io/mcp
claude mcp list
text
/mcp

Pick leadocean and approve the sign-in in your browser. The server exposes 13 tools. Seven never spend records: the people count, the company count, filter list, enum list, account, get export and list exports. Full setup is on Connect LeadOcean to Claude Code.

Step 2: Write your buyer as filters

TAM starts with a definition, so write it before you count. A sharp definition is a job level, a function, a country, an industry and a company size.

This example sells to US software companies with 51 to 1,000 staff. The buyer is a VP or C-level sales leader. Ask Claude Code to resolve the exact enum strings first, because guessed values return zero.

text
Use the leadocean MCP server. Call leadocean_list_enum_values for industry with q "software"
and for job_level. Show me the exact strings. Do not call any tool that spends records.

Industry returns seven software values, including Software Development. Job level accepts C-Team and VP. Pick the values that match your buyer. Do not broaden to all seven unless you sell to all seven.

Step 3: Count the segment for free

Now count. leadocean_count_leads takes the same filters as search and spends nothing, however often you call it.

text
Use leadocean_count_leads with jobLevel ["VP","C-Team"], jobFunction ["Sales & Business Development"],
country ["US"], industry ["Software Development"], employeeRange ["51-200","201-500","501-1000"].
Report the total, whether it is exact, and the facet breakdown. Say which email statuses it counted.

By default the tool counts only addresses worth sending to: verified, catch_all_valid and catch_all. The number is the mailable audience, not everyone who matches. Say so in your TAM doc.

Step 4: Move the email-status lens

One market has three honest sizes. Ask for each, so you can show a floor, a working number and a ceiling.

text
Run the same count three ways: (1) default mailable statuses, (2) emailStatus ["verified"] only,
(3) every emailStatus value. Pass facets false for (2) and (3). Give me a three-row table
and label each row by the filter it used.

Passing every email status removes the email filter, so row three is everyone we hold for those filters. It is the widest definition of the market. Row two is the safest list to send to.

Step 5: Count the accounts

People counts are not account counts. For accounts, ask Claude Code to call leadocean_count_companies. It is free, returns an exact total and breaks it down by industry, headcount band, HQ country, HQ state and NAICS.

text
Use leadocean_count_companies with industry ["Software Development"],
employeeRange ["51-200","201-500","501-1000"], hqCountry ["US"].
Report the total, the split by headcount band and the top five HQ states.

The REST version is /v1/companies/count. It takes the company-search filters, costs nothing and returns no rows.

bash
curl -s -X POST https://api.leadocean.io/v1/companies/count \
  -H "x-api-key: $LEADOCEAN_API_KEY" -H "content-type: application/json" \
  -d '{
    "industry": ["Software Development"],
    "employeeRange": ["51-200", "201-500", "501-1000"],
    "hqCountry": ["US"]
  }' | jq '.data | {total, totalIsExact, employee_range: .facets.employee_range}'

A search with count=true stops its meta.total at 100,000. The company count is exact at any size. A filter it cannot apply is named in unsupportedFilters and the total is withheld rather than wrong.

Step 6: Turn counts into a TAM table

Give Claude Code your own deal size. LeadOcean does not hold your price, so it is an assumption you state.

text
Build a TAM table in tam.md from the counts above. Columns: segment, size band, people, accounts.
Add a line: TAM = accounts x annual contract value. Leave ACV as a placeholder I fill in.
Add a note that every people count is mailable only and dated 2026-10-01.

Claude Code writes the file to disk. Keep the dated counts in it, with the filters beside each one.

Add a second cut by state if your sales team is split by territory. The company count already returns the HQ state breakdown, so no extra call is needed. Ask Claude Code to add one row per state for your top five territories. They change as the data refreshes monthly.

For a sanity check, spend five records on a spot-check. Ask for leadocean_search_leads with the same filters and limit 5, and read the titles. Each person returned counts one record.

What you get

This is the real output of leadocean_count_leads on 2026-10-01 for the Step 3 filters. It cost 0 records.

json
{
  "total": 4672,
  "totalIsExact": true,
  "credits": 0,
  "facets": {
    "seniority": [
      {"value": "vp", "count": 3668},
      {"value": "c_suite", "count": 899},
      {"value": "owner", "count": 105}
    ],
    "company_size": [
      {"value": "51-200", "count": 2060},
      {"value": "201-500", "count": 1389},
      {"value": "501-1000", "count": 1223}
    ]
  }
}

The three email lenses from Step 4, same filters, same date:

LensPeople
verified only1,413
Default mailable (verified, catch_all_valid, catch_all)4,672
Every email status (unfiltered on email)10,889

Only 1,413 of the 4,672 mailable people are verified. That gap is the real TAM question: how much risk of a bounce you accept. Read email_status before you send. LeadOcean does not refund bounced emails.

The account count from Step 5 ran on 2026-10-21 with leadocean_count_companies and cost 0 records. It found 12,380 US-headquartered Software Development companies with 51 to 1,000 staff, exact. The split was 9,261 at 51-200, 2,316 at 201-500 and 803 at 501-1000. California led with 3,306, then New York (1,193) and Texas (1,017).

Troubleshooting

ErrorCauseFix
Needs authentication in claude mcp listYou added the server but have not signed inRun /mcp, pick leadocean and approve the sign-in.
401Missing, wrong or revoked key on the REST stepRe-copy the key from app.leadocean.io and re-export $LEADOCEAN_API_KEY.
429Above your plan's rate per account (5 requests a second on Free, 200 on Agency)Wait the Retry-After seconds. Space out your counts.
402Free plan: the 1,000 records are spentSizing stays free, but searches stop. Move to Solo at $97 a month, or keep counting.
400, or a count of 0A filter value outside the catalogue, such as industry: "Software"Resolve it with leadocean_list_enum_values and pass the exact string.
REST search total stops at 100,000meta.total on a search with count=true is capped at 100,000Use leadocean_count_leads or /v1/companies/count, or narrow by country or headcount band and add the counts up.

FAQ

How many records does it cost to size a TAM?

None. count_leads, count_companies and list_enum_values are free, and so is a search with count=true and limit 1. Only rows you receive count as records.

Is the count my whole market?

No. The default counts mailable people only: verified, catch_all_valid and catch_all. Pass every email status to count everyone we hold for the filters.

Why not search and count the rows?

A search returns at most 100 rows a page and spends one record per person. One search also stops paging at 10,000 rows, with meta.depthCapped on the last page. A count returns the total in one call for nothing.

Can I size by state or NAICS code?

Yes, for companies. leadocean_count_companies returns breakdowns by HQ state and NAICS with every total, and takes hqState, naicsSector and naicsPrimary as filters. The people count does not accept hqState or naics, so cut people by the person's country instead.

Can I do this in another editor or in Claude?

Yes. The same MCP URL works elsewhere. See size your TAM in VS Code and size your TAM in Claude. For the definitions, read TAM, SAM and SOM. Plans are on pricing.

More recipes live in the blog hub.

Size your market in Claude Code, free

Free to start. No credit card. 1,000 records to spend whenever you like.

Get your free API key →