Skip to main content

Datavidence Financials — MCP Server

Normalized US-GAAP financial statements for every SEC XBRL filer — point-in-time, as originally reported — as MCP tools for your AI agent (or a plain REST API).

PyPI Python versions License: MIT MCP registry

Language models are good at reasoning about financial statements and bad at getting them. SEC EDGAR has the data, but its XBRL is a thicket of inconsistent tags, renamed concepts, and per-filer quirks — so agents either hallucinate the numbers or you spend weeks building a normalization layer. This is that layer: your agent asks for a company's financials and gets a clean, consistent answer — over the Model Context Protocol, or as a plain REST API.

⭐ If this is useful, please star the repo. It's a solo, early project, and stars are how other developers find it.

This is the open-source, AI-native layer for the Datavidence Financials API — a standalone stdio server that forwards over HTTPS to the REST API (bring your own key). The connector is MIT-licensed; the underlying API is a commercial service.

Try it in 30 seconds (no signup)

Run it with no clone using uv — it installs into a throwaway environment:

FL_API_KEY=sandbox_demo_key uvx datavidence-financials

sandbox_demo_key returns sample data with no signup — good for a first run. Set FL_API_KEY to your real key for live SEC data. The server speaks MCP over stdio, so an MCP client (e.g. Claude Desktop, below) launches it.

Or install it as a persistent tool with pipx:

pipx install datavidence-financials
FL_API_KEY=sandbox_demo_key datavidence-financials

Why it's different

  • Point-in-time, as originally reported. Pass an as_of date and you get the figures as they stood then — no look-ahead bias from later restatements. The thing backtests quietly get burned without.
  • Normalized to one schema. EDGAR's XBRL tags drift between filers and change over the years. We map them to a single US-GAAP income statement, balance sheet, and cash flow — including the awkward cases (noncontrolling interest, mezzanine/temporary equity, non-calendar fiscal years) — so you never parse a filing.
  • Every SEC XBRL filer. Coverage is the whole SEC XBRL universe (~2009 to present), fetched and normalized on demand — any CIK with XBRL facts, not a curated subset.
  • Source-linked, too. Turn on provenance and every value carries its SEC accession, filed date, and a direct EDGAR URL — so the model cites the filing instead of inventing a number.

Honest scope: US-GAAP only (IFRS filers return a clear "unsupported" signal rather than wrong numbers); XBRL-era history (~2009 onward). And when a company reorganizes under a new holding entity, SEC's ticker map points only at the successor CIK — the earlier years stay under the predecessor, so the error tells you and you pass cik= directly.

Tools

  • get_financials — normalized income statement + balance sheet + cash flow for one company and fiscal year, from SEC EDGAR XBRL. Supports as_of (point-in-time, as originally reported), include_provenance (per-value SEC accession, filed date, and direct EDGAR source URL), and include_ratios (margins, ROA/ROE, leverage).
  • get_financials_batch — the same, for up to 25 companies in one call (comma-separated tickers/CIKs). Per-symbol results; counts as a single quota unit, so one bad symbol never fails the batch.
  • list_filings — a company's recent SEC filings (newest first) from the EDGAR submissions index; filter by form (e.g. 10-K). Use it to discover which fiscal years are available before calling get_financials.
  • get_usage — the key's monthly quota (tier, used, remaining, reset). Free to call; consumes no quota.

Errors surface the API's recovery_action hint, so agents self-correct.

Claude Desktop

Add to claude_desktop_config.json, then fully quit (Cmd+Q) and reopen Claude Desktop — the tools appear:

{
  "mcpServers": {
    "datavidence-financials": {
      "command": "uvx",
      "args": ["datavidence-financials"],
      "env": { "FL_API_KEY": "sandbox_demo_key" }
    }
  }
}

Then ask, e.g., "Get AAPL's FY2023 income statement, balance sheet, and cash flow with ratios." Swap in your real key for live data.

Configuration (environment variables)

Variable Default Notes
FL_API_KEY (none) Your API key. sandbox_demo_key = no-signup trial (sample data).
FL_API_BASE_URL https://api.financials.datavidence.ai Point at a marketplace gateway for metered BYOK access.
FL_API_KEY_HEADER X-API-Key Header to send the key in (e.g. X-RapidAPI-Key for the RapidAPI gateway).
FL_API_TIMEOUT 30 Per-request timeout, in seconds.

Getting live data

The demo key returns sample data. For live figures, grab a key on RapidAPI: Free (1,500 calls/mo), Pro ($29 / 50k), Business ($99 / 300k). Full feature parity across tiers — they differ only by monthly call volume.

For a metered marketplace channel, point FL_API_BASE_URL at the gateway endpoint and set FL_API_KEY / FL_API_KEY_HEADER to the gateway's key/header (BYOK), so calls are metered by the marketplace rather than hitting the origin directly.

Run from source

pip install -e .
FL_API_KEY=sandbox_demo_key python -m mcp_server.server   # stdio transport

Feedback

Found a company where the numbers come back wrong, or a field/tool you need? Open an issue — the normalization edge cases are exactly the feedback that makes this better, and I read every one.

License

MIT © 2026 Datavidence LLC — see LICENSE. The connector is open-source; the underlying Datavidence Financials API is a commercial service.

Metadata

Release files for datavidence-financials 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datavidence-financials 0.1.3
File Size Uploaded
datavidence_financials-0.1.3.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for datavidence-financials 0.1.3
File Interpreter ABI Platform
datavidence_financials-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 20.8 kB

Release files / datavidence_financials-0.1.3.tar.gz

Download URL datavidence_financials-0.1.3.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
50ec7d842a22db807dd008715d64978267d8bce937eb3b1755ecc385fb9b2dbf
BLAKE2b-256 checksum
How to use checksums
fbc22fd030df80111a362dda029c1fd6cc5280765244bc65f4d57ea7c52da224
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / datavidence_financials-0.1.3-py3-none-any.whl

Download URL datavidence_financials-0.1.3-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
763697ac42946de843a82ca64b0bd2098b84f6586bd98571bae1bb1e7fe3060a
BLAKE2b-256 checksum
How to use checksums
5bdf15d9784baccbb83977e46f928976106b8d6f5ecee24dba3b3958488e490f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

0.1.5

2 release files

0.1.4

2 release files

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page