---
title: "How do I use FundFacts API in Cursor?"
description: "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."
canonical: https://fundfactsapi.com/answers/fund-data-for-cursor
published: 2026-09-12
updated: 2026-10-13
publisher: FundFacts API
---

# How do I use FundFacts API in Cursor?

**Short 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](https://fundfactsapi.com/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 seven 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, Starter and above), `fund_overlap` (shared holdings between funds, Starter and above), `get_scpi` (French SCPI data by name or ISIN) and `search_scpi` (SCPI name → matches, free), plus a `tour` prompt that explains the service on the example fund IE00B4L5Y983, which is not counted. Every tool only reads data. Authentication is either your FundFacts account (OAuth 2.1 with PKCE, the sign-in the claude.ai, Claude Desktop and ChatGPT connectors run) or the same bearer API key as the REST API, sent as an `Authorization` header by editors, CLIs and frameworks. The [MCP server guide](https://fundfactsapi.com/docs/mcp) has the full tool reference, setup for every client and troubleshooting.

**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](https://fundfactsapi.com/llms-full.txt).

## FAQ

### Can Cursor's agent run the code it writes against the API?

Yes, with FUNDFACTS_API_KEY in .env (listed in .gitignore). The rule instructs it to read the key from the environment and never to paste it into source files.

### Do I need a credit card to try it?

No. The Free plan is 5 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.

## About FundFacts API

FundFacts turns any fund or ETF ISIN into one dated factsheet (fees and KID costs, the 1–7 risk indicator, holdings, sector and country exposure, returns) read from the fund house's own documents: as a client-ready PDF under your firm's name for advisers and wealth managers, as JSON through its API for developers, or inside ChatGPT and Claude through its MCP server.

FundFacts works inside ChatGPT and Claude as a connector (a remote MCP server): ask about any fund or ETF by ISIN, ticker or name and the assistant answers from FundFacts' dated figures, fees, risk, holdings, exposure and returns, with fund cards, side-by-side comparisons, holdings overlap and portfolio look-through.

- Free API key, no card: https://fundfactsapi.com/signup
- Documentation: https://fundfactsapi.com/docs (OpenAPI: https://fundfactsapi.com/openapi.json)
- MCP server: https://fundfactsapi.com/api/mcp (set-up for every client: https://fundfactsapi.com/mcp-server)
- Pricing: https://fundfactsapi.com/pricing
- Site index for AI assistants: https://fundfactsapi.com/llms.txt
- Informational data, not investment advice.
