Gemini CLI and Yirlo: manage outbound from your terminal

By the Yirlo team · Product details checked against the app

Add Yirlo's MCP server to Gemini CLI and you can review hot leads, halt a campaign or respond to a prospect straight from your shell. Setup takes a single JSON block in the Gemini CLI settings file plus an API key from the dashboard.

I don't have a website

What connecting Gemini CLI to Yirlo gives you

Yirlo runs the whole outbound email cycle for a B2B team: it studies your website, proposes audiences, finds the right decision makers, writes the first message and triages what comes back. Gemini CLI connects over MCP and sees 33 tools, each one a thin wrapper around one call to Yirlo's public API.

Day to day, you type an everyday question like "how many hot leads this week". Gemini CLI chooses the matching tool, calls Yirlo and prints the answer in your terminal. The figures match what the app shows, so the browser can stay closed.

To begin, visit yirlo.com and paste in your site's URL. After the project exists, an agent like Gemini CLI can run it from day to day.

Before you start

To get going you need two items: an API key and a Yirlo project. Your first project starts at yirlo.com, where you type in your website address and buy your starting credit. Any later project can begin on that same site, or directly inside Gemini CLI by calling the create_project tool with your domain. Campaign proposals from Yirlo follow.

Open yirlo.com/app/api-keys in the app and create one; it starts with yk_live_.

Gemini CLI talks to https://yirlo.com/mcp with the Streamable HTTP transport, which is what httpUrl selects.

Setup: the exact Gemini CLI config

For Yirlo to be available in every directory, edit ~/.gemini/settings.json. If you only want it in a single repository, put the entry in .gemini/settings.json inside that project. The entry below needs your yk_live_ key in place of YOUR_KEY:

{
  "mcpServers": {
    "yirlo": {
      "headers": {
        "Authorization": "Bearer YOUR_KEY"
      },
      "httpUrl": "https://yirlo.com/mcp"
    }
  }
}

The setting that matters is httpUrl. It tells Gemini CLI to use Streamable HTTP, which is what the Yirlo server speaks. If your settings file already has an mcpServers section, add the yirlo entry next to the existing servers and keep the JSON valid.

Restart Gemini CLI after saving, then type /mcp. The list should show yirlo with its tools. If the server is missing, check the JSON for a stray comma and confirm the key was pasted in full.

See the campaigns Yirlo would run for your company.Start now

Your first test request

Start with something that only reads. Ask: "Show my Yirlo account and credit balance." Gemini CLI will call get_account and get_balance and print the result.

A good second request is "list my Yirlo projects and campaigns." This confirms the key can see your project and gives you the campaign names you will use in later asks.

If both answers look right, the connection is working. Everything after this is a variation on the same pattern: describe what you want, read the tool call Gemini CLI proposes, and approve it.

What you can ask

Tools exist for account details, billing, campaigns, inbox access, suppressions, webhooks and team management. A few requests that work well during a terminal session:

  • "How many hot leads this week?" pulls hot leads and campaign analytics.
  • "Pause the campaign for dentists." stops that campaign until you start it again.
  • "Raise the daily budget to $30." changes the project or campaign budget.
  • "Tell the most recent interested lead that Tuesday works for a call." Gemini CLI pulls up the conversation and sends your answer.
  • "Block my competitor's domain from ever being emailed." That domain lands on the suppression list.
  • "Attach a note to that lead and set the deal to won." The note is saved and the lead's status changes.
  • "Create a webhook that fires on new hot leads, then run a test event." The webhook gets registered and a test event goes out.
  • "Invite a teammate at this email address." sends the team invitation.

Actions that change things

Read tools are safe to run freely: get_balance, list_hot_leads, list_inbox, campaign_analytics and similar. The write tools deserve a second look before you approve them.

Whatever Gemini CLI writes in reply goes to the real prospect from your Yirlo mailbox, so read each draft before you approve it. Tools like start_campaign, stop_campaign, archive_campaign and the budget setters change how much gets sent, and every email that goes out spends credit.

A useful habit is to ask Gemini CLI to show you the draft or the exact change first, then confirm in a second message. For reply, ask it to read the conversation with read_conversation and write the draft in the terminal before sending anything.

Keeping the key safe

Your live API key is powerful enough to view leads, answer prospects and adjust spending limits, so keep it private. Whoever gets hold of it can act on your project with the whole Yirlo API.

The global file at ~/.gemini/settings.json sits in your home directory, which keeps it out of project repositories. If you prefer the project-level .gemini/settings.json, add that file to .gitignore before you paste the key into it, and check that it has never been committed.

Never paste the key into chats, screenshots, tickets or recordings of shared terminals. Give each machine or teammate a separate key. If a laptop is retired or you suspect exposure, issue a fresh key in the app's API keys section, then update your settings file with it and drop the old one.

Beyond the terminal

Gemini CLI is one of several ways into your account. Developers who prefer writing code can work with the REST API documented at yirlo.com/api-docs, and the SDKs take that same key.

Many teams use the app for reviewing and editing campaign copy, and Gemini CLI for quick checks, budget changes and replies while they work in a repository.

Questions

Where does the Yirlo config go for Gemini CLI?

Put it in ~/.gemini/settings.json for all your work, or in .gemini/settings.json inside a project to scope it to that folder. The entry goes under mcpServers with the name yirlo.

Why does the config use httpUrl?

httpUrl is the Gemini CLI setting for Streamable HTTP servers. The Yirlo MCP server at https://yirlo.com/mcp uses that transport, so the address belongs in httpUrl.

How do I check that the connection works?

Restart Gemini CLI and type /mcp. The yirlo server should appear with its tools. Then ask for your account and balance as a first read-only test.

Where do I get the API key?

Keys are created in the app's API keys section and start with yk_live_. That same secret also works with the MCP server and every SDK.

Is a Bearer token required, or will an X-API-Key header be accepted for authentication?

Yes. The server accepts either Authorization: Bearer followed by the key, or an X-API-Key header. The Gemini CLI example on this page uses the Authorization header.

Can Gemini CLI start a new Yirlo project?

Begin on yirlo.com for your initial project: enter your site's address and complete the opening payment. Projects created later can come from the site too, or from Gemini CLI by telling it to call create_project with your domain. A project made through the tool becomes ready in roughly a minute, and get_project reports its status. Its campaigns sit idle until you launch them. From there, Gemini CLI can run the project: start campaigns, adjust budgets, read the inbox and reply to prospects.

Does a reply from Gemini CLI really send an email?

Yes, a message goes out to the actual lead whenever that reply tool runs.

What number of tools is the Yirlo MCP server made up of?

Across the 33 tools you can run campaigns and set their budgets, work through inbox conversations, add notes and statuses to leads, pull hot leads and analytics, manage suppression lists, webhooks, credit balance, teammates and projects. For projects, create_project adds one after your first. Lead sourcing has two routes. With import_leads and get_import you load a spreadsheet you already have and check on the result. With leads_from_post and list_posts you gather the commenters and repliers on one of your LinkedIn or X posts and start a campaign for them. Each tool call maps to a single request against Yirlo's public API.

Related

Your first campaigns, written for your company.Start now