TL;DR
- You add LeadOcean to Codex CLI once, then ask for the C-level and VP people at any company domain.
- It takes about 15 minutes the first time and about 5 after that.
- A full run spends 12 LeadOcean records: 10 for the search, 2 for enriching the people you pick. Counting is free.
Prerequisites
- A LeadOcean account. Start free: no card, 1,000 records one-off, work email required.
- Codex CLI installed and signed in. The Codex MCP docs, October 2026, say the CLI, the IDE extension and the desktop app share one MCP configuration.
- Optional, for the script in Step 5:
$LEADOCEAN_API_KEYin your shell andcurl.
You paste no API key into Codex. The MCP server uses OAuth sign-in.
Step 1: Add LeadOcean to Codex CLI
Register the server with one command, then sign in. The setup for every client, Codex included, is on MCP for agents.
codex mcp add leadocean --url https://api.leadocean.io/mcp
codex mcp login leadoceanThe login opens your browser on LeadOcean. Approve, return to the terminal, and the tools load. Codex supports OAuth with Dynamic Client Registration, and the LeadOcean server supports it too, so you create no client ID.
If you prefer a file, the same entry goes in ~/.codex/config.toml. A project-scoped .codex/config.toml also works for trusted projects.
[mcp_servers.leadocean]
url = "https://api.leadocean.io/mcp"Do not add a bearer token or header block. Run codex mcp list to confirm, start codex, and type /mcp to see the server. It exposes 13 tools. Seven are free, and leadocean_count_leads is the one you use next.
Step 2: Size the decision makers before you pull anyone
Ask for a count first. Counting costs 0 records, so you can tune the filters as often as you like. In the Codex prompt, send:
Use the leadocean MCP server only. How many C-Team and VP people in
Engineering are in the US? Count only. Do not pull anyone.Codex calls leadocean_count_leads with these arguments:
{
"jobLevel": ["C-Team", "VP"],
"jobFunction": ["Engineering"],
"country": ["US"],
"facets": false
}The values are exact strings. If Codex guesses one, tell it to call leadocean_list_enum_values first.
The count tells you how crowded the market is before you spend anything. A small number means your filters are tight. A very large one means you should add jobFunction, country or a title before you search a single company.
Step 3: Search one company by domain
Now point the same filters at one company. Use the domain, not the company name. Names match loosely, and a domain matches the employer exactly.
Use the leadocean MCP server only. Find decision makers at acme.com:
C-Team and VP level people. Call leadocean_search_leads with limit 10.
Show title, level and whether an email is on file. Do not enrich anyone yet.The tool call looks like this:
{
"domain": ["acme.com"],
"jobLevel": ["C-Team", "VP"],
"limit": 10
}This spends up to 10 records, one per person returned. A small company returns fewer. Swap acme.com for your own target. Add jobFunction to narrow to one department, such as Engineering.
Codex asks before it runs a tool unless you change the approval mode. Read the arguments before you approve. A wrong limit is the usual way to overspend.
If the first ten people are all junior, do not raise the limit. Tighten the filter instead. Add jobFunction, or switch jobLevel to C-Team only, and run the search again. A narrower filter returns fewer rows, so it also spends fewer records.
Step 4: Enrich the two people you want
Search rows carry a person_id. Enriching by that id is how you reach a person with no LinkedIn URL. Ask Codex to enrich only the people you picked:
Enrich the CTO and the VP of Engineering from that list with
leadocean_get_lead using their person_id. Show the work email and its
email_status. Tell me how many records this call spent.Pick by role, not by seniority alone. The CTO signs off on the budget, and the VP of Engineering usually owns the evaluation, so you want both on a developer-tool deal. Each enrichment costs 1 record. A person we hold nothing for is a miss, and a miss costs nothing. Read email_status before you send anything. Bounced emails are not refunded.
The enriched record also carries career history when we hold it: past roles with titles, employers and dates, plus education and certifications. A VP who joined last month reads differently from one with five years in the seat.
Step 5: Run the same search from a script
Codex calls the same API you can call yourself. Use this when you want the list in a file instead of a terminal session. The search is a flat JSON body, and filters are arrays.
curl -s -X POST https://api.leadocean.io/v1/people/search \
-H "x-api-key: $LEADOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain": ["acme.com"], "jobLevel": ["C-Team", "VP"], "limit": 10}'Enrich one person with the id from the search row:
curl -s -X POST https://api.leadocean.io/v1/people/enrich \
-H "x-api-key: $LEADOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"person_id": "1234567890", "reveal_email": true}'Enrich takes exactly one of linkedin_url, email, phone or person_id. To list everyone we hold at a company instead, use GET /v1/companies/acme.com/people, which bills one record per person returned.
What you get
The count in Step 2 is a live result. We ran it on 2026-10-21 through the LeadOcean MCP server:
{
"total": 81869,
"totalIsExact": true,
"totalAll": 194025,
"credits": 0,
"defaults": "Counted only addresses worth sending to (emailStatus: verified or catch_all_valid or catch_all)"
}That is 81,869 C-Team and VP engineering leaders in the US with a verified, catch_all_valid or catch_all email. It cost 0 records. Everyone we hold for those filters is totalAll: 194,025.
Here is what the full run costs, step by step. The first two steps are free calls, the others are an estimate from the metering rules in the LeadOcean MCP docs, October 2026.
| Step | Tool | Records |
|---|---|---|
| 2. Size the audience | leadocean_count_leads | 0 |
| 3. Search acme.com, limit 10 | leadocean_search_leads | up to 10 |
| 4. Enrich two people | leadocean_get_lead | 2 |
| Total | up to 12 |
A search that returns four people costs 4, not 10. Ask Codex to report the records spent after each call, then check the total with leadocean_get_account, which is free.
For one company, the people come back in the response shape from the API reference. These are placeholder values, not a real person:
{
"success": true,
"data": [
{
"profile_data": { /* name, title, company for Jane Doe at acme.com */ },
"contact_data": {
"has_email": true,
"has_phone": true,
"email_status": "verified",
"email_type": "work"
},
"meta": { "source_ids": { "person_id": "1234567890" } }
}
],
"meta": { "count": 1, "nextCursor": null }
}Search shows flags such as has_email, not the address. Enrich with reveal_email set to true returns contact_emails and contact_phones, a phone looking like +1 415 555 0133, at no extra record.
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
| 401 | Missing or wrong x-api-key header, or the MCP sign-in was not approved. | Check $LEADOCEAN_API_KEY, or run codex mcp login leadocean again. |
| 402 | The 1,000 free records are spent. | Check leadocean_get_account, or move to Solo at $97 a month. |
| 429 | Above your plan's rate limit (5 a second on Free, 50 on Solo, 200 on Agency), or a fair-use window reached. | Wait the Retry-After seconds and retry. Add a short delay between calls. |
| Empty results | An enum value is not an exact string, such as VP of Engineering for jobLevel. | Call leadocean_list_enum_values and copy the value. Use title for free-text job titles. |
| 404 on enrich | We hold no person for that identifier. | Search by domain first, then enrich by person_id. A 404 costs nothing. |
| Export refused | A bulk pull is past 50,000 rows a request or 500,000 a day. Bulk CSV export is not on Free. | Split the pull into smaller exports across days. Exports start on Solo. |
FAQ
How many decision makers will I find at one company?
It depends on company size. A 10-person startup may return two or three C-level people, and a large company can fill the 10-row limit. Page with cursor for more, and each extra person costs 1 record.
Do I need to write code?
No. Steps 1 to 4 run entirely in Codex with plain prompts. The script in Step 5 is optional.
What counts as a decision maker?
Use jobLevel set to C-Team and VP as the base. Add Director for mid-market accounts. Add jobFunction or title when you want one buyer, such as a head of platform.
Can I stop Codex from running the spending tools?
Yes. The Codex docs list disabled_tools and enabled_tools per server in config.toml. Disable leadocean_export_leads if you only want searches. Our other guides cover the same run in Gemini CLI, Windsurf and VS Code.
Find the decision makers at your next target account, free
Free to start. No credit card. 1,000 records to spend whenever you like.
Get your free API key →