ProFunding Docs

MCP setup

Connect Claude Desktop, Claude Code or Cursor to ProFunding with a free API key, then research funding spreads and trade your venues by chat.

Connect an AI assistant such as Claude Desktop, Claude Code or Cursor to ProFunding, and you can ask it for live funding spreads, backtests and order-book depth in plain language, then have it open, close, TWAP and watch positions on your own venue accounts. Setup is one install, a free API key and a few lines of config.

MCP (Model Context Protocol) is the standard that lets an AI assistant call outside tools. ProFunding's MCP server is the profunding-mcp package on PyPI. It gives your assistant 44 tools in 9 groups, all available on a free key. Seven research tools work with no key at all. MCP has no tools for Autopilot, Farming or Darkside; run those from their own pages.

Every tool is listed in the MCP tools reference. For research workflows, see MCP research.

The setup steps on the MCP page

Install the server

You need Python 3.10 or newer.

pipx install profunding-mcp     # isolated install
pip install profunding-mcp      # or with pip
uvx profunding-mcp              # or run without installing

pipx and pip put a profunding-mcp command on your PATH. With uvx, use the uvx config. To update, run pipx upgrade profunding-mcp or pip install --upgrade profunding-mcp, then restart your AI client.

Get your API key

  1. Open MCP and sign in with the wallet you use on ProFunding. Trading tools act on the venues connected to that account.
  2. Click Generate API Key under Your API Key.
  3. Copy the key now; it won't be shown again. Keys start with pfk_.

Later visits show only a masked key, and copying it after a reload copies the masked version, which doesn't work. Paste the key you saved, or regenerate it.

A free key gets 100 requests a day; a key whose wallet has an active subscription gets 10,000. Counters reset at 00:00 UTC. The seven no-key tools don't use the allowance. One tool call can count more than once: analyze_pair reads two order books, and each status check on a TWAP or Find the Exit job is a request.

To replace a lost or leaked key, click Regenerate Key on MCP. The old key stops working at once; put the new one in every client config.

Connect Claude Code

claude mcp add profunding -e PROFUNDING_API_KEY=pfk_your_key_here -- profunding-mcp

Add --scope user after add to use it in every project. Run claude mcp list to check it's connected.

Claude Code asks permission before each MCP tool call. To approve the trade tools ahead of time, add them to permissions.allow in .claude/settings.local.json (one project) or ~/.claude/settings.json (every project), for example mcp__profunding__open_delta_neutral and mcp__profunding__close_delta_neutral. Claude then places those orders without prompting you.

Connect Claude Desktop

Open Settings > Developer > Edit Config and add ProFunding under mcpServers:

{
  "mcpServers": {
    "profunding": {
      "command": "profunding-mcp",
      "env": { "PROFUNDING_API_KEY": "pfk_your_key_here" }
    }
  }
}

Quit Claude Desktop completely and open it again.

Connect Cursor

Add the same block to ~/.cursor/mcp.json (every project) or .cursor/mcp.json (one project), with "type": "stdio" in the profunding entry. Check in Cursor's MCP settings that profunding is enabled.

Any other client that runs a local (stdio) MCP server works the same way: the command profunding-mcp and the environment variable PROFUNDING_API_KEY.

Run it with uvx

{
  "mcpServers": {
    "profunding": {
      "command": "uvx",
      "args": ["profunding-mcp"],
      "env": { "PROFUNDING_API_KEY": "pfk_your_key_here" }
    }
  }
}

For Claude Code: claude mcp add profunding -e PROFUNDING_API_KEY=pfk_your_key_here -- uvx profunding-mcp

Before your first trade

The trading tools place real orders on your own venue accounts, using the venue keys stored on your ProFunding account.

  1. Connect each venue on the web, signed in with the wallet your API key belongs to. See Wallets and keys. A venue connected there is ready here.
  2. Link Telegram for alerts. Every pair opened with open_delta_neutral gets a funding-flip alert.
  3. Check how each tool reads a size:
ToolWhat the size meansDefault leverage
open_tradesize_usd: notional of the one leg5x
open_delta_neutralsize_usd: notional per leg5x
twap_open_dntarget_margin_usd: total margin across both legs, half on each5x

The TWAP size is margin, not notional: $1,000 of total margin at the default 5x is about $2,500 notional per leg. Name the leverage in your request.

open_delta_neutral sends the long first, then the short. If the short fails, the long stays open; ask for get_positions and close it or retry the short. A write that times out says "The order MAY have been placed"; check get_positions or get_open_orders before retrying.

When a venue is connected from several wallets, tools use the venue's default wallet unless you name another (wallet, or long_wallet and short_wallet).

In tool calls, use n1xyz (01xyz).

What you can ask

  • "What's the best delta-neutral trade I can open with $5,000 above 50% APR?"
  • "Backtest SOL long Hyperliquid short Extended over the last 30 days at $5,000."
  • "Open $2,000 per leg delta-neutral on ETH at 3x, long Hyperliquid, short Aster."
  • "TWAP into $1,000 of total margin on SOL at 2x over 60 minutes, long Lighter, short Aster."
  • "Find the exit for my ETH pair and wait at most 6 hours."

Revoke access

What you wantHow
Cut off every MCP clientRegenerate Key on MCP. Your venue keys stay
Stop trading on one venuerevoke_credentials. Refused while a farming mission, Autopilot session or Darkside bot uses it
Remove every venue keyrevoke_all_credentials. Refused while a farming mission, Autopilot session or Darkside bot uses any of them; stop those first

Removing a key never moves funds. A revoke through MCP deletes the server copy only; sign out of the venue in the app as well.

Troubleshooting

What you seeWhat to do
The ProFunding tools don't appearRestart the client. If it still can't start the server, put the full path of profunding-mcp in command (which profunding-mcp or where profunding-mcp)
"Valid JWT or API key required"Add PROFUNDING_API_KEY to the config and restart
"Invalid API key"Mistyped, or the masked key copied after a reload. Paste the full key or regenerate
"API key is deactivated"The key was regenerated. Use the new one
"Daily request limit exceeded"Wait for the 00:00 UTC reset
"No credentials stored for" a venueConnect that venue on the web with the same wallet
A venue "session expired"Sign in to that venue again on the web

FAQ

Do I need an API key to use the ProFunding MCP server?

Seven research tools work with no key. Everything else needs a free API key from the MCP page, which allows 100 requests a day; a key whose wallet has an active subscription gets 10,000.

Which AI clients can use the ProFunding MCP server?

Claude Code, Claude Desktop, Cursor and any client that runs a local stdio MCP server, using the profunding-mcp command and the PROFUNDING_API_KEY environment variable.

Is the TWAP size margin or notional?

twap_open_dn takes total margin across both legs. $1,000 of total margin at the default 5x is about $2,500 notional per leg, so name the leverage in your request.

Questions?

Ask in our Telegram chat. Traders compare pairs, venues and fills there, and the team answers questions.

On this page