<?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: Rabbani</title>
    <description>The latest articles on DEV Community by Rabbani (@gaddamrabbani).</description>
    <link>https://dev.to/gaddamrabbani</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%2Fuser%2Fprofile_image%2F3952044%2F1b30400e-8d06-44ea-a892-f49898f194c8.jpg</url>
      <title>DEV Community: Rabbani</title>
      <link>https://dev.to/gaddamrabbani</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gaddamrabbani"/>
    <language>en</language>
    <item>
      <title>Building an AI Agent That Sends Email Through MCP</title>
      <dc:creator>Rabbani</dc:creator>
      <pubDate>Wed, 18 Nov 2026 11:40:34 +0000</pubDate>
      <link>https://dev.to/gaddamrabbani/building-an-ai-agent-that-sends-email-through-mcp-23ka</link>
      <guid>https://dev.to/gaddamrabbani/building-an-ai-agent-that-sends-email-through-mcp-23ka</guid>
      <description>&lt;p&gt;Most AI agents can reason about email but can't send any. The usual fix is a custom wrapper around an email API: a function schema, some glue code, error handling, and a prompt describing the fields. It works, but it's a lot of code to maintain for a capability that should be routine.&lt;/p&gt;

&lt;p&gt;The Model Context Protocol (MCP) changes this. If an email service exposes an MCP server, any MCP-capable client (Claude, Cursor, or your own agent) can discover and call its tools directly. This article walks through what that looks like with &lt;a href="https://emitd.com" rel="noopener noreferrer"&gt;emitd&lt;/a&gt;, a transactional email API that hosts a native MCP endpoint, and what to think about before giving an agent the ability to send mail.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with wrapper-based email tools
&lt;/h2&gt;

&lt;p&gt;Hand-written tool definitions tend to drift from the API they wrap. Field names change, optional parameters get omitted, and the agent guesses at what's valid. Every new capability (checking delivery, previewing a template, managing contacts) means another hand-written tool.&lt;/p&gt;

&lt;p&gt;An MCP server inverts this. The service publishes its own tool definitions, and the client discovers them at connection time.&lt;/p&gt;

&lt;h2&gt;
  
  
  What emitd exposes
&lt;/h2&gt;

&lt;p&gt;emitd's hosted MCP server lives at &lt;code&gt;https://mcp.emitd.com/mcp&lt;/code&gt;. You point an agent at it with your API key, and it receives tools already scoped to your account. According to the docs, every API call is a tool, using the API's own fields. The tools listed include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;send_email&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;get_message&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;preview_template&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;list_domains&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;get_stats&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;upsert_contact&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The docs say the same set also covers the rest of the API, including drafting templates with the AI Design Studio and monitoring domains.&lt;/p&gt;

&lt;p&gt;Because the tool fields mirror the REST API, the agent works with the same parameters you'd use in a direct call. For comparison, the plain REST call looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://api.emitd.com/v1/email \
  -H &lt;span class="s2"&gt;"Authorization: Bearer $EMITD_API_KEY"&lt;/span&gt; \
  -H &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{
    "from": "you@yourdomain.com",
    "to": ["ada@lovelace.io"],
    "subject": "Welcome to Acme",
    "html_body": "&amp;lt;h1&amp;gt;You are in.&amp;lt;/h1&amp;gt;"
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It returns a &lt;code&gt;202 Accepted&lt;/code&gt; with a &lt;code&gt;message_id&lt;/code&gt;, and the message is dispatched asynchronously.&lt;/p&gt;

&lt;h2&gt;
  
  
  Walkthrough: an agent sends a receipt
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F45471qr49nq4gzz79xqu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F45471qr49nq4gzz79xqu.png" alt=" " width="799" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the agent is connected to the MCP endpoint, a request like this is enough:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;You:&lt;/strong&gt; Email Ada her receipt for order #4021.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The agent selects &lt;code&gt;send_email&lt;/code&gt; and fills in the fields. This is the example the emitd site shows for that exact request:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"from"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"receipts@acme.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"to"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ada@lovelace.io"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"subject"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Your receipt for order #4021"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"template_alias"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"receipt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"template_model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"total"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"$48.00"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result comes back as queued, with a message ID (the site's example shows &lt;code&gt;msg_7f3a1c&lt;/code&gt;). The agent didn't need a custom schema or a prompt explaining the fields.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing the loop: let the agent check its own work
&lt;/h2&gt;

&lt;p&gt;Sending is only half the job. An agent that fires off an email and assumes success is guessing. emitd's &lt;code&gt;get_message&lt;/code&gt; tool returns the delivery timeline for a message, so the agent can find out whether the email it just sent was delivered, opened, or bounced, and act on the answer.&lt;/p&gt;

&lt;p&gt;That enables simple, useful behaviors:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Confirm a critical email was delivered before telling the user it was.&lt;/li&gt;
&lt;li&gt;Notice a bounce and report it instead of silently moving on.&lt;/li&gt;
&lt;li&gt;Answer a user's "did my receipt go out?" with real data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Guardrails: the part that matters most
&lt;/h2&gt;

&lt;p&gt;Giving an agent an email-sending tool is different from giving it a read-only one. A mistaken tool call can't be undone, and emails can reach real people. The emitd documentation describes several controls relevant here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Scoped keys.&lt;/strong&gt; If you limit an agent's API key to specific features, the agent only sees the tools for those features. A support-triage agent doesn't need contact management, so it never sees it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dry runs.&lt;/strong&gt; The site says dry runs apply to every call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Duplicate protection.&lt;/strong&gt; The site lists this alongside dry runs. The docs also describe idempotency keys for safe retries, which matters when an agent loops or retries after a timeout.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quotas.&lt;/strong&gt; Account quotas apply to every call, which puts a ceiling on the damage from a runaway agent.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirmation policies.&lt;/strong&gt; The docs mention strict guardrails and human confirmation policies for agent use.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whatever the provider offers, a sensible pattern is the same: start with a narrowly scoped key, run in dry-run mode while you test the agent's behavior, and keep a human confirmation step on anything that goes to real customers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beyond sending
&lt;/h2&gt;

&lt;p&gt;Since the MCP server mirrors the whole API, agents can do more than send. The docs and site describe use cases such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Previewing a template before sending (&lt;code&gt;preview_template&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Drafting on-brand templates from a prompt in the AI Design Studio&lt;/li&gt;
&lt;li&gt;Upserting contacts (&lt;code&gt;upsert_contact&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Checking account stats (&lt;code&gt;get_stats&lt;/code&gt;) and listing sending domains (&lt;code&gt;list_domains&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Trade-offs to consider
&lt;/h2&gt;

&lt;p&gt;MCP is not the right choice for every situation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Deterministic flows.&lt;/strong&gt; A password reset triggered by app code should call the REST API or an SDK directly. An LLM adds latency and nondeterminism with no benefit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agentic flows.&lt;/strong&gt; MCP fits best when the sending decision itself comes from an agent: a support assistant, an ops bot, or a workflow that decides when and what to send.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Treat the two as complementary: application code for fixed triggers, MCP for agent-driven ones.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Create an account and an API key. emitd's free tier is 5,000 emails a month with no credit card.&lt;/li&gt;
&lt;li&gt;Point your MCP client (Cursor, Claude, or a custom agent) at &lt;code&gt;https://mcp.emitd.com/mcp&lt;/code&gt; using your API key. The emitd site provides a ready-made config snippet for Cursor and Claude Desktop.&lt;/li&gt;
&lt;li&gt;Restrict the key to the features your agent needs.&lt;/li&gt;
&lt;li&gt;Test with dry runs before sending to real addresses.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Docs: &lt;a href="https://docs.emitd.com/docs/guides/agents" rel="noopener noreferrer"&gt;docs.emitd.com/docs/guides/agents&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I'm a co-founder of emitd, the service discussed in this article. Figures and capabilities are as described on emitd's public site and documentation.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>email</category>
      <category>webdev</category>
    </item>
    <item>
      <title>The Math Behind Retiring at 40 as a Software Engineer (FIRE)</title>
      <dc:creator>Rabbani</dc:creator>
      <pubDate>Tue, 26 May 2026 11:25:10 +0000</pubDate>
      <link>https://dev.to/gaddamrabbani/the-math-behind-retiring-at-40-as-a-software-engineer-fire-2i42</link>
      <guid>https://dev.to/gaddamrabbani/the-math-behind-retiring-at-40-as-a-software-engineer-fire-2i42</guid>
      <description>&lt;p&gt;Software engineering is one of the few professions where achieving Financial Independence and Retiring Early (FIRE) isn't just a pipe dream—it's highly achievable. &lt;/p&gt;

&lt;p&gt;Between high base salaries, RSUs, and sign-on bonuses, many developers earn enough in their 20s and 30s to theoretically never work a corporate 9-to-5 again after age 40. But earning a high salary and actually achieving FIRE are two very different things. &lt;/p&gt;

&lt;p&gt;The difference entirely comes down to math. &lt;/p&gt;

&lt;p&gt;As a developer, I built &lt;a href="https://calculatorpro.io" rel="noopener noreferrer"&gt;Calculator Pro&lt;/a&gt; because I was tired of doing napkin math for my personal finances. Today, I want to walk you through the exact mathematical framework you need to hit FIRE, using a few of the calculators we built.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 1: Find Your "FIRE Number"
&lt;/h3&gt;

&lt;p&gt;Your FIRE Number is the exact amount of money you need invested in the market to live off the returns indefinitely, without ever running out of principal. &lt;/p&gt;

&lt;p&gt;The FIRE movement relies heavily on the &lt;strong&gt;4% Rule&lt;/strong&gt; (based on the Trinity Study). The rule states that if you have a diversified portfolio of index funds, you can safely withdraw 4% of its value every year, adjusted for inflation, for at least 30 years without going broke.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Formula:&lt;/strong&gt; &lt;br&gt;
&lt;code&gt;Annual Expenses × 25 = Your FIRE Number&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Notice the formula relies on your &lt;em&gt;expenses&lt;/em&gt;, not your &lt;em&gt;income&lt;/em&gt;. If you earn $200k but spend $180k, your FIRE number is a massive $4.5 million. If you earn $100k but live frugally and only spend $40k, your FIRE number is just $1 million.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Calculate your exact target here:&lt;/strong&gt; &lt;a href="https://calculatorpro.io/financial/fire-calculator" rel="noopener noreferrer"&gt;FIRE Calculator&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Supercharge the Magic of Compound Interest
&lt;/h3&gt;

&lt;p&gt;Einstein supposedly called compound interest the "Eighth Wonder of the World." In the context of FIRE, it is the only reason retiring by 40 is possible.&lt;/p&gt;

&lt;p&gt;Let's say you are 25 years old. Your goal is $1.5 million by age 40 (15 years). &lt;br&gt;
If you simply saved cash under a mattress, you would need to save $100,000 every single year. That's impossible for most.&lt;/p&gt;

&lt;p&gt;However, if you invest that money in an S&amp;amp;P 500 index fund (historically returning ~7-10% annually), the math changes entirely. Because your money makes money, and then &lt;em&gt;that&lt;/em&gt; money makes money, you only need to invest about $3,500 a month to hit your $1.5M target in 15 years. &lt;/p&gt;

&lt;p&gt;Play around with the timeline and the monthly contributions to see how drastically compound interest changes the outcome.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Visualize your growth here:&lt;/strong&gt; &lt;a href="https://calculatorpro.io/financial/compound-interest-calculator" rel="noopener noreferrer"&gt;Compound Interest Calculator&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Optimize Your Take-Home Pay
&lt;/h3&gt;

&lt;p&gt;To hit that $3,500/month investment goal, you need to know exactly how much of your salary is actually hitting your bank account. &lt;/p&gt;

&lt;p&gt;A mistake many developers make when evaluating a new job offer is looking purely at the gross salary. A $160,000 offer in New York City yields a vastly different net income than a $140,000 offer in Texas, due to state and local taxes. &lt;/p&gt;

&lt;p&gt;Before you accept a job (or if you are planning to relocate while working remotely), calculate your exact net pay. Use this to reverse-engineer your budget and ensure you can still meet your monthly investment goals.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Find your true net pay here:&lt;/strong&gt; &lt;a href="https://calculatorpro.io/financial/take-home-paycheck-calculator" rel="noopener noreferrer"&gt;Take-Home Paycheck Calculator&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 4: Build a Bulletproof Emergency Fund
&lt;/h3&gt;

&lt;p&gt;The tech industry is cyclical. The last two years of layoffs proved that no job is 100% secure. &lt;/p&gt;

&lt;p&gt;Before you start aggressively investing in the stock market to reach your FIRE number, you must build an emergency fund. If you get laid off and the stock market happens to crash at the same time, being forced to sell your index funds to pay rent will permanently cripple your FIRE timeline. &lt;/p&gt;

&lt;p&gt;A standard emergency fund covers 3 to 6 months of absolute baseline survival expenses (Rent, Groceries, Utilities, Insurance). Keep this in a High-Yield Savings Account (HYSA) where it won't lose value to the stock market, but will still earn a 4-5% yield.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Calculate your safety net here:&lt;/strong&gt; &lt;a href="https://calculatorpro.io/financial/emergency-fund-calculator" rel="noopener noreferrer"&gt;Emergency Fund Calculator&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Hitting FIRE doesn't mean you have to stop coding at 40. For many, it just means gaining the freedom to quit a toxic corporate job, contribute full-time to Open Source, or try building a risky startup without worrying about how to pay the mortgage.&lt;/p&gt;

&lt;p&gt;The math is simple, but the execution requires discipline. If you want to run your own numbers, bookmark &lt;a href="https://calculatorpro.io" rel="noopener noreferrer"&gt;Calculator Pro&lt;/a&gt; for all your personal finance math.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are you aiming for FIRE? What is your target age? Let's chat in the comments!&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>career</category>
      <category>finance</category>
      <category>productivity</category>
      <category>watercooler</category>
    </item>
  </channel>
</rss>
