How do I use FundFacts API in Cursor?
Set up Cursor to build on fund data: add the companion Cursor rule, keep AGENTS.md in the repo, and register the MCP server in .cursor/mcp.json so the agent can test real ISINs while it codes.Updated 12 September 2026 · by FundFacts APIShort answer
Add the companion kit's Cursor rule to .cursor/rules/ and AGENTS.md to the project root so the agent knows every endpoint and field, then register the MCP server in .cursor/mcp.json with the URL https://fundfactsapi.com/api/mcp and an Authorization: Bearer header. Cursor's agent can then write code against the API and call get_fund or search_funds to check real payloads while it works.
Setup
1. Reference for the agent. Put AGENTS.md (from the kit, or the public edition at /llms-full.txt) at the repository root. The kit's Cursor rule (.cursor/rules/fundfacts.mdc) is a short, always-on version: when to use the API, the envelope, the quota rules, the timeout, where the key comes from.
2. Live data while coding. Create or extend .cursor/mcp.json:
json{"mcpServers": {"fundfacts": {"url": "https://fundfactsapi.com/api/mcp","headers": { "Authorization": "Bearer ffk_..." }}}}
Cursor lists the tools under Settings → MCP; enable them for the agent. The MCP server exposes six tools, each counted like the REST endpoint it wraps: get_fund (ISIN → the full factsheet payload), search_funds (name → ISINs, free), compare_funds (side-by-side table for several ISINs), analyze_portfolio (weighted look-through of a list of positions, Pro and above), fund_overlap (shared holdings between funds, Pro and above) and get_scpi (French SCPI data by name or ISIN). Authentication is the same bearer API key as the REST API, sent as an Authorization header.
3. Types. The kit ships fundfacts.d.ts; or npm install @fundfactsapi/sdk for a typed client with caching built in.
A first prompt
"Read AGENTS.md. Build a /compare?isins=A,B,C route that calls POST /funds with wait:true, renders a table of name, TER, risk indicator, 1/3/5-year annualised returns and top three holdings, caches each payload in Redis until expiresAt, and shows dataAsOf under the table."
The agent will use get_fund on one of the ISINs to see the real shape before writing the renderer, which is the point of having the MCP server available in the editor.
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]}'