Claude Code with Yirlo: run your outbound from the terminal
By the Yirlo team · Product details checked against the app
Hook Claude Code up to Yirlo's MCP server and your account is within reach from the editor: review results, adjust budgets and reply to leads. Installation takes one command and a key taken from the app. Below you'll find the command itself, a first request to verify the connection, example questions to put to it, and advice on protecting the key.
What the Yirlo MCP server gives Claude Code
Yirlo exposes an MCP endpoint at yirlo.com/mcp, speaking the Streamable HTTP transport (MCP revision 2025-06-18). Once Claude Code is connected, 33 tools show up, each wrapping one call to Yirlo's public API. Claude Code works through those calls instead of reading pages or clicking around the app. It reads and changes your account the way your own scripts would.
To get started, open yirlo.com and enter your website address. Yirlo reads what you sell and proposes campaigns that fit. Every project after that can come straight from Claude Code, where create_project takes your domain. A company without a site can describe itself in a few sentences instead: the offer, the buyers and the region served. Setup takes about a minute, and each campaign stays paused until you choose to start it. With campaigns running, an agent can handle the daily upkeep. This works well for a founder or developer who lives in Claude Code and prefers to ask "how many hot leads this week" over opening one more browser tab.
Before you start
Two things must be in place before you connect: a Yirlo project and an API key. Create your first project at yirlo.com by entering your site's URL, and Claude Code can run it from there.
Live keys start with yk_live_. One key works with all of them: the public API, the MCP endpoint and the two SDKs. Claude Code needs no separate credential. Copy the key the moment it appears and keep it somewhere private until the next step.
Setup: the exact command
In a terminal, paste this line, swapping YOUR_KEY for your yk_live_ key:
claude mcp add --transport http yirlo https://yirlo.com/mcp --header "Authorization: Bearer YOUR_KEY"An X-API-Key header works too, if that format suits you better. Claude Code was tested with the Authorization Bearer form, so stick with it unless something forces a change.
Next, open Claude Code and type /mcp. The list should show yirlo as connected. We tested this flow end to end: Claude Code connected and then called get_balance and list_projects without any further configuration.
Your first test request
Start with something harmless that only reads data. Ask Claude Code: "Use Yirlo to show my credit balance and list my projects." It will call get_balance and list_projects and answer in plain language.
If both answers look right, the connection and the key are good. From there, try a read on the campaigns: "List my campaigns and tell me which one has the most replies." That uses list_campaigns and campaign_analytics, and it gives you a feel for how Claude Code reports back before you ask it to change anything.
What you can ask
The 33 tools fall into a few groups. create_project sits among the project tools, and import_leads, get_import, leads_from_post and list_posts handle your own lead lists and the people who respond to your posts. Tool names are optional knowledge, since Claude Code picks the right one from your request. Some example asks that map to real tools:
- Account and money: "What is my balance?" or "Raise the daily budget to $30." These use get_account, get_balance, get_project_budget, set_project_budget and set_campaign_budget.
- Campaigns: "Pause the dentist campaign." or "Launch the campaign I just approved." The tools behind these requests are stop_campaign, start_campaign, create_campaign, archive_campaign, get_campaign and list_campaigns.
- Results: "How many hot leads this week?" or "Compare reply counts across campaigns." These use project_analytics, campaign_analytics and list_hot_leads.
- Inbox: "Show me the last conversation with the interested lead from the logistics campaign." These use list_inbox and read_conversation.
- Want to answer a lead and keep notes in one go? Tell Claude Code to respond to the latest interested person and offer Tuesday. Separate tools update lead notes and status, so your pipeline records stay orderly.
- Suppression: a prompt such as "Never email anyone at my rival's domain" works here. Behind it sit suppress_emails for single addresses and suppress_domains for whole companies.
- Automation and teammates: list_webhooks, add_webhook and test_webhook manage where reply and hot lead events get delivered, whether that is Zapier, n8n, Make or a URL you run yourself. list_team and invite_teammate cover who has access.
A few workflows that fit Claude Code well
A morning check takes one sentence. Ask for hot leads since yesterday, then ask Claude Code to read each conversation and summarize what the person wants. You get a short briefing, and you can tell it to add a note to a lead with set_lead_note so the context stays attached to the conversation.
Budget changes are another natural fit. If one campaign is pulling replies and another is flat, you can ask Claude Code to compare them, then raise the budget on the stronger one. Yirlo already shifts daily budget toward campaigns that get replies, so your manual change works on top of that.
List hygiene is quick too. After a call where a prospect mentions a competitor, a partner or a customer you should never email, tell Claude Code the domain and it adds it to the suppression list. The same goes for individual addresses.
If a lead asks something only you can decide, Claude Code can draft a response from the conversation. Ask to see the text first. Sending via the reply tool delivers a real email to the lead, so read the draft before telling Claude to proceed.
Keeping the key safe
A yk_live_ key can read your account, change budgets, start campaigns and send replies to leads. Treat it like a password for the whole project.
The setup command contains the key, which means it can end up in your shell history. Clear that entry afterward, or paste the command from a password manager rather than a note or chat. Keep the key out of repositories, screenshots, tickets and anything you share with teammates. If a teammate needs access, invite them from Integrations, Team, or with invite_teammate, so they sign in with their own address and create their own key.
Then run claude mcp remove yirlo and add the server again with the new key. Afterwards, look over your credit balance and recent campaign activity for anything odd.
Because spending and sending are both possible through this connection, it also helps to keep your daily budget set at a level you are comfortable with. The budget is the ceiling on what the agent can spend in a day, whoever is asking.
Other ways to connect
The MCP server is one of several ways into the public API. To push results into a CRM, Yirlo sends signed webhooks when a reply comes in or a new hot lead appears. A Zapier, n8n or Make step then files each one in the CRM your team already uses. The API reference lives at yirlo.com/api-docs, and your existing key authenticates there as well.
Questions
What command connects Claude Code to Yirlo?
In a terminal, enter claude mcp add --header "Authorization: Bearer YOUR_KEY" --transport http yirlo https://yirlo.com/mcp and substitute your yk_live_ key for YOUR_KEY. After that, type /mcp in a Claude Code session and check that yirlo is listed as connected.
Where do I get the API key?
Both SDKs, the MCP server and the REST API all accept the same key. Make one in Yirlo under API keys; it always starts yk_live_.
How many tools the Yirlo MCP server exposes
The count is 33, and each one is a separate call into Yirlo's public API. Together they cover your account details and credit balance, projects (create_project among them), budgets and campaigns. They also handle uploading your own contacts with import_leads and checking progress with get_import, plus gathering the people who commented or replied on one of your posts with leads_from_post and list_posts. The rest reach inbox conversations, lead notes and statuses, suppression lists, webhooks, teammates, analytics and hot leads.
Can I create a new project from Claude Code?
Yes, once your account has its first project, which you start on yirlo.com with your site's URL and the first payment. After that, ask Claude Code to call create_project with another domain; the new project is ready in about a minute with its campaigns paused, and Claude Code can then launch campaigns, change spending limits, review results and reply to leads.
Will Claude Code send emails to my leads?
Sending a reply with this tool puts a real email in the inbox of the person you choose. Ask Claude Code to display the draft beforehand, and tell it to go ahead only once the text reads the way you want.
Can Claude Code change how much I spend?
Yes. It can read and set the daily budget for a project and for a single campaign. Starting a campaign also uses credit, which is prepaid at about $0.05 per email sent, so your balance and daily budget stay the limits.
How do I test that the connection works?
Ask Claude Code to show your balance and list your projects. It calls get_balance and list_projects, which only read data, so you can check the key without changing anything.
Which header carries the key?
Authenticate by placing the key after "Bearer " in the Authorization header. Sending the identical value in an X-API-Key header is accepted as well.
Steps to take if your key leaks
Generate a replacement key in the app, delete the old server entry with claude mcp remove yirlo, and register the server once more using the new key. Afterward, check your credit balance and look over what your campaigns have been doing lately.