Comparing Company Financials with Codex and SEC Data
Comparing two companies’ financials usually means a lot of tab-switching and spreadsheet wrangling. With AgentPatch’s SEC Company Financials tool, Codex can pull official filing data for multiple companies and run the comparison directly in your terminal.
Why This Matters
Competitive financial analysis is fundamental to investment research, market sizing, and product strategy. But getting clean, comparable data is the bottleneck. Different data providers format things differently, free sources are unreliable, and manually pulling from EDGAR is tedious.
The SEC Company Financials tool gives Codex direct access to XBRL filing data from EDGAR. Every number comes from an official 10-K or 10-Q — not scraped, not estimated, not behind a paywall. You get revenues, net income, assets, liabilities, equity, EPS, operating income, and cash position by default, each with the reporting period and filing date.
Pull data for two companies in two calls (75 credits each, $0.015 total) and Codex can do the comparison math right there.
Setup
Add AgentPatch to ~/.codex/config.toml:
[mcp_servers.agentpatch]
url = "https://agentpatch.ai/mcp"
bearer_token_env_var = "AGENTPATCH_API_KEY"
Then set your API key:
export AGENTPATCH_API_KEY=your_api_key
Replace your_api_key with your actual key from the AgentPatch dashboard. Codex discovers all AgentPatch tools automatically on next start.
Example
You’re evaluating cloud infrastructure players and want to compare AMD and Intel’s financial trajectories. You tell Codex:
“Pull the last 5 years of SEC financials for both AMD and Intel. Compare their revenue growth, net income trends, and balance sheet health.”
Codex runs both lookups and analyzes the results:
Searching SEC for "AMD"... Found: Advanced Micro Devices Inc, CIK 0000002488
Searching SEC for "Intel"... Found: Intel Corp, CIK 0000050863
Pulling financials for both (5 years)...
AMD vs Intel — 5-Year Comparison:
Revenue:
AMD Intel
2020: $9.8B $77.9B
2021: $16.4B $79.0B
2022: $23.6B $63.1B
2023: $22.7B $54.2B
2024: $25.8B $53.1B
AMD CAGR: +27.4% Intel CAGR: -9.2%
Net Income:
AMD Intel
2020: $2.5B $20.9B
2021: $3.2B $19.9B
2022: $1.3B $8.0B
2023: $854M -$1.6B
2024: $1.6B -$3.2B
AMD stayed profitable throughout. Intel turned loss-making in 2023.
Balance Sheet (latest filing):
AMD — Assets: $67.9B | Liabilities: $27.1B | Equity: $40.8B
Intel — Assets: $196.5B | Liabilities: $108.3B | Equity: $88.2B
Intel has more absolute assets, but AMD's debt-to-equity ratio (0.66)
is healthier than Intel's (1.23).
Summary: AMD has been on a growth trajectory while Intel has been contracting.
AMD maintained profitability; Intel posted net losses in recent years.
AMD carries less relative debt.
All data from official SEC 10-K XBRL filings.
Codex pulled real filing data for both companies, built the comparison table, calculated growth rates and ratios, and delivered a clear summary. That’s a first-pass competitive financial analysis from two terminal commands.
Wrapping Up
AgentPatch gives Codex the ability to pull and compare real SEC financial data without leaving the terminal. Pair sec-company-financials with sec-company-search for CIK lookups, or combine it with Google Search and Google News for broader competitive context. See what else is available at agentpatch.ai.