# Connect Cursor

Add the Fundalyze MCP server to Cursor with an API key in mcp.json.

## Before you start

- A Fundalyze plan or free trial.
- An API key from [Account → API & MCP](/account/api). It is shown once, when you create it.

## 1. Add the server

Add Fundalyze to `~/.cursor/mcp.json` to use it in every project, or to `.cursor/mcp.json` in one project. Create the file if it does not exist; if it already lists servers, add the `fundalyze` entry next to them.

```json title="~/.cursor/mcp.json"
{
  "mcpServers": {
    "fundalyze": {
      "url": "https://api.fundalyze.ai/mcp",
      "headers": { "Authorization": "Bearer fdz_live_YOUR_KEY" }
    }
  }
}
```

Replace `fdz_live_YOUR_KEY` with your key. For a project file that is committed to git, keep the key out of it: recent versions of Cursor read environment variables in this file, written as `"Bearer ${env:FUNDALYZE_API_KEY}"`.

## 2. Check it

Open Cursor's settings and find the MCP section (the exact name may differ by version). Fundalyze should be listed and enabled, with its tools. If it shows an error, check the key and the URL.

## 3. Ask

In the agent chat, ask in plain words:

- "Use Fundalyze to pull Nvidia's quarterly revenue and gross margin for the last two years and chart it in a notebook."
- "Find the SEC filings Tesla made this year and list the 8-Ks with links."

Cursor may ask before it runs a tool; every Fundalyze tool only reads data.

## If something goes wrong

- **401:** the key is mistyped or revoked; create a new one.
- **402:** the account has no active plan or trial.
- **"Another call with this API key is still running":** Fundalyze runs one call at a time per key; the agent should wait and retry.

More in [Errors](/developers/concepts/errors) and [Limits and quotas](/developers/concepts/limits).
