How to use Claude to find leads for your MSP
- Lean Cybersecurity
- May 14
- 3 min read
Updated: 7 days ago
Using an LLM for prospecting allows you to get more granular with finding prospects that match your Ideal customer profile than a traditional CRM. I use Claude for finding businesses that match my ICP, then use my CRM to find individuals to reach out to at that business.
I've found that Claude is good at finding businesses, but not so much individuals.
This script typically costs ¢30 per execution in token usage.
Here is an example output from this script that can be imported into a CRM:

Prereqs:
This script is heavily vibe coded. Because of that, I recommend using a non production VM. This VM should not have any data that is important or confidential. This should not be a VM your business relies on. You will need to install python3 on this VM.
I use a windows machine for prestaging , and an Ubuntu VM hosted in Azure for running the script. A Hostinger VPS works as well and is usually cheaper than Azure.
Sign up for the Claude API here: https://platform.claude.com/. I recommend starting with $20.
Claude account, you can sign up here: https://claude.ai/.
Knowledge of what columns your CRM requires to import a .csv file.
TLDR Instructions:
Upload this python file to Claude and tell Claude to customize for your ideal customer profile (city, headcount, industries, etc.). Also, tell Claude what columns your file needs to import a .csv file. Example below.

Move the python file Claude creates to your segmented VM and set up a scheduled task or cron job that runs this file with at least a 10 minute gap.
Install the requirements on your VM as well.
You will need to provide a .env file in the same directory as your python file that has your Claude API key, example provided here.
I recommend running this once per day to start.
It will spit out a list of 10 or so new prospects for you until it runs out of prospects in your market. You can upload this prospect file to your CRM.
Step-by-Step Instructions
Prestaging
Download this .zip file and extract it https://github.com/leancybersec/Prospector.

Go to https://claude.ai/new, upload the prospectortemplate.py file.

Next, advise Claude about your ideal customer profile. Below is an example:
"""Customize this script for me. I run an MSP in the Green Bay area and am prospecting.
City: Green Bay, WI and surrounding towns within 30 miles
Industries: Healthcare (private practices, clinics, dental groups) and law firms (small-to-midsize, not solo practitioners)
Employee size: 25 to 150 employees
Volume: 20 prospects per day, split evenly between the two industries
CSV Columns: My CRM requires City, State, website, and company name. Please include these on the CSV exports.
"""

Once Claude has finished with the python file, download it.

Move the prospector.py file that Claude created to the extracted Prospector-main folder and delete the prospectortemplate.py file.
Open the env.example file in a text editor, and go to https://platform.claude.com/settings/workspaces/default/keys in a web browser.
Click "create key" on the top right of your screen in your web browser.

Name your key and click "Add"

Copy the key it gives you, and put it in the env.example file where it says "sk-ant-your-key-here " on the env.example file.

Save the env.example file as .env in the Prospector-main folder.

Next, copy the Prospector-main folder to your segmented virtual machine.
In case you need it, here is the SCP syntax for going from Windows to Linux using an SSH key:
scp -i C:\Users\You\.ssh\id_ed25519 -r C:\Users\You\Downloads\Prospector-main\ user@192.168.1.50:/home/user/
Set Up on Non-production VM
On the non-production VM, move into the Prospector-main folder. Install the python requirements. For simplicity and since this is non-prod, I am using "--break-system-packages" to the install rather than setting up a python virtual environment.

"pip install -r requirements.txt --break-system-packages"
Once the requirements are installed, execute the file.

Typically, around 10 prospects are spit out and added to the "newprospects_ddmmyyyy.csv" file. From here, I copy that file to my CRM and begin prospecting.
If you want to set this to execute automatically, you can set up a cron job or scheduled task that points to the python file.
That should be all for the setup. The most common problem I have ran into is being rate limited by the anthropic API. I would recommend reducing the MAX_API_TOKENS here as well as the WEB_SEARCH_MAX_USES if you run into this.

Claude is also very good at troubleshooting rate limiting, take a screenshot of the error and throw it into Claude.
About Me
I've been using process for prospecting and have had success with it, thought it would be useful to share.
I founded Lean Cybersecurity to help MSPs fix security gaps that would have led to real incidents.
From my experience, most MSPs are so busy they don't have time to security harden.
Currently offering a pilot program, 20 hours of free security reviews for 5 MSPs.
If you have any questions about this prospecting process or us, reach out at contact@leancybersec.com


Comments