AI agents & LLMs

How do I use FundFacts API with Claude Code?

Set up Claude Code to build on fund data: install the companion skill, drop AGENTS.md into the repo, register the MCP server with claude mcp add, and prompt it to build a screener, report or bot.Updated 12 September 2026 · by FundFacts API

Short answer

Put the companion kit's AGENTS.md (or the public edition from /llms-full.txt) at the root of your project so Claude Code knows every endpoint, field and rule, install the included Claude Code skill, and register the MCP server with claude mcp add --transport http fundfacts https://fundfactsapi.com/api/mcp --header "Authorization: Bearer ffk_...". Then a single prompt such as "build a fund comparison page for a list of ISINs" produces working code against the API.

Three pieces, each optional

AGENTS.md is the one that matters most. It is a complete, current description of the API written for coding agents: endpoints, the response envelope, every field of data with type and example, the quota rules, error handling, and a reference client in TypeScript and Python. Claude Code reads it at the start of a session. The public edition is at /llms-full.txt; subscribers download a version with their plan limits and key from the dashboard.

bash
# public edition, no key inside
curl -s https://fundfactsapi.com/llms-full.txt -o AGENTS.md

The skill (.claude/skills/fundfacts/SKILL.md in the kit) tells Claude Code when to reach for the API and how to structure fund-data code: cache by ISIN until expiresAt, 300-second timeouts on /funds/{isin}, never ship the key to a browser bundle, show dataAsOf.

The MCP server lets Claude Code *look at real data* while it codes: check a field name, test an ISIN, see what a bond fund's payload contains before writing the parser.

bash
claude mcp add --transport http fundfacts https://fundfactsapi.com/api/mcp --header "Authorization: Bearer ffk_..."

Prompts that work

  • "Using AGENTS.md, build a Next.js page that takes a list of ISINs and shows name, TER, risk indicator and 5-year annualised return in a table, cached in Postgres until expiresAt."
  • "Write a Python script that loads isins.csv through POST /funds in batches of 50, retries pending ISINs after 60 seconds, and writes name, category, TER and AUM to a parquet file."
  • "Add a Slack bot command /fund <isin> that replies with the top five holdings and the sector split."

The guide to building a fund app with a coding agent walks through a full session.

Rules the agent should follow

The kit spells these out; they are worth knowing because they explain the code Claude Code writes:

  1. Read the key from FUNDFACTS_API_KEY; never commit it.
  2. Cache by ISIN with expiresAt; stop before X-RateLimit-Remaining hits zero; sleep Retry-After on 429.
  3. Timeout of 300 seconds on the single-fund endpoint; a loading state in UIs for cold ISINs.
  4. Retry only 502 upstream_error, at most twice; never retry 4xx.
  5. Treat 404 fund_not_found as "not a covered fund", not a bug.

Paid plans include an AI companion kit generated from the live field reference: an AGENTS.md with every endpoint, field, rule and a reference client; a Cursor rule; a Claude Code skill; the OpenAPI spec and TypeScript types, with your key baked in or read from an environment variable. Download it from the dashboard; the public edition without a key is at /llms-full.txt.

Verify it yourself

The demo endpoint returns the live payload for a fund that is already in the store, without a key. Everything on this page can be checked against it.
bash
curl -s https://fundfactsapi.com/api/v1/demo/funds/IE00B4L5Y983 | jq '{name, asOf: .data.dataAsOf, ter: .data.headlineMetrics.ter, risk: .data.riskRating, top: .data.topHoldings[:3]}'

Frequently asked questions

Which plan includes the kit?

Starter ($9.99) and above. The public AGENTS.md at /llms-full.txt has the same reference minus your key and plan limits, so you can start on the Free plan and switch later.

Do I need a credit card to try it?

No. The Free plan is 15 lookups per month with no card; sign up with an e-mail address or Google and the key is shown in the dashboard.

Which ISINs work?

Any share class of a UCITS fund, ETF, money-market fund or open-end fund whose management company publishes a product page, factsheet and KID. Each share class has its own ISIN and is looked up on its own. Stocks, bonds and indices are not funds and return 404 fund_not_found.

Try it on your own ISINs

One request returns key facts, holdings, risk and performance as JSON. Free plan, no card.