<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ryze AI</title>
    <description>The latest articles on DEV Community by Ryze AI (ryzeai).</description>
    <link>https://dev.to/ryzeai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F15155%2F39e0ae11-49a8-4b7f-8cee-2a6743619bfc.png</url>
      <title>DEV Community: Ryze AI</title>
      <link>https://dev.to/ryzeai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ryzeai"/>
    <language>en</language>
    <item>
      <title>Break-even ROAS: the two-line formula every ad script should check first</title>
      <dc:creator>Michael Martinez</dc:creator>
      <pubDate>Wed, 14 Oct 2026 06:34:15 +0000</pubDate>
      <link>https://dev.to/ryzeai/break-even-roas-the-two-line-formula-every-ad-script-should-check-first-55l1</link>
      <guid>https://dev.to/ryzeai/break-even-roas-the-two-line-formula-every-ad-script-should-check-first-55l1</guid>
      <description>&lt;p&gt;A lot of published ad-automation scripts share the same bug. The script pulls ROAS from the Google Ads or Meta API, compares it to a target someone typed into a config file, and acts. The target is usually a round number like 3.0 that came from a benchmark post. Nobody checked whether 3.0 is above or below the point at which the account loses money on every sale.&lt;/p&gt;

&lt;p&gt;The fix is two lines of arithmetic. This post is the two lines, a small implementation in Python and JavaScript, and the reasoning for why they should run before any bid or budget logic does.&lt;/p&gt;

&lt;h2&gt;
  
  
  The formula
&lt;/h2&gt;

&lt;p&gt;Break-even ROAS is the inverse of contribution margin. Strip every variable cost out of an order (product cost, shipping, payment fees) and what is left is the most you can spend acquiring that order before you lose money. Divide the order value by that, and you have the revenue you need per dollar of ad spend. Written out:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;break-even ROAS = order value / (order value - COGS - shipping - fees)
                = 1 / contribution margin

target ROAS     = 1 / (contribution margin - desired profit %)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Both lines from &lt;a href="https://www.get-ryze.ai/breakeven-roas-calculator" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/breakeven-roas-calculator&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;Worked example from the same page: a $60 order with $28 of variable cost has a $32 contribution margin, about 53%, so break-even ROAS is 60 / 32 = 1.88x. If you also want a 15% net margin on top, the target becomes 1 / (0.533 - 0.15), roughly 2.61x.&lt;/p&gt;

&lt;p&gt;The calculator page also publishes a quick-reference table that is worth internalizing, because it shows how fast the number moves with margin (source: &lt;a href="https://www.get-ryze.ai/breakeven-roas-calculator):" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/breakeven-roas-calculator):&lt;/a&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Contribution margin&lt;/th&gt;
&lt;th&gt;Break-even ROAS&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;20%&lt;/td&gt;
&lt;td&gt;5.00x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;30%&lt;/td&gt;
&lt;td&gt;3.33x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;40%&lt;/td&gt;
&lt;td&gt;2.50x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;50%&lt;/td&gt;
&lt;td&gt;2.00x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;60%&lt;/td&gt;
&lt;td&gt;1.67x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;70%&lt;/td&gt;
&lt;td&gt;1.43x&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A 3.0x ROAS is a healthy business at 50% margin and a slow bleed at 30%. Same number, opposite meaning. That is the whole reason a script should never compare ROAS to a constant it did not derive.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why benchmarks make this worse
&lt;/h2&gt;

&lt;p&gt;Benchmark posts are where most hard-coded targets come from, and the public data shows why that is a poor source for a threshold. Across 28 industries measured by Varos in 2025, the median return on ad spend was 3.31x on Google Ads and 2.19x on Meta (source: superscale.ai/learn/roas-benchmarks-by-industry, reporting Varos data). Triple Whale, looking at 18,000+ brands on Google and about 35,000 on Meta, put the medians at 3.68x and 1.86x (source: triplewhale.com/blog/whats-a-good-roas).&lt;/p&gt;

&lt;p&gt;Within those medians the spread is enormous. In the Varos Google Ads data, hotels came in at 15.2x and financial services at 0.2x (source: superscale.ai/learn/roas-benchmarks-by-industry). A median across that range tells you nothing about whether your account is profitable. Your margin does.&lt;/p&gt;

&lt;p&gt;The platforms also differ structurally. Meta's lower median is partly because it reaches people who were not searching, so first-touch returns look lower and the payoff appears in repeat purchases and retargeting. A Meta campaign that looks like it is "under benchmark" can still be well above break-even, and vice versa for a Google brand campaign.&lt;/p&gt;

&lt;h2&gt;
  
  
  The implementation
&lt;/h2&gt;

&lt;p&gt;Python first. The function takes per-order economics, returns both thresholds, and refuses to run on a non-positive margin, which is the case where no ROAS can save you and the right action is to fix pricing, not bids.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;dataclasses&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;dataclass&lt;/span&gt;


&lt;span class="nd"&gt;@dataclass&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;frozen&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OrderEconomics&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;order_value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;      &lt;span class="c1"&gt;# average order value, in currency units
&lt;/span&gt;    &lt;span class="n"&gt;cogs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;             &lt;span class="c1"&gt;# product cost per order
&lt;/span&gt;    &lt;span class="n"&gt;shipping&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;         &lt;span class="c1"&gt;# shipping / fulfillment per order
&lt;/span&gt;    &lt;span class="n"&gt;fee_rate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;         &lt;span class="c1"&gt;# payment fees as a fraction of order value, e.g. 0.029
&lt;/span&gt;    &lt;span class="n"&gt;target_profit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;    &lt;span class="c1"&gt;# desired net margin as a fraction, e.g. 0.15
&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;contribution_margin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;OrderEconomics&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;fees&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;order_value&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fee_rate&lt;/span&gt;
    &lt;span class="nf"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;order_value&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cogs&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;shipping&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;fees&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;order_value&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;roas_thresholds&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;OrderEconomics&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;tuple&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;float&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt;&lt;span class="p"&gt;]:&lt;/span&gt;
    &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;Return (break_even_roas, target_roas).&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
    &lt;span class="n"&gt;margin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;contribution_margin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;margin&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Contribution margin is &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;margin&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;; no ROAS breaks even. Fix pricing first.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;headroom&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;margin&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;target_profit&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;headroom&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Target profit &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;target_profit&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; exceeds margin &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;margin&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;headroom&lt;/span&gt;


&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# The calculator's worked example: $60 order, $28 variable cost (~53% margin)
&lt;/span&gt;    &lt;span class="n"&gt;example&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;OrderEconomics&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;order_value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cogs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;shipping&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;4.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;fee_rate&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.025&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;target_profit&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.15&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;be&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;roas_thresholds&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;example&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;break-even &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;be&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;x, target &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt;&lt;span class="si"&gt;:&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;x&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;# break-even 1.88x, target 2.61x
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note the example constructs $28 of variable cost as $22 COGS + $4.50 shipping + 2.5% fees ($1.50). The split is mine; the $60 / $28 / 1.88x figures are from the calculator page. If your fees are a flat amount per order rather than a rate, change &lt;code&gt;fee_rate&lt;/code&gt; to a &lt;code&gt;fees&lt;/code&gt; field; the formula does not care how the costs are grouped, only that they are all in.&lt;/p&gt;

&lt;p&gt;The same thing in JavaScript, for anyone running this inside a Google Ads script or a Node job that calls the Marketing API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;roasThresholds&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;orderValue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;cogs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;shipping&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;feeRate&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;targetProfit&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;fees&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;orderValue&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;feeRate&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;margin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;orderValue&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;cogs&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;shipping&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;fees&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;orderValue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;margin&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Margin &lt;/span&gt;&lt;span class="p"&gt;${(&lt;/span&gt;&lt;span class="nx"&gt;margin&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toFixed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;%: no ROAS breaks even.`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;headroom&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;margin&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;targetProfit&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;headroom&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Target profit exceeds margin.`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;breakEven&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;target&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nx"&gt;headroom&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Dropshipping example from the calculator page:&lt;/span&gt;
&lt;span class="c1"&gt;// $40 price, $18 landed cost, $5 shipping, ~3% fees -&amp;gt; ~40% margin, 2.53x break-even&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;t&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;roasThresholds&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;orderValue&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;cogs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;shipping&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;feeRate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.03&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;targetProfit&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;breakEven&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toFixed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt; &lt;span class="c1"&gt;// 2.53&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(The $40 / $18 / $5 / 3% / 2.53x example is from &lt;a href="https://www.get-ryze.ai/breakeven-roas-calculator" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/breakeven-roas-calculator&lt;/a&gt;.)&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it goes in the pipeline
&lt;/h2&gt;

&lt;p&gt;The point of computing the threshold in code rather than typing it into a config is that it changes when the inputs change, and the inputs change more often than anyone updates configs. Shipping rates move. A supplier reprices. Refund rates drift. The calculator page's dropshipping note is that a 5% refund rate on thin margins can move break-even by half a turn (source: &lt;a href="https://www.get-ryze.ai/breakeven-roas-calculator" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/breakeven-roas-calculator&lt;/a&gt;). Half a turn is the difference between 2.5x and 3.0x, which is the difference between scaling an ad set and killing it.&lt;/p&gt;

&lt;p&gt;So the order of operations for any script that touches bids or budgets:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Pull current per-order economics from the source of truth (Shopify COGS from supplier invoices, not the product page; actual carrier rates; processor fee schedule; trailing refund rate).&lt;/li&gt;
&lt;li&gt;Compute &lt;code&gt;break_even&lt;/code&gt; and &lt;code&gt;target&lt;/code&gt; from those numbers.&lt;/li&gt;
&lt;li&gt;Pull ROAS from the ad platform, for the same date range and attribution window you will judge it by.&lt;/li&gt;
&lt;li&gt;Only then compare, and compare against &lt;code&gt;target&lt;/code&gt;, not &lt;code&gt;break_even&lt;/code&gt;. The calculator page's rule of thumb is to run 20 to 50% above break-even to absorb attribution error, returns and seasonality (source: &lt;a href="https://www.get-ryze.ai/breakeven-roas-calculator" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/breakeven-roas-calculator&lt;/a&gt;). Ryze's LinkedIn write-up on ROAS benchmarks lands in the same range, 25 to 50% above.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Step 3 deserves one more sentence. Platform-reported ROAS depends on the conversion window and the conversion action set, so make sure the revenue side of the ratio is the same definition you used to compute margin. Mixing a gross-revenue ROAS with a net-of-refunds margin will overstate how safe you are.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two things the formula does not tell you
&lt;/h2&gt;

&lt;p&gt;It does not tell you about lifetime value. The break-even above is per first order. A subscription or repeat-purchase business can rationally run below first-order break-even if retention is measured, not assumed; the formula still tells you how much of that bet you are making.&lt;/p&gt;

&lt;p&gt;And it does not tell you where the break-even is per campaign. Blended account margin hides the fact that a campaign selling your 70%-margin hero product has a 1.43x break-even while the one clearing 20%-margin accessories needs 5.0x. If the data is there, compute per product line or per campaign. If you want to try the numbers interactively before coding anything, the free calculator at &lt;a href="https://www.get-ryze.ai/breakeven-roas-calculator" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/breakeven-roas-calculator&lt;/a&gt; does the same arithmetic with a cost breakdown and no signup; Ryze, for disclosure, is who I work with, and their paid product uses the same break-even number as the guardrail for automated budget moves.&lt;/p&gt;

&lt;p&gt;The formula is two lines. The discipline is running them first.&lt;/p&gt;

</description>
      <category>python</category>
      <category>javascript</category>
      <category>marketing</category>
      <category>googleads</category>
    </item>
    <item>
      <title>What the Meta Ads MCP server actually exposes, and what it doesn't</title>
      <dc:creator>Michael Martinez</dc:creator>
      <pubDate>Wed, 14 Oct 2026 06:22:52 +0000</pubDate>
      <link>https://dev.to/ryzeai/what-the-meta-ads-mcp-server-actually-exposes-and-what-it-doesnt-3aem</link>
      <guid>https://dev.to/ryzeai/what-the-meta-ads-mcp-server-actually-exposes-and-what-it-doesnt-3aem</guid>
      <description>&lt;p&gt;When Meta shipped an official MCP server for Meta Ads earlier this year, the announcement posts mostly said "Claude can now manage your Facebook ads." That is true and also not very useful to an engineer deciding whether to build on it. I wanted the boring answers: what tools, what auth, what rate limits, what it refuses to do, and where you still need your own code.&lt;/p&gt;

&lt;p&gt;I have not reverse-engineered the server. What follows is assembled from two write-ups Ryze published on the launch (the second is a tool-by-tool breakdown), with the places where they disagree called out, because they do disagree on a couple of details and you should check Meta's own documentation before you depend on either. Every number is cited to the page it came from.&lt;/p&gt;

&lt;h2&gt;
  
  
  The shape of the thing
&lt;/h2&gt;

&lt;p&gt;Per Ryze's breakdown, Meta's server was released in public beta on 29 April 2026 and exposed 29 core tools at launch, grouped roughly into campaign management, performance insights, audience tools and creative management (source: &lt;a href="https://www.get-ryze.ai/blog/meta-official-mcp-what-it-does-and-how-to-install" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/meta-official-mcp-what-it-does-and-how-to-install&lt;/a&gt;). The same page maps those categories onto the Marketing API endpoints the server calls behind them:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool category&lt;/th&gt;
&lt;th&gt;Example functions&lt;/th&gt;
&lt;th&gt;Endpoints called&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Campaign management&lt;/td&gt;
&lt;td&gt;create, edit, pause, delete&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;/campaigns&lt;/code&gt;, &lt;code&gt;/adsets&lt;/code&gt;, &lt;code&gt;/ads&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Performance insights&lt;/td&gt;
&lt;td&gt;pull metrics, compare periods&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;/insights&lt;/code&gt;, &lt;code&gt;/delivery_check&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Audience tools&lt;/td&gt;
&lt;td&gt;lookalikes, custom audiences&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;/customaudiences&lt;/code&gt;, &lt;code&gt;/saved_audiences&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Creative management&lt;/td&gt;
&lt;td&gt;upload images, manage library&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;/adcreatives&lt;/code&gt;, &lt;code&gt;/adimages&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;(Table from &lt;a href="https://www.get-ryze.ai/blog/meta-official-mcp-what-it-does-and-how-to-install" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/meta-official-mcp-what-it-does-and-how-to-install&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;The important architectural point is that the AI client never touches the Marketing API directly. The MCP server receives a tool call, constructs the Graph API request, executes it and returns a formatted response. Your Claude or ChatGPT session holds no Meta token.&lt;/p&gt;

&lt;p&gt;Meta ships this in two flavors, and the Ryze launch post is clear about who each is for: an HTTP MCP server you point Claude Desktop or ChatGPT at, and a CLI binary for Claude Code and Codex users. Same Marketing API underneath; the launch post estimates about 10 minutes for the MCP route and about 15 minutes for the CLI route (npm install, env vars, auth) (source: &lt;a href="https://www.get-ryze.ai/blog/meta-ads-official-mcp-cli-launch" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/meta-ads-official-mcp-cli-launch&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Auth: this is the real feature
&lt;/h2&gt;

&lt;p&gt;The thing that changes the economics is not the tool list; it is that you do not need a Meta Developer App. Authentication is Meta Business OAuth, the same login flow Shopify and Mailchimp use. The launch post's framing: no Developer App, no Marketing API approval wait, querying live campaigns within minutes instead of the old 1 to 3 day wait (source: &lt;a href="https://www.get-ryze.ai/blog/meta-ads-official-mcp-cli-launch" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/meta-ads-official-mcp-cli-launch&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Per the breakdown page, the OAuth screen asks for permissions covering campaigns, ad sets, ads, insights, audiences and catalogs; the token is stored server-side by Meta and refreshed automatically. If auth succeeds but data calls fail with "insufficient permissions", the fix it gives is re-authenticating with all requested scopes granted (&lt;code&gt;ads_read&lt;/code&gt;, &lt;code&gt;ads_management&lt;/code&gt;, &lt;code&gt;business_management&lt;/code&gt;, &lt;code&gt;pages_read_engagement&lt;/code&gt;) and confirming your Business role is Admin or Advertiser, not Analyst (source: &lt;a href="https://www.get-ryze.ai/blog/meta-official-mcp-what-it-does-and-how-to-install" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/meta-official-mcp-what-it-does-and-how-to-install&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the two write-ups disagree
&lt;/h2&gt;

&lt;p&gt;Read both pages side by side and you hit three inconsistencies. I am listing them rather than picking a winner, because I could only verify what the pages say, not what Meta's server does today.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Endpoint.&lt;/strong&gt; The launch post's Claude Desktop config uses &lt;code&gt;https://mcp.meta.com/ads/&amp;lt;your-business-id&amp;gt;&lt;/code&gt; under &lt;code&gt;mcpServers&lt;/code&gt; (source: &lt;a href="https://www.get-ryze.ai/blog/meta-ads-official-mcp-cli-launch" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/meta-ads-official-mcp-cli-launch&lt;/a&gt;). The breakdown page says the server is hosted at &lt;code&gt;mcp.ads.meta.com&lt;/code&gt; and shows an &lt;code&gt;npx -y @meta/ads-mcp&lt;/code&gt; stdio config with empty &lt;code&gt;META_ACCESS_TOKEN&lt;/code&gt;, &lt;code&gt;META_APP_ID&lt;/code&gt; and &lt;code&gt;META_APP_SECRET&lt;/code&gt; env vars (source: &lt;a href="https://www.get-ryze.ai/blog/meta-official-mcp-what-it-does-and-how-to-install" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/meta-official-mcp-what-it-does-and-how-to-install&lt;/a&gt;). A remote URL and a local npx package are different transports. Check Meta's setup docs, which the launch post cites at facebook.com/business/help/1456422242197840.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Setup time.&lt;/strong&gt; 10 minutes on the launch post, "under 5 minutes" on the breakdown page. Both put most of the time in finding &lt;code&gt;claude_desktop_config.json&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Which Claude.&lt;/strong&gt; The breakdown page says MCP requires Claude Desktop and a Pro subscription, and that the web version does not support MCP servers. That was written in May 2026; treat it as a dated claim and test against the client you actually use.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The config edit itself is the step that bites. The launch post's troubleshooting is practical: a red indicator almost always means a JSON syntax error (trailing comma, missing brace); closing the Claude window is not quitting, you need a full Cmd-Q and reopen; and if the first prompt errors it is read access, not the prompt (source: &lt;a href="https://www.get-ryze.ai/blog/meta-ads-official-mcp-cli-launch" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/meta-ads-official-mcp-cli-launch&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;Once connected, the capability that matters most versus the third-party servers that came before is write access, including campaign creation. The breakdown page's claim: full read/write access to the Marketing API, with everything created in &lt;code&gt;PAUSED&lt;/code&gt; status by default so you review before launch (source: &lt;a href="https://www.get-ryze.ai/blog/meta-official-mcp-what-it-does-and-how-to-install" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/meta-official-mcp-what-it-does-and-how-to-install&lt;/a&gt;). The example prompts it lists give a feel for the surface:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pull campaigns with spend over $1,000 this month, CTR under 1% and CPA over $50.&lt;/li&gt;
&lt;li&gt;Create a conversion campaign with a $200 daily budget, CBO on, three ad sets, in PAUSED status.&lt;/li&gt;
&lt;li&gt;Build a 1% lookalike from top-20% purchasers in the last 90 days and check overlap against existing audiences.&lt;/li&gt;
&lt;li&gt;Pause campaigns with ROAS under 2.0x and raise budgets 20% on campaigns above 4.0x, showing the plan before executing.&lt;/li&gt;
&lt;li&gt;Flag ads with CTR down more than 30% over 7 days, frequency over 3.0, or CPM up more than 40%.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those are prompts, not tool names; the model composes them from the 29 tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it doesn't do
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;No agent layer.&lt;/strong&gt; The server exposes operations. It does not run them on a schedule, watch for fatigue, or pause anything on its own. The launch post states this directly: Meta's official MCP tells you ad sets are fatigued, it does not pause them (source: &lt;a href="https://www.get-ryze.ai/blog/meta-ads-official-mcp-cli-launch" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/meta-ads-official-mcp-cli-launch&lt;/a&gt;). If you want overnight automation you wire your own cron job, alerting and pause logic on top, or you use a hosted product that does. Ryze is one of those and publishes its own comparison on the launch page; I work with them, so read that comparison knowing they sell the alternative.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No multi-account auto-discovery and no per-client token isolation.&lt;/strong&gt; Both pages describe account switching as manual and the launch post calls the lack of token isolation "a hard fail for regulated agency work" (source: &lt;a href="https://www.get-ryze.ai/blog/meta-ads-official-mcp-cli-launch" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/meta-ads-official-mcp-cli-launch&lt;/a&gt;). If you manage many Business Managers, that is your integration work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Not everyone is enabled.&lt;/strong&gt; The breakdown page says access is gated by an &lt;code&gt;is_ads_mcp_enabled&lt;/code&gt; flag on the Business account and that roughly 40% of accounts still showed &lt;code&gt;false&lt;/code&gt; as of May 2026, with Meta prioritizing high-spend accounts and typical wait times of 2 to 4 weeks (source: &lt;a href="https://www.get-ryze.ai/blog/meta-official-mcp-what-it-does-and-how-to-install" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/meta-official-mcp-what-it-does-and-how-to-install&lt;/a&gt;). The symptom is an install that looks fine followed by an "Account not enabled for MCP access" error at auth. Check the flag before you debug your config.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Personal accounts are out.&lt;/strong&gt; A Facebook Business account with Admin or Advertiser access is required, regardless of personal ad-spend history (same source).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rate limits are the Marketing API's.&lt;/strong&gt; The breakdown page quotes 200 calls per user per hour and 4,800 per app per hour, enforced at the MCP server, with the server batching and caching repeat requests. The practical advice is to batch questions into single prompts and wait 15 to 20 minutes if you trip the limit (source: &lt;a href="https://www.get-ryze.ai/blog/meta-official-mcp-what-it-does-and-how-to-install" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/meta-official-mcp-what-it-does-and-how-to-install&lt;/a&gt;). If you are building anything that polls, budget for this.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pricing is open-beta pricing.&lt;/strong&gt; Free today, but the launch post notes Meta has not committed to long-term pricing and the free tag is beta-specific (source: &lt;a href="https://www.get-ryze.ai/blog/meta-ads-official-mcp-cli-launch" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/meta-ads-official-mcp-cli-launch&lt;/a&gt;). The breakdown page adds that the third-party servers it replaced charged $25 to $99 a month, which is a useful anchor for what a post-beta price might look like.&lt;/p&gt;

&lt;h2&gt;
  
  
  A decision rule
&lt;/h2&gt;

&lt;p&gt;The launch post's two-persona split is roughly right. If you are a developer with one or two accounts, comfortable editing JSON, and you will wire your own automation, the official server is free raw Marketing API access with an OAuth flow that finally skips app review. Use it. If you need scheduled actions, many Business Managers, or token isolation per client, the official server is the data layer and you are building (or buying) the rest.&lt;/p&gt;

&lt;p&gt;Either way, do the first week read-only. Confirm Claude's tables match Ads Manager for the same date range and attribution window before any tool call with &lt;code&gt;pause&lt;/code&gt; or &lt;code&gt;budget&lt;/code&gt; in it runs unattended.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>metaads</category>
      <category>claude</category>
      <category>api</category>
    </item>
    <item>
      <title>Using Claude skills to run Google and Meta ads from the terminal</title>
      <dc:creator>Michael Martinez</dc:creator>
      <pubDate>Wed, 14 Oct 2026 06:09:05 +0000</pubDate>
      <link>https://dev.to/ryzeai/using-claude-skills-to-run-google-and-meta-ads-from-the-terminal-409k</link>
      <guid>https://dev.to/ryzeai/using-claude-skills-to-run-google-and-meta-ads-from-the-terminal-409k</guid>
      <description>&lt;p&gt;If you run ad accounts and live in a terminal, the repetitive part of that work (CPA diagnostics, wasted-spend audits, the Monday anomaly check) can be moved into Claude Code using plain Markdown skill files. This is a write-up of what the setup looks like, where it helps, and where the limits are. Every number and feature name below comes from two sources: Ryze's guide to the skill library and the GitHub repo it points at. Disclosure up front: I work with the Ryze team.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a "skill" is, mechanically
&lt;/h2&gt;

&lt;p&gt;A Claude skill is a folder containing a &lt;code&gt;SKILL.md&lt;/code&gt; file. The file opens with a YAML frontmatter block (a &lt;code&gt;name&lt;/code&gt; and a &lt;code&gt;description&lt;/code&gt;), followed by Markdown instructions. Claude keeps every skill's description in view and loads the full body only when a request matches it. That is the whole mechanism; there is no fine-tuning and no app to install in your ad account.&lt;/p&gt;

&lt;p&gt;Claude Code discovers skills in two places: &lt;code&gt;~/.claude/skills/&lt;/code&gt; for skills you want everywhere, and &lt;code&gt;.claude/skills/&lt;/code&gt; inside a project for team-shared, version-controlled ones (source: &lt;a href="https://www.get-ryze.ai/blog/marketing-claude-skills-google-meta-ads" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/marketing-claude-skills-google-meta-ads&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;The distinction that trips most people up is skills versus MCP. The Ryze guide puts it as: a prompt is instructions, a skill is instructions with a save button, an MCP connector is data access. A skill cannot see your account by itself. You either paste CSV exports or pair the skill with an MCP server that wraps the Google Ads API or Meta Marketing API.&lt;/p&gt;

&lt;h2&gt;
  
  
  The library
&lt;/h2&gt;

&lt;p&gt;The open-source repo is &lt;code&gt;github.com/irinabuht12-oss/marketing-skills&lt;/code&gt;. The Ryze blog post describes 30 ad skills: 21 that run on both Google Ads and Meta Ads, 5 Google-only (Bid Strategy Recommendations, Quality Score Breakdown, Keyword Cannibalization Check, Ad Extension Audit, Search Query Intent Classifier), and 4 Meta-only (Audience Overlap Analysis, Competitor Creative Analysis, Frequency Cap Recommendations, Retargeting Window Analysis) (source: &lt;a href="https://www.get-ryze.ai/blog/marketing-claude-skills-google-meta-ads" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/marketing-claude-skills-google-meta-ads&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;One thing to know before you clone: the repo has outgrown the blog post. As of 13 October 2026 the README says 49 skills across four folders (Google Ads, Meta Ads, SEO, AI visibility), MIT licensed, and the GitHub API reported 4,421 stars (source: &lt;a href="https://github.com/irinabuht12-oss/marketing-skills" rel="noopener noreferrer"&gt;https://github.com/irinabuht12-oss/marketing-skills&lt;/a&gt;). The ad skills described in the blog post are still there; the extra ones cover SEO and AI visibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;

&lt;p&gt;Two routes. The one the repo README recommends is the Claude Code plugin marketplace:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude plugin marketplace add irinabuht12-oss/marketing-skills
claude plugin &lt;span class="nb"&gt;install &lt;/span&gt;marketing-skills@ryze
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The manual route, useful if you want to read the files before loading them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/irinabuht12-oss/marketing-skills
&lt;span class="nb"&gt;cp&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; marketing-skills/skills/&lt;span class="k"&gt;*&lt;/span&gt; ~/.claude/skills/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Both snippets from the repo README: &lt;a href="https://github.com/irinabuht12-oss/marketing-skills" rel="noopener noreferrer"&gt;https://github.com/irinabuht12-oss/marketing-skills&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;If you copy skills by hand from the older per-platform folders, remember the convention is one folder per skill with the file saved as &lt;code&gt;SKILL.md&lt;/code&gt; inside it. The Ryze guide shows the pattern:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; ~/.claude/skills/wasted-spend-finder
&lt;span class="nb"&gt;cp &lt;/span&gt;marketing-skills/&amp;lt;skill-file&amp;gt;.md ~/.claude/skills/wasted-spend-finder/SKILL.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What a skill file looks like
&lt;/h2&gt;

&lt;p&gt;Here is the trimmed wasted-spend skill as the Ryze guide prints it, because the shape matters more than any single skill:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;wasted-spend-finder&lt;/span&gt;
&lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Audits&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Google&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;or&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Meta&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;Ads&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;data&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;for&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;spend&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;with"&lt;/span&gt;
 &lt;span class="s"&gt;zero conversions. Use when asked to find wasted spend,&lt;/span&gt;
 &lt;span class="s"&gt;budget leaks, or to build exclusion / negative lists.&lt;/span&gt;
&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="gh"&gt;# Wasted Spend Finder&lt;/span&gt;
&lt;span class="gu"&gt;## Inputs&lt;/span&gt;
Search terms, placements, audiences, and ads with spend +
conversions columns. Last 90 days. CSV export or MCP pull.
&lt;span class="gu"&gt;## Steps&lt;/span&gt;
&lt;span class="p"&gt;1.&lt;/span&gt; Isolate every row with spend &amp;gt; 0 and conversions = 0.
&lt;span class="p"&gt;2.&lt;/span&gt; Ignore rows below $10 total spend (noise).
&lt;span class="p"&gt;3.&lt;/span&gt; Group the rest by theme: irrelevant intent, wrong geo,
 broad-match drift, display placement junk, dead ads.
&lt;span class="p"&gt;4.&lt;/span&gt; Attach the dollar total to each group.
&lt;span class="gu"&gt;## Output&lt;/span&gt;
Summary table (theme, spend, % of total waste) first.
Then a negative keyword list and an exclusion list,
formatted ready to upload. No commentary in the lists.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Four parts: inputs, steps, thresholds (numbers, not adjectives), output format. The guide's advice: spend more editing time on the &lt;code&gt;description&lt;/code&gt; line than on anything else, because it is the index entry routing runs on. A vague description ("helps with ads") produces a skill that never fires.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting live data in
&lt;/h2&gt;

&lt;p&gt;Without MCP, every skill run starts with ten minutes in the Google Ads or Ads Manager UI picking columns and date ranges. The Ryze guide lists two ways to remove that step:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Build your own MCP server&lt;/strong&gt; against the Google Ads API and Meta Marketing API. The guide estimates 30 to 60 minutes and notes it is read-only in practice because the open-source servers wrap the read endpoints. You need a Google Ads developer token, an OAuth client, and account or MCC access; on the Meta side a Meta app with &lt;code&gt;ads_read&lt;/code&gt; and a system-user token (source: &lt;a href="https://www.get-ryze.ai/blog/marketing-claude-skills-google-meta-ads" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/marketing-claude-skills-google-meta-ads&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use a hosted connector.&lt;/strong&gt; The repo README gives the Ryze one as a single command:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude mcp add ryze &lt;span class="nt"&gt;--transport&lt;/span&gt; http https://connector.get-ryze.ai/mcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The README says the connector itself is free and gives Claude live Google Ads, Meta Ads, GA4 and Search Console data; the blog post says write access (pausing ads, adjusting budgets, adding negatives) is part of the paid Ryze plan, from $89/month with a free trial (sources: &lt;a href="https://github.com/irinabuht12-oss/marketing-skills" rel="noopener noreferrer"&gt;https://github.com/irinabuht12-oss/marketing-skills&lt;/a&gt; and &lt;a href="https://www.get-ryze.ai/blog/marketing-claude-skills-google-meta-ads" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/marketing-claude-skills-google-meta-ads&lt;/a&gt;). As noted above I work with the Ryze team, so weigh that accordingly and read the connector's permissions page before you authorize anything.&lt;/p&gt;

&lt;p&gt;Whichever route you take, one rule from the guide that I would put in bold if dev.to let me: never paste API keys, developer tokens, or OAuth secrets into a chat. Credentials belong in the MCP server config.&lt;/p&gt;

&lt;h2&gt;
  
  
  What running it actually looks like
&lt;/h2&gt;

&lt;p&gt;The interface is a one-line prompt. The guide's example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Run the wasted spend finder on my Google Ads account,
last 90 days. Write the negative keyword list to
negatives-2026-07.csv and the summary to waste-report.md.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The reason the terminal beats claude.ai for this is that outputs land as files. Exclusion lists, report drafts and budget models end up in a folder you can &lt;code&gt;git diff&lt;/code&gt;, rather than chat text you copy out. The second reason is chaining. In one Claude Code session the anomaly detector's findings become the CPA diagnostic's starting point without re-explaining anything. The guide's morning-run prompt shows the pattern:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Morning run for [client]:
1. Anomaly check vs the trailing 14-day average.
2. For anything flagged, run the CPA diagnostic on
   that campaign.
3. Append findings to reports/[client]/log.md and
   draft the one-paragraph Slack update.
Stop before suggesting changes — read-only today.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The six skills the guide says do most of the work, with the cadence it suggests: CPA Diagnostics (whenever CPA moves more than 15%), Wasted Spend Finder (monthly), Budget Scenario Planner (before every budget conversation), Creative Fatigue Detection (weekly, Meta), Client Report Narratives (reporting week), Anomaly Detection (daily). The guide estimates the total time cost once the setup exists at roughly an hour a week, most of it reading outputs (source: &lt;a href="https://www.get-ryze.ai/blog/marketing-claude-skills-google-meta-ads" rel="noopener noreferrer"&gt;https://www.get-ryze.ai/blog/marketing-claude-skills-google-meta-ads&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it breaks
&lt;/h2&gt;

&lt;p&gt;The guide lists six failure modes; these four are the common ones:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Claude ignores the skill.&lt;/strong&gt; Routing. Name the skill explicitly and tighten the "use when" line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output is generic.&lt;/strong&gt; Claude got the method but no numbers. Attach the export or connect MCP, and state the date range and target CPA.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Numbers don't match the platform UI.&lt;/strong&gt; Attribution window, conversion action set and timezone shift totals. State them in the prompt.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A metric looks invented.&lt;/strong&gt; Add "use only the supplied data; if something is missing, say so instead of estimating" to the skill.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The habit the guide recommends for all of these: ask Claude which skill it used and what data it actually received.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you are starting today
&lt;/h2&gt;

&lt;p&gt;Start read-only. Every skill in the library is written to analyze and recommend, not to touch the account, so a wrong conclusion costs a raised eyebrow, not a paused campaign. Pick one skill, run it on this week's real numbers with a pasted export, add MCP when the export step becomes the bottleneck, and add write access last, if ever, with an approval step in front of each change.&lt;/p&gt;

&lt;p&gt;And commit the &lt;code&gt;.claude/skills/&lt;/code&gt; folder to the client repo. Thresholds in a Markdown file that go through pull-request review are a better audit trail than anyone's notes app.&lt;/p&gt;

</description>
      <category>claude</category>
      <category>mcp</category>
      <category>googleads</category>
      <category>marketing</category>
    </item>
  </channel>
</rss>
