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 APIShort 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 insidecurl -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.
bashclaude 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:
- Read the key from
FUNDFACTS_API_KEY; never commit it. - Cache by ISIN with
expiresAt; stop beforeX-RateLimit-Remaininghits zero; sleepRetry-Afteron 429. - Timeout of 300 seconds on the single-fund endpoint; a loading state in UIs for cold ISINs.
- Retry only
502 upstream_error, at most twice; never retry 4xx. - Treat
404 fund_not_foundas "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.bashcurl -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]}'