DEV Community

Cover image for I Asked Claude to Build Me a Dividend Screener Using EODHD — Here's What It Found
Kevin Meneses González
Kevin Meneses González

Posted on • Originally published at Medium

I Asked Claude to Build Me a Dividend Screener Using EODHD — Here's What It Found

Most dividend tools give you a table.

Numbers in columns. Yield percentages. Payout ratios. A filter you drag left or right.

What they don't give you is judgment.

They can't tell you why a 7% yield might be a trap. They can't flag that a company's payout ratio has been climbing for six consecutive quarters. They won't notice that a dividend that looks rock-solid today is sitting on a balance sheet that started deteriorating twelve months ago.

That distinction — between data and reasoning — is exactly what this experiment was about.

I connected Claude to EODHD's financial data API, gave it a list of dividend-paying stocks, and asked it to build a screener from scratch. No spreadsheet. No Python script. No pre-built tool.

Just a conversation. And live data.

If you're:

  • building income-focused portfolio tools,
  • managing your own dividend strategy and tired of switching between screeners,
  • or evaluating what AI agents can actually do with institutional-grade financial data,

This is worth reading.


The Problem With Most Dividend Screeners

Here's what a typical investor does when they want to screen for dividend stocks:

Go to a screener. Set yield above 3%. Filter by sector. Sort by payout ratio. Export to Excel. Open a second tab for the income statement. A third for the balance sheet history. Maybe a fourth to check if the dividend was cut in the last five years.

Then they start the actual analysis.

The tool gave them a list. The thinking still happens manually, in isolation, without any connection between the data points.

That's the gap.

A high yield and a low payout ratio tell you something. But they don't tell you everything. A company can show a healthy payout ratio today while its free cash flow has been shrinking for eight quarters. The number looks fine. The trend doesn't.

Most screeners show you the snapshot. They don't show you the movie.


The Architecture Behind This Setup

What is MCP?

MCP stands for Model Context Protocol — an open standard introduced by Anthropic.

Think of it as USB-C for AI. Before MCP, connecting an AI model to an external data source required custom integration code for every single API. A different script, a different auth flow, a different data format. For each one.

MCP replaces all of that with a single standard. One connection. Full access.

Instead of the AI guessing based on training data, it can now query APIs, retrieve live data, and execute workflows in real time — directly from the conversation.

The Problem It Solves

Most AI tools have a hard ceiling: their knowledge cutoff.

Ask Claude about NVIDIA's earnings from two years ago — it knows. Ask it about last quarter's free cash flow — it guesses. And confident-sounding guesses built on stale data are worse than no answer at all, because they look credible.

Without MCP, a typical analyst workflow looks like this:

  • Open a screener for initial filtering
  • Export to Excel, reformat columns
  • Open a second tab for income statements
  • A third for dividend history
  • A fourth for analyst consensus

Then start the actual analysis.

The bottleneck isn't intelligence. It's infrastructure.

How MCP Changes the Flow

With an MCP-connected data source like EODHD, the flow collapses into a single layer:

1. You ask a question in natural language — "Which of these stocks has the safest dividend?"

2. Claude interprets the intent — it understands you need yield, payout ratio, FCF coverage, and dividend history.

3. Claude selects the right MCP tools — it calls EODHD's endpoints automatically, without you specifying which ones.

4. EODHD returns live data — sourced directly from exchanges and regulatory filings, not cached or estimated.

5. Claude synthesizes and responds — with structured analysis, not a table of raw numbers.

The analyst's job shifts from data gathering to judgment. Which is where their expertise actually lives.

Why EODHD Specifically

Not all financial data APIs are equal — and the quality gap matters more when AI is doing the reasoning.

EODHD provides:

  • 150,000+ tickers across 70+ exchanges
  • Full financial statements — income, balance sheet, cash flow
  • Dividend history going back decades, adjusted for corporate actions
  • Analyst estimates and consensus data
  • Insider transactions sourced from regulatory filings
  • Macro indicators for cross-dataset analysis
  • Native MCP server — one connection, full dataset access in Claude

When Claude reasons on EODHD data, it isn't estimating. It's fetching. That distinction is what makes the output trustworthy enough to act on.


The Setup: EODHD + Claude in 2 Steps

EODHD offers a native MCP server. Once connected, Claude has direct access to EODHD's full dataset in natural language — no code, no custom integration.

Step 1 — Get your EODHD API key

Create an account at eodhd.com. The free tier covers historical data and fundamentals — enough to replicate everything in this article.

Step 2 — Add it to Claude

In Claude.ai: Settings → Connectors → Add custom connector → paste your EODHD MCP URL → name it "EODHD" → Add.

You will see the list of endpoints

Start a new chat. EODHD's tools are now available to Claude automatically.

👉 Start free with EODHD here — the free tier includes historical EOD data and fundamentals access.


The Session: Building the Screener in Conversation

I gave Claude a starting list of ten dividend-paying stocks across different sectors: JNJ, KO, PG, T, MO, ABBV, PEP, VZ, O, XOM.

Classic income portfolio candidates. Some with decades of consecutive dividend increases. Some with yields high enough to raise questions.

Then I started asking.


Question 1: "Rank these ten stocks by dividend yield and tell me which ones look sustainable"

Claude pulled current yield data and payout ratios from EODHD for all ten tickers simultaneously, then cross-referenced each against free cash flow coverage — a step I didn't ask for.

The output wasn't a sorted table. It was a tiered analysis:

Tier 1 — High yield, strong coverage: Altria (MO) and Realty Income (O) topped the yield ranking, but with important caveats. MO's payout ratio is high by conventional standards — yet its free cash flow generation has consistently covered the dividend with room to spare. O structures its dividends around AFFO, not earnings, which changes the payout ratio math entirely.

Tier 2 — Moderate yield, very safe: KO, PG, PEP. Lower yields but fortress-level dividend history. Claude flagged all three as Dividend Kings without me asking — pulling that context from the fundamentals data.

Tier 3 — High yield, worth watching: T and VZ both show elevated yields driven partly by compressed valuations. Claude noted that both have been managing high debt loads while maintaining dividends — a combination that warrants closer monitoring, not immediate exclusion.

What would normally take an hour of tab-switching took about 12 seconds.


Question 2: "Show me the 10-year dividend history for the three highest-yielding stocks and flag any cuts or freezes"

Claude fetched EODHD's full dividend history for MO, T, and VZ going back ten years, organized it chronologically, and flagged every year where the dividend was held flat or reduced.

The result surfaced something worth knowing: AT&T cut its dividend in 2022 following the WarnerMedia spinoff — a move that significantly reset its income profile. Claude noted this explicitly, with the quarter and percentage reduction, sourced directly from EODHD's dividend records.

Not guessed. Not approximated. Fetched.

This is the kind of signal that gets buried when you're looking at current yield alone. A stock that cut its dividend three years ago and has since stabilized is a very different investment than one with an unbroken 30-year record — even if the current yield looks identical.


Question 3: "For the Dividend Kings in this list, pull the last 8 quarters of free cash flow and tell me if the dividend is getting harder to cover"

Claude pulled quarterly cash flow statements from EODHD for KO, PG, and PEP, calculated the free cash flow payout ratio for each quarter, and plotted the trend directionally.

The analysis on Coca-Cola was particularly sharp: strong and stable FCF coverage throughout the period, with coverage ratios consistently above 70% — healthy for a mature consumer staples company with predictable cash flows.

Procter & Gamble showed a similar pattern, with one quarter of compression that Claude correctly attributed to elevated capex during a facility expansion cycle — visible in the capital expenditure line of the same cash flow statement.

It didn't just answer the question. It explained the anomaly.


Question 4: "If I had to build a 5-stock dividend portfolio from this list focused on income stability — not maximum yield — which would you pick?"

Claude synthesized everything it had already pulled — dividend history, FCF coverage trends, payout sustainability, debt levels — and built a structured argument for five positions.

The recommendation: KO, PG, PEP, O, ABBV.

The reasoning for each exclusion was explicit:

  • T: dividend cut history + ongoing debt reduction pressure
  • VZ: similar concerns, lower FCF growth trajectory
  • MO: sustainable today, but long-term business model risk warrants a separate decision
  • XOM: dividend is sound, but commodity exposure conflicts with an income-stability mandate
  • JNJ: recent Kenvue spinoff changes the historical comparability of dividend data

That's the kind of structured reasoning that goes into a real portfolio construction decision. Not a list of tickers with yield percentages attached.


What This Changes for Income Investors

The standard workflow for dividend analysis involves at least four separate tools: a screener for initial filtering, a financial data source for statements, a dividend history tracker, and something to cross-reference analyst ratings or macro context.

Each tool answers one question. Connecting the answers is manual work.

With EODHD + Claude, the connection happens in the conversation. You ask a question that spans multiple data types — yield, history, FCF, coverage ratio, sector context — and get a synthesized answer, not four separate outputs you have to reconcile yourself.

The cognitive load shift is significant.

You move from gathering to judging. The data assembly is automated. The actual investment thinking is what you're left with.


What You Can Build From Here

Once EODHD is connected, you can run:

  • Dividend growth screeners — identify companies with 10+ consecutive years of dividend increases, filtered by sector and payout ratio range
  • Yield trap detectors — flag stocks where high yield correlates with deteriorating FCF or rising debt
  • Dividend safety scores — build a composite of payout ratio, FCF coverage, and dividend history into a single reliability ranking
  • Pre-earnings dividend risk checks — before a quarterly report, pull the FCF trend and ask Claude whether the dividend coverage is at risk
  • Sector income comparisons — "Compare average dividend yield and payout ratios across consumer staples, utilities, and REITs"

The infrastructure is already there. The data is live. The interface is a question.


Most dividend investors don't lack access to data.

They lack time to connect it.

That's the problem this setup solves — and why the screener you build in a conversation is more useful than the one you build in a spreadsheet.


👉 Get started with EODHD here — clean dividend history, full fundamentals, and MCP support for AI agents.


Looking for technical content for your company? I can help — LinkedIn · kevinmenesesgonzalez@gmail.com


Enter fullscreen mode Exit fullscreen mode

Top comments (0)