canli-mcp / Point-in-time data

How do I get point-in-time fundamentals without lookahead bias?

Ask canli-mcp what was known on a date. known_as_of returns a company's figures as they had been filed by then, so a backtest never uses a number the market had not seen, and restatements shows every later change.

Free and MIT-licensed. No account and no API key. Or run claude mcp add canli -- npx -y canli-mcp in Claude Code.

Ask it

What were Apple's reported figures as of March 2020?

The agent finds the tool through canli-mcp's find_tool and runs it through run_tool. This is the call:

{
  "name": "known_as_of",
  "arguments": {
    "company": "AAPL",
    "as_of": "2020-03-01",
    "periods": "annual"
  }
}

What came back

Recorded from canli-mcp 0.11.1 on 2026-10-25, with no API key set. The model read 3,023 characters.

What known_as_of returned, the first rows; the first columns
concepttagendstartvalunitfiledform
revenueRevenueFromContractWithCustomerExcludingAssessedTax2019-09-282018-09-30260174000000USD2019-10-3110-K
net_incomeNetIncomeLoss2019-09-282018-09-3055256000000USD2019-10-3110-K
operating_incomeOperatingIncomeLoss2019-09-282018-09-3063930000000USD2019-10-3110-K
eps_dilutedEarningsPerShareDiluted2019-09-282018-09-3011.89USD/shares2019-10-3110-K
assetsAssets2019-09-28338516000000USD2020-01-2910-Q
liabilitiesLiabilities2019-09-28248028000000USD2020-01-2910-Q
equityStockholdersEquity2019-09-2890488000000USD2020-01-2910-Q
cashCashAndCashEquivalentsAtCarryingValue2019-09-2848844000000USD2020-01-2910-Q
The result known_as_of sent back, in full form
{
  "ref": "r18",
  "company": {
    "cik": "0000320193",
    "name": "Apple Inc.",
    "ticker": "AAPL",
    "page": "https://canlicapital.com/companies/0000320193"
  },
  "snapshot": {
    "fetched_at": "2026-09-19T09:30:25.021Z",
    "sha256": "73a86c6aedc31f77cac2ea4df5f80f0b3bd7e6eb58bb4e01444fbedf3afb9c43",
    "url": "https://canlicapital.com/company-data/sources/73a86c6aedc31f77cac2ea4df5f80f0b3bd7e6eb58bb4e01444fbedf3afb9c43.json.gz",
    "sec_url": "https://data.sec.gov/api/xbrl/companyfacts/CIK0000320193.json",
    "age_days": 35
  },
  "as_of": "2020-03-01",
  "periods": "annual",
  "columns": [
    "concept",
    "tag",
    "end",
    "start",
    "val",
    "unit",
    "…"
  ],
  "rows": [
    [
      "revenue",
      "RevenueFromContractWithCustomerExcludingAssessedTax",
      "2019-09-28",
      "2018-09-30",
      260174000000,
      "USD",
      "…"
    ],
    [
      "net_income",
      "NetIncomeLoss",
      "2019-09-28",
      "2018-09-30",
      55256000000,
      "USD",
      "…"
    ],
    [
      "operating_income",
      "OperatingIncomeLoss",
      "2019-09-28",
      "2018-09-30",
      63930000000,
      "USD",
      "…"
    ],
    [
      "eps_diluted",
      "EarningsPerShareDiluted",
      "2019-09-28",
      "2018-09-30",
      11.89,
      "USD/shares",
      "…"
    ],
    [
      "assets",
      "Assets",
      "2019-09-28",
      null,
      338516000000,
      "USD",
      "…"
    ],
    [
      "liabilities",
      "Liabilities",
      "2019-09-28",
      null,
      248028000000,
      "USD",
      "…"
    ],
    "…"
  ],
  "meaning": "Each row is the most recent period whose value had been filed on or before as_of, with the value as it stood then. changed_after: a later fi…",
  "limits": [
    "Values are as the SEC's XBRL companyfacts API reported them for this company in the snapshot named here; filings made after the snapshot dat…",
    "filed is the date the filing reached EDGAR. To avoid lookahead in a backtest, treat a value as known from the next trading day after it was …",
    "A value that changed in a later filing may be a restatement, a reclassification or a correction; accn names the filing to read.",
    "Company-reported data, not investment advice."
  ]
}

Prices, filings and statistics are as the sources published them on that day; run the call again for today's. Nothing here is investment advice.

The tools behind the answer

From canli-mcp's tool index
ToolPackWhat it does
known_as_offundamentalsGet what a company had reported as of a date: per measure, the latest period filed by then, its value, and whether it was later restated; optionally ratios from those filings. For point-in-time backtests.

Add canli-mcp

Claude Code
claude mcp add canli -- npx -y canli-mcp
Cursor, Claude Desktop or any MCP client
{ "mcpServers": { "canli": { "command": "npx", "args": ["-y", "canli-mcp"] } } }
claude.ai, ChatGPT or any client that takes a URL
https://canlicapital.com/mcp/canli

Everything canli-mcp does · How it compares with other finance MCP servers

Related questions