> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xentfi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cursor

> Connect XentFi agent tools to Cursor via MCP.

Cursor supports MCP servers via a project-level or global config file.

## Global (all projects)

Edit `~/.cursor/mcp.json` (create it if it doesn't exist):

```json theme={null}
{
    "mcpServers": {
        "xentfi": {
            "command": "npx",
            "args": [
                "-y",
                "@xentfi/mcp-server"
            ],
            "env": {
                "XENTFI_AGENT_KEY": "sk_agent_xxx",
            }
        }
    }
}
```

## Project-only

Create `.cursor/mcp.json` in your repo root with the same contents. This is useful if different projects/agents should use different XentFi API keys — commit a `.cursor/mcp.json.example` with placeholders and keep the real file (with your key) out of version control.

## Enabling it

<Steps>
  <Step title="Open MCP settings">
    **Cursor Settings → MCP**.
  </Step>

  <Step title="Confirm it's active">
    You should see `xentfi` listed with a green/active dot and its tool count.
  </Step>

  <Step title="Use it">
    In the Agent/Composer chat, XentFi tools are available automatically — Cursor's agent will call them when relevant, or ask directly: *"Use xentfi to show my agent's wallet balances."*
  </Step>
</Steps>

<Note>
  Cursor spawns one subprocess per config entry and keeps it running for the session — no need to restart Cursor after the first load, only after editing `mcp.json`.
</Note>

<Warning>
  For a key that Cursor's agent can use to *read* wallet/policy data but never move funds unattended, restrict the Policy attached to that agent's API key in the XentFi dashboard rather than relying on client-side restrictions — `xentfi_create_payment` is still callable by any client holding a valid key.
</Warning>

## Next steps

<CardGroup cols={2}>
  <Card title="Tools Reference" icon="list" href="/agent/tools-reference">
    See every available tool.
  </Card>

  <Card title="VS Code" icon="puzzle" href="/agent/vscode">
    Another local-client option.
  </Card>
</CardGroup>
