Paste a LinkedIn profile URL into Claude or Cursor and the agent calls get_lead for you. One URL, OAuth sign-in, 1 record per match and nothing for a miss.
This page is about setup and prompts. For the REST endpoint and the field table, see LinkedIn to Email. Other clients are on the MCP hub. The opposite direction is email to LinkedIn with MCP, with the REST version at Email to LinkedIn.
Connect the server
The server is https://api.leadocean.io/mcp. It signs in with OAuth 2.1, so there is no key to paste. Create a free account first.
Claude Code. The command format is from the Claude Code MCP docs, September 2026:
claude mcp add --transport http leadocean https://api.leadocean.io/mcpThen run /mcp in a session and finish the browser sign-in. claude mcp login leadocean does the same from the shell.
Cursor. Add a remote server to mcp.json, in the url form shown in the Cursor MCP docs, September 2026:
{
"mcpServers": {
"leadocean": {
"url": "https://api.leadocean.io/mcp"
}
}
}Cursor starts the OAuth sign-in the first time the server is used. Other clients are listed in the LeadOcean MCP docs.
The tool
The tool is get_lead. The server lists it as leadocean_get_lead. It costs 1 record per call, and 0 when it finds nobody.
| Input | Type | Meaning |
|---|---|---|
linkedin_url | URL | A profile URL such as https://www.linkedin.com/in/jane-doe. The preferred key. |
reveal_email | boolean | Default false. Set it to true for this task, or no address comes back. |
email | string | A work email, for the opposite direction. |
phone | string | A number in any common format. Who owns it. |
person_id | string | The id a search row carries. Digits only. The only key for people with no LinkedIn URL. |
Send one identifier. There is no tool named for work email, so the agent passes linkedin_url with reveal_email: true. The REST twin for a single checked work address is GET /v2/people/email/work. The MCP tool returns the full person record instead, at the same 1 record.
Prompts that work
| Prompt | What the agent calls | Records |
|---|---|---|
| "Get the work email for https://www.linkedin.com/in/jane-doe and tell me its status." | get_lead with linkedin_url, reveal_email: true | 1 |
| "Here are 15 LinkedIn URLs. Return name, work email and status in a table. Skip any you cannot match." | get_account, then get_lead per URL | 15 at most |
| "How many people at acme.com have a mailable email? Do not pull anyone yet." | count_leads with domain | 0 |
Put a record limit in the prompt. "Stop after 25 records" is enough for the agent to hold a batch.
Tell the agent to send only to verified or catch_all_valid addresses and to report the status of every row. LeadOcean gives no refund for bounced emails.
What the agent gets back
The result is one leadocean.person.v1 object plus a meta block. Field groups are from the enrich docs, September 2026. Values below are placeholders.
{
"person": {
"profile_data": {
"profile_full_name": "Jane Doe",
"profile_url": "https://www.linkedin.com/in/jane-doe"
},
"contact_data": {
"has_email": true,
"email_status": "verified",
"contact_emails": [
{ "email": "jane.doe@acme.com", "type": "work", "status": "verified" }
]
}
},
"meta": { "source": "...", "key_hash": "...", "schema": "leadocean.person.v1" }
}Read type before sending: work is the person's current employer, work_other is usually one they have left. Unknown values are null. If contact_emails is empty, we hold no address for that person.
Free checks first
count_leads, list_enum_values and get_account spend no records. Run them before any paid call.
We ran count_leads with domain: ["hubspot.com"] on 2026-10-01. It returned total: 5931, totalIsExact: true, credits: 0. That counts mailable people at the domain (verified, catch_all_valid or catch_all), not everyone we hold. It tells the agent whether a company is worth a paid lookup.
Troubleshooting
| Error | Cause | Fix |
|---|---|---|
| 401 | The OAuth sign-in is missing or expired. | Run /mcp in Claude Code and re-authenticate. In Cursor, sign in again from the MCP settings. |
| 402 | The free 1,000 records are spent. The free plan is one-off, it does not reset. | Move to Pro at $499 a month. |
| 429 | Over 100 requests per second per key. | Wait one second and retry. Ask the agent to run lookups in small batches. |
| Wrong enum | A filter value is not in the catalogue, for example a made-up industry in a count_leads call. | Call list_enum_values with a search term and use the exact string it returns. |
FAQ
Do I need an API key for MCP?
No. The MCP server uses OAuth sign-in. The REST API uses an x-api-key header. Both draw on the same records.
What does a call cost, and what does a miss cost?
A match costs 1 record, with or without reveal_email. A get_lead call that finds nobody costs nothing, the same as the REST 404. The REST contact endpoints under /v2/people/... do charge for a call that finds nothing. See pricing.
Can the agent work through a whole list of LinkedIn URLs?
Yes, one call per URL, at up to 100 a second per key. Free covers 1,000 lookups once. Pro is $499 a month, flat. The match rate is not published, so test a sample of your own list first.
Turn your first LinkedIn URL into an email from Claude, free
Free to start. No credit card. 1,000 records to spend whenever you like.
Get your free API key →