TL;DR
- GTM teams use Claude Code for the jobs that eat a rep's week: sizing territories, pulling lists, prepping accounts, cleaning CSVs and finding phones. Each one is a prompt or a short script against live B2B data.
- The six workflows below take about 45 minutes in total and spend about 221 of your 1,000 free LeadOcean records. Sizing, lookups and the weekly count are free.
- Claude Code does the glue. LeadOcean supplies the people and company records through one MCP URL or the REST API.
Prerequisites
- A LeadOcean account and API key from app.leadocean.io. The free plan has no card and 1,000 records, one-off.
- The key in your shell as
$LEADOCEAN_API_KEY, pluscurlandjq. - Claude Code installed. The workflows use its MCP support, skills and
claude -pmode.
export LEADOCEAN_API_KEY="paste-your-key-here"
claude mcp add --transport http leadocean https://api.leadocean.io/mcpRun /mcp inside a session and approve the sign-in. The server uses OAuth, so no key goes into the chat. It exposes 13 tools, and seven of them never spend records, including count_leads, count_companies and list_enum_values (LeadOcean MCP docs).
Step 1: Size a territory before anyone touches a list
A count answers "is this territory worth a rep?" in seconds, and it costs nothing. Write the audience as filters, not as a story. Resolve enum values first, because a wrong string returns zero.
Use leadocean_list_enum_values to confirm the exact job_level and job_function strings.
Then use leadocean_count_leads with jobLevel ["VP"], jobFunction ["Sales & Business Development"],
country ["CA"]. Report the total and say which email statuses it counted.
Do not call any tool that spends records.Run it for every territory on your plan. Rank them by count, then give the thin ones to fewer reps. On 21 October 2026 that count was 5,574 mailable people, out of 18,800 matching the filters with no email condition. The default count covers only mailable addresses. A second count, title "GTM Engineer" worldwide, returned 475 mailable people on the same date.
The REST version is a search with count=true as a query parameter and limit at 1. It returns meta.total (capped at 100,000) and no rows.
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"],"jobFunction":["Sales & Business Development"],"country":["CA"],"limit":1}' | jq '.meta'Step 2: Build the list and spot-check it
Pull a small page first. Ten rows costs 10 records and shows whether your title filter is noisy. Ask Claude Code to flag the noise and fix the filter itself. A human still reads the table. The model is good at spotting a stray "Assistant to the VP" and bad at knowing your ICP.
Use leadocean_search_leads with the same filters and limit 10. Show name, job title,
company and email_status in a table. List any title that is not a sales leader and
add a matching word to excludeTitle. Then re-run the free count.For a big pull, do not page through the chat. Claude Code warns when MCP output passes 10,000 tokens, so send hundreds of rows to a file. An export takes up to 50,000 rows a request and 500,000 a day.
curl -s https://api.leadocean.io/v1/exports \
-H "x-api-key: $LEADOCEAN_API_KEY" -H "content-type: application/json" \
-d '{"name":"CA sales VPs","filters":{"jobLevel":["VP"],"jobFunction":["Sales & Business Development"],
"country":["CA"],"emailStatus":["verified","catch_all_valid","catch_all"]},"limit":100,"preset":"full"}' | jq '.data | {id,status,pollAfter}'The full preset includes email columns, which need the full record, so each row costs 2 records and 100 rows spend 200. The reply's perRow field confirms it. Size the limit to your balance. The LeadOcean app has the same export on its Exports page.
Step 3: Brief an account with a reusable skill
An account brief is the same five lookups every time. Save it once as a skill and the whole team runs it with a slash command. Claude Code reads a skill from .claude/skills/<name>/SKILL.md and passes your input in as $ARGUMENTS (Claude Code skills docs, September 2026).
---
name: account-brief
description: One-page brief on a company from LeadOcean data
disable-model-invocation: true
---
For the company domain $ARGUMENTS:
1. Call leadocean_get_company for the domain.
2. Call leadocean_search_leads with domain [$ARGUMENTS], jobLevel ["C-Team","VP","Director"], limit 5.
3. Write a brief: what the company does, headcount, the five contacts, and one angle per contact.
LeadOcean has no news. If I paste news below, use it. Otherwise say none was supplied.Run /account-brief acme.com and the brief costs about 6 records. The disable-model-invocation: true line means only you trigger it, so it never runs by surprise. Reps get the same format every time, which is the real win over a pasted prompt. The REST equivalents are POST /v1/companies/enrich with {"domain":"acme.com"} and GET /v1/companies/acme.com/people?limit=5.
Step 4: Enrich a CSV of known people
A CRM export with emails and no titles is a five-minute job for a script. Enrich takes exactly one of linkedin_url, email, phone or person_id. A person we hold nothing for returns a 404 and costs nothing.
tail -n +2 crm-export.csv | cut -d, -f1 | while read -r EMAIL; do
curl -s https://api.leadocean.io/v1/people/enrich \
-H "x-api-key: $LEADOCEAN_API_KEY" -H "content-type: application/json" \
-d "{\"email\":\"$EMAIL\"}" | jq -c --arg e "$EMAIL" '{email:$e, found:(.success // false)}'
done > enriched.jsonlTest on three rows first, because a bad column index spends records before you notice. Rows that return 404 cost nothing, so a stale CRM list is cheap to run. Then ask Claude Code to write the loop for your CSV layout and to read each response before it merges anything. There is no name-plus-domain lookup, so search by domain first and enrich by person_id.
Step 5: Find phones for the call list
Phones are the expensive field, so only look them up for people who already passed your filters. The phone endpoint is GET /v2/people/phone. It takes person_id, taken from a search row at meta.source_ids.person_id.
curl -s "https://api.leadocean.io/v2/people/phone?person_id=<person_id>" \
-H "x-api-key: $LEADOCEAN_API_KEY" | jqA v2 contact call costs one record, including a call that finds nothing. Add a guard to your prompt for that reason. Use phones for the top of the list, not the whole list.
Look up phones for these two person_ids only. Stop after two calls even if one
returns nothing. Show the numbers as +1 415 555 0133 style, one per line.Step 6: Schedule a weekly count with claude -p
Claude Code runs without a session when you pass -p. Use it for a job that needs no judgment, such as a weekly count of your territory. Allow only the free tool, so a bad prompt cannot spend records (headless docs, September 2026). Claude Code's permission rules name an MCP tool as mcp__<server>__<tool>, and a rule can cover a whole server with mcp__<server>__* (permissions docs, September 2026). Name the single tool here, not the server.
claude -p "Use the leadocean MCP server. Count VPs in Sales & Business Development in CA. Print the total only." \
--allowedTools "mcp__leadocean__leadocean_count_leads" \
--output-format json > weekly-count.json0 8 * * 1 cd ~/gtm && ./weekly-count.shCompare this week's total with last week's and you have a cheap signal for territory growth. Sign in to the MCP server once in an interactive session before you schedule it. Claude Code's docs also list cloud routines, Desktop scheduled tasks and GitHub Actions for jobs that must survive a closed laptop (scheduled tasks docs, September 2026). With --output-format json the result carries total_cost_usd, so you can track the model cost of each run.
What you get
Step 1 uses the free enum lookup. This is the real result from the LeadOcean MCP server on 21 October 2026 for leadocean_list_enum_values with name job_level.
{
"name": "job_level",
"description": "Seniority band of the person's current role.",
"total": 6,
"matched": 6,
"values": ["C-Team", "Director", "Manager", "Other", "Staff", "VP"],
"truncated": false
}A search page has a different shape. This is the response shape from the API reference, with placeholder values.
{
"data": [
{
"profile_data": { "profile_full_name": "Jane Doe", "profile_headline": "<headline>" },
"contact_data": {
"email_status": "verified",
"contact_current_experiences": [{ "job_title": "VP Sales", "company_name": "Acme" }]
},
"meta": { "source_ids": { "person_id": "<person_id>" } }
}
],
"meta": { "count": 1, "limit": 10, "total": "<matches, capped at 100000>", "nextCursor": "<cursor or null>" }
}Troubleshooting
| Error | Cause | Fix |
|---|---|---|
| 401 | Missing, wrong or revoked key | Re-copy the key from app.leadocean.io and re-export $LEADOCEAN_API_KEY. |
| 429 | Above your plan's rate per account: 5 a second on Free, 50 on Solo, 200 on Agency | Wait the Retry-After seconds. Send full pages of 100 instead of more calls. |
| 402 | Free plan: the 1,000 records are spent, or an export limit is above your balance | Lower limit to what GET /v1/account shows, or move to Solo ($97 a month) or Agency ($497 a month). Free records do not reset. |
| Count of 0 or a 400 validation error | A filter value outside the catalogue, such as jobLevel: "Vice President" | Resolve it with leadocean_list_enum_values (or GET /v1/enums) and pass the exact string. |
400 export_limit_rows | limit is above 50,000 rows in one export | Split the audience by country or headcount band and run several exports. |
FAQ
Do I need the MCP server, or is the REST API enough?
Use MCP for sizing, spot-checks and briefs, where you want Claude Code to pick filters. Use REST or an export for loops and bulk pulls. Both draw on the same record count.
Can Claude Code write the results into my CRM?
LeadOcean has no CRM and no sequencer. Claude Code can call your CRM's own API if you give it the credentials. See the Salesforce workflow guide for one worked route.
How many records does this cost?
One record per person or company returned, and 2 per export row that carries emails. The six steps above spend about 221: 10 in the spot-check, 200 in the export, 6 for one brief, 3 for the enrich test and 2 for the phone lookups. Counts and enum lookups are free.
Where do I go next?
Start with how to build your Claude sales team for B2B GTM. Then wire a full flow with how to build a B2B prospecting workflow with Claude Code. Plans are on pricing, and more recipes live in the blog hub.
Run your first Claude Code GTM workflow today
Free to start. No credit card. 1,000 records to spend whenever you like.
Get your free API key →