You can use Claude Code to find companies and contacts through an MCP server, then save a reviewed prospect list directly from your terminal. This example starts with a small batch of U.S. landscaping businesses, checks who runs each business, and saves only the people you approve to a local CSV.
I’m a co-founder of GetLeads, the B2B database used in this guide.
1. Connect GetLeads to Claude Code
Follow Anthropic’s setup guide to install Claude Code and sign in with an account that includes Claude Code access. You’ll also need a GetLeads account. Run these commands from a terminal:
mkdir -p prospect-list
cd prospect-list
claude mcp add --transport http --scope local getleads https://app.getleads.io/api/mcp
claude
Local scope makes the connection available to you in this project directory. In Claude Code, type /mcp, select getleads, then choose Authenticate. Sign in to GetLeads in the browser and select Allow. Return to the terminal and check that the server shows as connected. You can also run claude mcp list from the same directory in a second terminal. See the Claude Code MCP reference for authentication and scope, or use the copy-and-paste setup on the GetLeads MCP page if you want the connection across projects.
Call GetLeads
get_available_columns. Show me the fields for company headquarters, industry, domain and current job title. Stop after the field lookup.
If Claude Code asks whether it may run the tool, check the server and tool name before approving. A returned field catalogue confirms the connection can read from GetLeads.
2. Count and review companies first
Suppose you sell scheduling software to U.S. landscaping businesses with roughly 20–200 employees. You want businesses that provide landscaping services and plan to reach their owners or operations leaders. Company headquarters is the geography that matters in this example.
Find U.S.-headquartered landscaping service companies with roughly 20–200 employees. Check supported company filters and industry values first. Use
count_companiesto test relevant industry labels and description terms such as landscaping, lawn care and grounds maintenance. Combine overlapping ways to find the same business into one search where supported. Show me the filters and the combined count. Then usesearch_companiesto preview up to 10 companies with name, domain, headquarters, size band and description. Flag uncertain matches and wait for me to approve the domains.
Review the descriptions and open company websites where fit is unclear. A search for “landscaping” can also bring back equipment suppliers or businesses that serve landscapers. GetLeads’ size filters can match overlapping company-size bands, so verify the size of any borderline company if your cutoff is firm. See the GetLeads API and MCP reference for company filters.
3. Find the right people at the approved domains
Use the approved domains as the company filter. Group owner titles such as Owner and Founder together, and operations titles such as Director of Operations and Operations Manager together. Someone may fit both groups, so count the combined audience before retrieving contacts.
Use only the approved company domains. Look for owners and operations leaders. Show the title variants you grouped for each role and use
count_contactsto size the combined search. Then usesearch_contactsto preview up to 10 people. Show name, current title, company, domain, LinkedIn URL, work email and email status where available. Mark unclear roles for review. Stop before enrichment or export.
Different named filters intersect, so adding a department to a title filter can exclude an owner who has no department label. For alternatives across fields, use the documented where_sql predicate on supported fields. The GetLeads search guide explains how to combine overlapping searches and check which filters removed valid matches.
4. Save the rows you approved
- Check the current role and employer. Review potential duplicates using name and work email alongside the company and profile details.
- Keep the email status as returned and leave missing fields blank. A catch-all result leaves the individual mailbox unconfirmed. Record the date you retrieved the rows.
- Approve specific rows before asking Claude Code to write the CSV. Apply your suppression list and any exclusions before using the list for outreach.
Write only the rows I marked Keep to a new
prospects.csvin this folder. Use columns for name, current title, company, domain, LinkedIn URL, work email, email status and retrieval date. Preserve blank fields and check that the CSV row count matches the number of approved contacts. Save the search filters and review date insearch-notes.md. Leave existing files intact.
Writing the selected preview rows uses Claude Code’s local file tools. For a larger GetLeads export, use export_contacts after approving the filters, columns and row cap, then check it with check_contact_export. That export runs against the filters, so review the resulting CSV before using it. Counts are free. Search results, exports and standard enrichment use plan credits or draw on fair-use allowances. Check your account’s limits with get_fair_use and see GetLeads pricing for current plans.