DEV Community

Cover image for How to give Claude a company-financials tool with the Apify MCP server
Michael
Michael

Posted on • Originally published at scrapers.lat

How to give Claude a company-financials tool with the Apify MCP server

Ask Claude what Microsoft reported for revenue in its latest fiscal year and it will answer with confidence, from memory. For a market-cap check that might be fine. For a valuation model, a credit memo, or anything a client or a committee will see, "from memory" is a liability. Training data is stale, LLMs round and drift, and a number that is off by a quarter or a fiscal year is worse than no number at all.

In this guide we fix that. We connect Claude to the official Apify MCP server, expose a single Actor that reads a company's reported financials from SEC EDGAR's XBRL data, and turn "what did they report?" from a recollection into a live pull from the filing itself. By the end you will have a working financials tool that Claude, Cursor, or any MCP client can call mid-conversation, returning the exact as-reported figure with its fiscal period and the source filing behind it.

Everything below is a real setup with real output. No mocked responses.

What is the Apify MCP server?

Model Context Protocol (MCP) is an open standard that lets AI clients call external tools. The Apify MCP server (https://mcp.apify.com) implements that standard on top of the Apify platform, which means every one of the thousands of Actors in the Apify Store becomes a tool an agent can invoke.

Why route an Actor through MCP instead of hard-coding an API call?

  • The agent decides when to fetch. Claude reads the conversation, notices it needs a hard number it does not have, and calls the tool on its own. You do not write glue code for every question.
  • Structured input and output. The MCP server hands Claude the Actor's input schema, so the model fills in the parameters correctly, and returns a clean dataset it can reason over.
  • One connection, many tools. The same MCP endpoint exposes search-actors, fetch-actor-details, and call-actor, so an agent can discover and run any Actor without new configuration.
  • No infrastructure. The server is hosted. You add a few lines to a config file and you are done.

The Actor we will use

We will expose the SEC EDGAR Financials Revenue & Assets Scraper. You give it one or more tickers (or CIKs) and a list of us-gaap concepts such as Revenues, Assets, or NetIncomeLoss, and it returns the reported values as structured rows: the figure itself, its unit, the fiscal year and period, the form it came from (10-K, 10-Q), the filing date, and a link back to the source filing on EDGAR.

That is exactly what an equity or credit analyst needs to anchor a model to reported numbers instead of round approximations. EDGAR is public, authoritative, and covers every U.S. registrant, so it is a strong first source for financial ground truth.

The SEC EDGAR Financials Revenue & Assets Scraper on the Apify Store

Step 1: Get your Apify API token

Sign in to the Apify Console, open Settings → Integrations, and copy your personal API token. The MCP server uses it to authenticate and to bill Actor runs to your account.

📌 Note: the token is a secret. Keep it in the client config only, never in a prompt or a committed file.

Step 2: Point Claude Desktop at the Apify MCP server

Open Claude Desktop's config file (Settings → Developer → Edit Config, or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS) and add the Apify server. The tools query parameter is the important part: it tells the server which Actor to expose, so Claude gets one focused tool instead of the entire Store.

{
  "mcpServers": {
    "apify": {
      "url": "https://mcp.apify.com?tools=scrapers_lat/sec-edgar-financials-scraper",
      "headers": {
        "Authorization": "Bearer YOUR_APIFY_TOKEN"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Cursor uses the same JSON in .cursor/mcp.json. If you prefer to run it locally over stdio instead of the hosted endpoint:

{
  "mcpServers": {
    "apify": {
      "command": "npx",
      "args": ["-y", "@apify/actors-mcp-server", "--tools", "scrapers_lat/sec-edgar-financials-scraper"],
      "env": { "APIFY_TOKEN": "YOUR_APIFY_TOKEN" }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Restart Claude Desktop so it picks up the new server.

Step 3: Confirm the tool is loaded

After the restart, the Actor shows up as a callable tool. If you list the tools the Apify server exposes, you will see the storage helpers plus the Actor itself, named after its Store handle:

get-actor-run, get-dataset-items, get-key-value-store-record,
abort-actor-run, scrapers_lat--sec-edgar-financials-scraper
Enter fullscreen mode Exit fullscreen mode

That last entry, scrapers_lat--sec-edgar-financials-scraper, is our financials tool. Claude now knows it exists, what it does (from the Actor's README), and what inputs it takes (from the input schema the server passes along).

Step 4: Ask Claude for a reported figure

Now the payoff. In a normal chat, ask a question that requires the actual filed number:

"What did Microsoft report for total revenue and total assets in its latest fiscal year? I need the figures straight from the 10-K, not an estimate."

Claude recognizes it should not answer this from memory, selects the financials tool, and fills in the input from your question. Under the hood the client sends a tools/call with the Actor's parameters:

{
  "name": "scrapers_lat--sec-edgar-financials-scraper",
  "arguments": {
    "tickers": ["MSFT"],
    "concepts": ["RevenueFromContractWithCustomerExcludingAssessedTax", "Assets"],
    "taxonomy": "us-gaap"
  }
}
Enter fullscreen mode Exit fullscreen mode

The Apify MCP server starts the Actor, waits for it to finish, and returns the dataset. Here is the real run metadata it produced:

{
  "runId": "0mCEYhnu1b9sJUelh",
  "actorName": "scrapers_lat/sec-edgar-financials-scraper",
  "status": "SUCCEEDED",
  "startedAt": "2026-07-30T17:45:46.653Z",
  "finishedAt": "2026-07-30T17:46:09.954Z",
  "stats": { "runTimeSecs": 23.2 }
}
Enter fullscreen mode Exit fullscreen mode

Twenty-three seconds, live against EDGAR.

Step 5: Read the real output

The dataset the tool returns is structured financial data, one row per concept and period. This is an actual record from the run (the fiscal-year revenue line, trimmed to the fields that matter):

{
  "companyName": "MICROSOFT CORPORATION",
  "ticker": "MSFT",
  "cik": "0000789019",
  "concept": "RevenueFromContractWithCustomerExcludingAssessedTax",
  "label": "Revenue from Contract with Customer, Excluding Assessed Tax",
  "taxonomy": "us-gaap",
  "unit": "USD",
  "value": 331839000000,
  "start": "2025-07-01",
  "end": "2026-06-30",
  "fy": 2026,
  "fp": "FY",
  "form": "10-K",
  "filed": "2026-07-29",
  "accessionNumber": "0001193125-26-323660",
  "filingUrl": "https://www.sec.gov/Archives/edgar/data/789019/000119312526323660/0001193125-26-323660-index.htm"
}
Enter fullscreen mode Exit fullscreen mode

Claude reads that and answers in plain language: Microsoft's fiscal year ended June 30, 2026, and it reported $331.84 billion in revenue (exactly 331,839,000,000 USD) and $758.38 billion in total assets, both drawn from its 10-K filed on 2026-07-29 under accession 0001193125-26-323660. Every figure is the as-reported XBRL value, tied to a fiscal period and a source filing, not the model's memory.

Claude calling the SEC EDGAR financials tool and answering with reported figures

Note what the period fields buy you. The row carries start, end, fy, and fp, so the agent can tell a full fiscal-year figure from a single quarter, and match a company on a June fiscal year-end against one on a calendar year. That distinction is where a lot of hand-built "quick lookups" quietly go wrong.

A real use case: an earnings-review agent

Put this in context. An analyst covering a basket of names is refreshing a model the morning after a 10-K drops. For each company they need the newly reported revenue, net income, and total assets, tied to the correct fiscal period, so the model updates against filed numbers rather than a press-release headline.

Without a tool, the analyst opens EDGAR, finds the filing, opens the financial statements, and copies each figure into the model, once per company. With the tool wired into Claude, the analyst lists the tickers in the chat and asks the agent to pull revenue, net income, and assets for the latest fiscal year of each. Claude calls the Actor per ticker, returns each figure with its period and source accession number, and flags anything where the latest available filing is still a prior year. The mechanical copy step disappears; the analysis stays with the human.

This is the shape of every good agent tool: it removes the fetch, not the judgment.

Going further: chain a second tool

A reported number is often the start of the work, not the end. The same MCP connection can expose more Actors by extending the tools parameter:

https://mcp.apify.com?tools=scrapers_lat/sec-edgar-financials-scraper,scrapers_lat/sec-edgar-filings-scraper
Enter fullscreen mode Exit fullscreen mode

Now the agent can pull the reported figure and retrieve the underlying filings themselves with the SEC EDGAR 10-K, 10-Q & 8-K Filings Scraper, so it can quote the revenue number and then open the exact 10-K that number came from to read the surrounding disclosure. Because each Actor is a separate tool, the agent picks the right one for each step on its own.

🏹 Troubleshooting: if the tool does not appear in Claude, the two usual causes are a missing or misspelled Actor handle in the tools parameter (it must be the exact username/actor-name from the Store URL) and a config that was edited while Claude was running. Fix the handle, save, and fully restart the client.

📌 Note: each tool call is a real Actor run billed to your Apify account (this Actor is pay-per-result). For a handful of tickers in a chat the cost is a fraction of a cent. If you need to refresh hundreds of companies on a schedule, run the Actor directly through the Apify API or a scheduled task instead of one call per chat message. And remember EDGAR reflects what a company reported: concept names differ across filers and taxonomies, so if a value comes back empty, try the alternate concept (for example Revenues versus RevenueFromContractWithCustomerExcludingAssessedTax).

Wrapping up

You now have an AI agent that can pull a company's reported financials from its SEC filing, on demand, mid-conversation, with the fiscal period and source accession a real analysis needs. The pattern is reusable: pick an Actor that returns authoritative structured data, expose it through the Apify MCP server with the tools parameter, and let the agent decide when to call it.

To take it further:

  • Pull more concepts by changing the concepts list: margins, cash, liabilities, shares outstanding, anything in the us-gaap taxonomy.
  • Chain the filings Actor to move from a number to the disclosure behind it in the same conversation.
  • Read the Apify MCP server docs for OAuth setup, resource reads, and the search-actors / call-actor tools that let an agent discover Actors it was not preconfigured with.

The Actor used in this guide: SEC EDGAR Financials Revenue & Assets Scraper.

Top comments (0)