# Papertrade AI > Open-source MCP server that lets Claude, ChatGPT, Codex, Cursor, Gemini and VS Code read live Papertrade markets and trade BTC and ETH perps up to 1000x, with non-custodial session keys and guardrails you set. - Remote MCP server (Streamable HTTP, OAuth 2.1): https://papertrade-ai.ninabrekkerese.workers.dev/mcp - Public MCP endpoint, no auth, read-only tools: https://papertrade-ai.ninabrekkerese.workers.dev/public/mcp - Local stdio server: `npx -y papertrade-ai` - REST API: https://papertrade-ai.ninabrekkerese.workers.dev/api/v1/tools/{name}, OpenAPI at https://papertrade-ai.ninabrekkerese.workers.dev/openapi.json - MCP Registry name: io.github.nirholas/papertrade-ai - Source: https://github.com/nirholas/papertrade-ai (MIT) Papertrade is a perpetual futures exchange on HyperEVM (chain 999) for BTC and ETH with up to 1000x leverage, $10 minimum margin and $10,000 minimum position size. Positions use real USDC. Trading through Papertrade AI needs a session key the wallet owner approves with guardrails; the key cannot withdraw funds. Opening a position is always preview_trade, then open_position with the returned quoteId. ## Docs - [Getting started](https://papertrade-ai.ninabrekkerese.workers.dev/docs/getting-started.md): Connect Papertrade AI to your AI assistant in under a minute, read live Papertrade markets, and enable guarded trading with a session key. - [Claude, Claude Desktop and Claude Code](https://papertrade-ai.ninabrekkerese.workers.dev/docs/claude.md): Add Papertrade AI to Claude.ai, Claude Desktop, Claude mobile and Claude Code as a custom connector, plugin or MCP server, and trade Papertrade perps from chat. - [ChatGPT](https://papertrade-ai.ninabrekkerese.workers.dev/docs/chatgpt.md): Use Papertrade AI in ChatGPT as an app in developer mode, or build a custom GPT with Actions from the OpenAPI document. Live Papertrade perps markets and guarded trading in ChatGPT. - [OpenAI Codex](https://papertrade-ai.ninabrekkerese.workers.dev/docs/codex.md): Add Papertrade AI to the OpenAI Codex CLI and IDE extension as a remote MCP server with OAuth, or run it locally over stdio. - [Cursor](https://papertrade-ai.ninabrekkerese.workers.dev/docs/cursor.md): One-click install of Papertrade AI in Cursor. Read live Papertrade perps markets and trade BTC and ETH with guardrails from Cursor's agent. - [VS Code and GitHub Copilot](https://papertrade-ai.ninabrekkerese.workers.dev/docs/vscode.md): Install Papertrade AI in VS Code for GitHub Copilot agent mode with one click, the command line, or mcp.json. Interactive Papertrade trading cards render in chat. - [Gemini CLI](https://papertrade-ai.ninabrekkerese.workers.dev/docs/gemini.md): Install Papertrade AI as a Gemini CLI extension, or add it as a remote MCP server with OAuth. Trade Papertrade perps from the Gemini command line. - [Windsurf, Zed, Cline, Goose and other MCP clients](https://papertrade-ai.ninabrekkerese.workers.dev/docs/other-clients.md): Connect Papertrade AI to Windsurf, Zed, Cline, Goose, LibreChat, Continue, Raycast, n8n or any Model Context Protocol client over Streamable HTTP or stdio. - [Tool reference](https://papertrade-ai.ninabrekkerese.workers.dev/docs/tools.md): Every Papertrade AI tool with its inputs, access level and safety annotations. Markets, charts, liquidation maps, leaderboards, wallet analytics, previews and guarded trading. - [Security model](https://papertrade-ai.ninabrekkerese.workers.dev/docs/security.md): How Papertrade AI keeps your wallet safe. Non-custodial session keys that cannot withdraw, server-enforced guardrails, preview-then-confirm trading, encrypted storage and instant revocation. - [REST API and OpenAPI](https://papertrade-ai.ninabrekkerese.workers.dev/docs/rest-api.md): Call every Papertrade AI tool over plain HTTPS. Free public endpoints for Papertrade markets, charts, liquidation maps, leaderboards and wallet analytics, with an OpenAPI 3.1 document for GPT Actions and agent frameworks. - [Local CLI and stdio server](https://papertrade-ai.ninabrekkerese.workers.dev/docs/cli.md): Run Papertrade AI on your own machine with npx. Browser wallet login, headless session keys for bots, read-only mode and every environment variable. - [Self-hosting](https://papertrade-ai.ninabrekkerese.workers.dev/docs/self-hosting.md): Deploy your own Papertrade AI remote MCP server to Cloudflare Workers in five minutes, with OAuth, KV storage and the trading widget. - [FAQ](https://papertrade-ai.ninabrekkerese.workers.dev/docs/faq.md): Answers about Papertrade AI. Is it safe, which AI apps work, what it costs, what the session key can do, minimums, leverage, liquidation and how to revoke access. ## Tools - `get_markets` (public): Live Papertrade perp markets (BTC, ETH): Hyperliquid mark/bid/ask, 24h change, Papertrade 24h volume, open interest vs caps, max leverage, minimum trade size and whether each market is open. Call this before trading. - `get_price_chart` (public): OHLCV candles for BTC or ETH from Hyperliquid (the price source Papertrade settles against), with range stats and a TradingView link. - `get_protocol_stats` (public): Papertrade protocol analytics: TVL, margin, LP, lifetime volume, open positions, fees, PAPER supply and staking, plus daily history (volume, trader PnL, liquidations, users). - `get_liquidation_map` (public): Where open Papertrade positions get liquidated: notional and position count of longs and shorts by price bucket around the current price, with the largest clusters. - `get_leaderboard` (public): Papertrade trader leaderboard for a time window, sortable by PnL, volume, balance and more. Search by name or address with q. - `get_top_trades` (public): The most profitable individual Papertrade positions in a window: who, market, side, leverage, entry, exit and PnL. - `get_recent_trades` (public): The latest opens, closes and liquidations across all of Papertrade, optionally filtered by market or wallet. - `get_account` (public): A Papertrade account: free balance, locked margin, equity, every open position with live estimated PnL, bust price and distance to liquidation, pending intents, session keys and lifetime stats. Any wallet can be inspected. - `get_trade_history` (public): Closed and liquidated positions for a wallet, newest first, with entry, exit, settled PnL, fees and PAPER minted. - `get_portfolio_history` (public): Equity curve for a wallet over 1h, 1d, 1w or all time. - `calculate_position` (public): Pure math for a hypothetical position: bust price, liquidation distance and settled PnL at a target exit, using the exchange formula (win curve, deadband, 2% win fee). Does not need a wallet. - `get_deposit_info` (public): How to fund a Papertrade account: the wallet's personal deposit proxy address (USDC on HyperCore spot), minimums, the activation fee, and the wallet's current HyperEVM USDC/HYPE balances. Read-only; it never moves funds. - `get_trading_permissions` (public): What this connection may do: connected wallet, whether a trading session is active and when it expires, the guardrails the owner set, and how much of the daily limit is used. - `preview_trade` (trading session): Step 1 of 2 for opening a position. Checks the trade against exchange limits, the account balance and the owner guardrails, estimates entry, bust price and PnL scenarios, and returns a quoteId valid for 3 minutes. Show the preview to the user and get an explicit yes before calling open_position with the quoteId. - `open_position` (trading session): Step 2 of 2: opens a real Papertrade position with the user's funds, signed by the delegated session key. Requires the quoteId from preview_trade for the identical market, side, margin and leverage, and only after the user explicitly confirmed. Waits for settlement and reports the fill. - `close_positions` (trading session): Closes open positions at the market, signed by the session key. Pass positionIds, or all=true optionally narrowed by market. Confirm with the user before closing. Reports each settled result. - `cancel_intent` (trading session): Cancels a submitted intent that is still queued (not yet executed). - `get_intent_status` (public): Whether a submitted intent is still queued, has produced an open position, or is no longer pending. ## Optional - [Privacy policy](https://papertrade-ai.ninabrekkerese.workers.dev/privacy.md) - [Full documentation in one file](https://papertrade-ai.ninabrekkerese.workers.dev/llms-full.txt)