Economic Research Workflows with Claude Code and FRED
Economic research usually starts with a question — “what’s happening with housing affordability?” or “how tight is the labor market right now?” — and turns into a series ID hunt across FRED’s catalog. With AgentPatch connected, Claude Code can handle that discovery process directly in the terminal, searching for related indicators and helping you figure out which series actually answer your question.
Why This Matters
FRED has over 800,000 data series. That’s powerful, but it also means finding the right ones for a given research question takes real effort. Housing affordability alone involves mortgage rates, median home prices, price-to-income ratios, housing starts, and existing home sales — each with multiple series variants for different geographies, frequencies, and seasonal adjustments.
The discovery step is where most of the time goes. Once you have the right series IDs, pulling the data is mechanical. Claude Code with FRED Search handles that discovery conversationally: you describe what you’re researching, it searches for relevant series, and you iterate together until you have the right set of indicators.
Setup
Install the AgentPatch CLI (zero dependencies, Python 3.10+):
pip install agentpatch
Set your API key:
export AGENTPATCH_API_KEY=your_api_key
Then use it:
ap search "web search"
ap run agentpatch google-search --input '{"query": "test"}'
Get your API key from the AgentPatch dashboard.
Run this command to add AgentPatch as an MCP server:
claude mcp add -s user --transport http agentpatch https://agentpatch.ai/mcp \
--header "Authorization: Bearer YOUR_API_KEY"
Replace YOUR_API_KEY with your actual key from the AgentPatch dashboard. Claude Code discovers all AgentPatch tools automatically.
Example
You’re preparing an analysis on labor market tightness and want to identify the key indicators. You tell Claude Code:
“I’m researching labor market tightness. Help me find the main FRED series I should be looking at — unemployment, job openings, wages, and anything else that’s relevant.”
Claude Code runs several searches across FRED:
Searching FRED for "unemployment rate"...
Searching FRED for "job openings"...
Searching FRED for "average hourly earnings"...
Searching FRED for "labor force participation"...
Here's what I'd recommend for a labor market tightness analysis:
Core indicators:
- UNRATE — Unemployment Rate (monthly, SA) — the headline number
- JTSJOL — Job Openings: Total Nonfarm (monthly, SA) — demand side
- CES0500000003 — Average Hourly Earnings, All Employees (monthly, SA)
- CIVPART — Civilian Labor Force Participation Rate (monthly, SA)
Worth including:
- ICSA — Initial Claims (weekly, SA) — leading indicator for layoffs
- JTSHIR — Hires: Total Nonfarm (monthly, SA) — hiring pace
- JTSQUR — Quits: Total Nonfarm (monthly, SA) — voluntary separations
The job openings to unemployment ratio (JTSJOL / UNRATE) is a common
tightness metric. Want me to pull data for these and compute that ratio?
Claude Code didn’t just find one series — it built a research framework. It searched across multiple facets of the labor market, recommended primary and secondary indicators, and suggested a derived metric. You now have a curated set of series IDs ready for analysis.
You can keep going:
“Add regional breakdowns — I want to compare the top 5 states by job openings.”
Claude Code searches FRED for state-level JOLTS data and extends the list with the right regional series IDs.
Wrapping Up
FRED Search turns Claude Code into a research assistant for economic data discovery. The search finds series metadata — IDs, frequency, units, last updated — so you can build the right dataset before pulling a single data point. Combined with the companion fred-series-data tool, you can go from question to data in one session. Explore both tools and the rest of the marketplace at agentpatch.ai.