← Ground Truth

Connect Claude, Cursor, and ChatGPT to live filing data with OpenFilings MCP

OpenFilings··4 min read
MCPClaudeCursorAI agenttutorialSECEDGAR

Your agent is only as good as its data layer. A fluent paragraph about Apple's margins is not research — it is pattern completion on stale text.

OpenFilings MCP is a read-only tool server that returns verified filing metadata, canonical KPIs, and section text from 20 markets. This guide gets you connected in one sitting and gives you prompts you can demo to a team or a customer.

Why agents need a filing tool layer

Ask a frontier model for Toyota's FY2025 revenue without tools. You get a confident number — often wrong, always unsourced. We documented why in Why LLMs hallucinate financial data.

The fix is not a better prompt. It is retrieval from primary sources with stable tool contracts:

  • search_ticker — resolve name/ticker/ISIN/LEI to an entity (no filings yet)
  • list_filings — history per market_id
  • get_filing_kpis — canonical revenue, margins, cash flow, TTM fields
  • get_filing_section — actual Item 1A or EDINET section text

MCP (Model Context Protocol) standardizes how Claude, Cursor, and other hosts discover and call these tools — one endpoint, OAuth or API key, OpenAPI-backed schemas.

What OpenFilings MCP gives you

CapabilityDetail
MarketsUS, JP, KR, HK, CN, EU (ESEF), UK, AU, BR, CA, IN, SG — gated by plan
KPIsSame field names across all markets (harmonization guide)
TTMUS SEC revenue_ttm with auditable quarter chain (how TTM is built)
NarrativeSection TOC + body text from parsed filings
AuthOAuth (Claude) or X-API-Key: of_… (Cursor, scripts)

Endpoint: https://api.openfilings.org/mcp (streamable HTTP).

Setup — Claude Code (OAuth)

In Claude Code:

claude mcp add --transport http --scope user openfilings https://api.openfilings.org/mcp

Then /mcpopenfilingsAuthenticate (OAuth, opens in your browser).

Verify:

claude mcp list

You should see openfilings connected. Full walkthrough: Connect an agent.

Setup — Cursor and API key

  1. Create an API key at openfilings.org → My Page → API Keys (of_… prefix).
  2. Add to Cursor MCP config (.cursor/mcp.json):
{
  "mcpServers": {
    "openfilings": {
      "url": "https://api.openfilings.org/mcp",
      "headers": {
        "X-API-Key": "of_your_key_here"
      }
    }
  }
}
  1. Reload MCP in Cursor. No OAuth flow required for API keys.

Export OPENFILINGS_API_KEY before launching Cursor if you prefer env-based config.

Tool workflow — the four calls that matter

Typical research session:

list_markets
    → search_ticker(query="Toyota") or search_ticker(ticker="7203", market_id="jp")
        → list_filings(market_id="jp", ticker="7203", limit=5)
            → get_filing_kpis(filing_id="…")
            → list_filing_sections(filing_id="…")
                → get_filing_section(filing_id="…", section_id="…")

Identifiers for search_ticker / list_filings (at least one):

  • query — company name
  • ticker — listed symbol (AAPL, 7974, 005930.KS, …)
  • cn_ticker / hk_ticker — 6-digit codes
  • lei / isin — 20-char LEI or 12-char ISIN

Read entity.listings[] from search_ticker before assuming which market to query — dual-listed names may have US ADR + home listing.

Three prompts that prove it works

Prompt 1 — Cross-market revenue

Call list_markets, then get Toyota (7203, jp) and Samsung (005930, kr) latest annual KPIs. Compare revenue and operating margin.

Expected tool path: list_marketslist_filings (jp, kr) → get_filing_kpis

Sanity check (order of magnitude):

  • Toyota FY2025: revenue ~¥48T, operating margin ~10%
  • Samsung FY2024: revenue ~₩301T, operating margin ~11%

Prompt 2 — US TTM and margins

Get Apple's latest 10-Q KPIs. What is revenue_ttm, operating margin, and SBC as % of revenue?

Expected: TTM revenue in USD with method metadata, operating margin ~32%, stock-based comp as single-digit % of revenue — from parsed canonical KPIs, not Yahoo.

Prompt 3 — Filing narrative (primary source)

List sections for Toyota's latest Yūho. Summarize the risk factors section in three bullets.

Expected path: list_filing_sectionsget_filing_section — EDINET Japanese text (or translated section if available), with filing UUID cited.

If the model answers without tool calls, your host is not wired correctly.

Prompt 4 — Your watchlist, not a generic ticker

List my unread notifications and summarize each one — flag anything that looks like a red flag.

Expected tool path: list_notifications (auth required, no quota) — reads your OpenFilings watchlist inbox directly, so the summary is about companies you actually follow, not a canned demo ticker. Point this at a scheduled task or a /loop and you have a standing morning brief instead of a one-off query.

Entitlements and quotas

  • MCP tools share the same API quota as REST — checking sync status does not consume quota.
  • Market access follows your plan (list_markets is authoritative).
  • Free tier includes metering; upgrade for higher limits and additional markets.

For production pipelines (nightly batch, screener refresh), prefer REST API with the same API key. MCP is optimized for interactive agent sessions.

MCP vs REST — when to use which

Use caseMCPREST
Claude / Cursor researchoptional
Production ETL / cron
Mobile app
Webhook-driven workflow
Demo to investors in chatoverkill

Same business logic behind both — MCP adapters stay thin; parsers and KPI materialization live in the shared backend.

Ship it

You now have an agent that:

  • Does not hallucinate Toyota's revenue
  • Compares across GAAPs with normalized KPIs
  • Reads primary sources filed last week

Next steps:

  1. Create an API key if you have not already.
  2. Try the prompts above in Claude or Cursor.
  3. Browse Filings for free live filings — no MCP required.
  4. Read SEC EDGAR limitations for what EDGAR alone cannot do.

Stop demoing agents on training data. Demo them on filings.

Sources & notes

  1. Getting a 500 on first connect? Disconnect and reconnect the OpenFilings connector — this clears a stale OAuth session.