Papertrade AI
io.github.nirholasPublished by GitHub account nirholasv0.1.0Updated Oct 24, 2026
Trade Papertrade BTC and ETH perps from Claude, ChatGPT, Codex, Cursor and any MCP client.
Overview
MCP server for Papertrade BTC and ETH perpetual futures: live market data, wallet analytics, liquidation maps, and guarded trade execution via a session key.
- What you can do
- Read live BTC/ETH perp markets, OHLCV price charts and protocol stats
- Inspect liquidation maps, leaderboards, top and recent trades
- Review a wallet's account, open positions, trade history and equity curve
- Calculate hypothetical position math such as bust price and liquidation distance
- Preview, open, close and cancel trades, and check intent status
- Get deposit instructions and current trading permissions and limits
- When to use it
- Useful when you want an assistant to research Papertrade perp markets, analyze wallets and liquidation levels, or place and manage small leveraged BTC/ETH positions under server-enforced limits. Read-only use works without any wallet connection.
- Requirements
- Remote streamable HTTP endpoint with OAuth 2.1, or the npm package papertrade-ai run locally via npx with Node.js. A wallet is needed for account and trading tools; the optional PAPERTRADE_PRIVATE_KEY enables headless trading, and PAPERTRADE_WALLET allows read-only access without logging in. Local credentials are stored in the user's config directory.
Installation
In SourceWeft
- Open Papertrade AI in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.
Use with an agent
Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.
Read https://sourceweft.com/mcp/io.github.nirholas%2Fpapertrade-ai/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.Other MCP clients
Add this to your client's mcpServers config.
{
"mcpServers": {
"papertrade-ai": {
"type": "http",
"url": "https://papertrade-ai.ninabrekkerese.workers.dev/mcp"
}
}
}README
[Papertrade AI: trade perps from any AI. Claude, ChatGPT, Codex, Cursor, Gemini, VS Code.]
Papertrade AI
Trade Papertrade BTC and ETH perps from Claude, ChatGPT, Codex, Cursor, Gemini CLI, VS Code and any MCP client.
Open-source Model Context Protocol server with live markets, wallet analytics, liquidation maps, and guarded trading through non-custodial session keys.
[npm] [MCP Registry] [License: MIT] [Docs]
One URL, OAuth 2.1, no API keys. Your wallet signs once to register a session key that can trade but cannot withdraw, and the server enforces the limits you choose: margin per trade, leverage, daily size, open positions and markets. Every trade is previewed and needs your confirmation.
What you can ask
- "What are BTC and ETH doing on Papertrade right now?"
- "Show me the Papertrade liquidation map for ETH."
- "Who are the top 10 Papertrade traders this week? What are they holding?"
- "Analyze wallet 0x...: win rate, biggest trade, equity curve."
- "If I long BTC with $20 at 500x, where is my liquidation price?"
- "Preview a $15 ETH short at 800x, then open it if I confirm."
- "Close all my BTC positions."
On clients with MCP Apps support (Claude, ChatGPT, VS Code, Goose) results render as an interactive trading card with a live chart.
Install
Local (stdio)
Run npx -y papertrade-ai login once to connect a wallet in your browser. Credentials stay in ~/.config/papertrade-ai (mode 0600). CLI guide
Tools
Full inputs and annotations: Tool reference. Public tools also work over plain HTTPS:
OpenAPI 3.1 at /openapi.json, ready for GPT Actions and agent frameworks. Unauthenticated MCP for read-only agents: https://papertrade-ai.ninabrekkerese.workers.dev/public/mcp.
Security
- Non-custodial. Your wallet signs one EIP-712
RegisterSessionKeymessage, the same one the official Papertrade app signs for one-click trading. The session key is scoped by the exchange contract to open, close and cancel. It cannot withdraw or transfer. - Guardrails in code, not in the prompt. Margin per trade, leverage, rolling 24h position size, open positions and markets are checked on the server before any intent is signed.
- Preview, then confirm.
open_positionneeds a signed quote frompreview_tradefor the identical trade, valid for 3 minutes. - Encrypted per app. Each app's session key is encrypted with a key derived from that app's own access token.
- Revoke in one click at /account.
Read the full security model. Report vulnerabilities privately: SECURITY.md.
Develop and self-host
Deploy your own copy to Cloudflare Workers with one KV namespace and one secret: Self-hosting. The package also exports the tool registry, policy engine and intent signing for use in your own agent: import { TOOLS, runTool } from 'papertrade-ai'.
Risk
Papertrade positions use real USDC. At 1000x leverage a 0.1% move against you liquidates the position and the full margin is lost. Papertrade AI is independent open-source software, not affiliated with Papertrade, and not financial advice.
License
Support the project
If papertrade-ai saves you time, star it on GitHub. Stars are how other developers and AI agents find the repositories worth trusting, and they cost you one click.
Know someone who would use it? Post on X · Share on Bluesky · Share on LinkedIn · Submit to Hacker News · Share on Reddit
Built for AI agents too
Coding agents and LLM tooling can read this repo directly: AGENTS.md, llms.txt, llms-full.txt. Point an agent at https://github.com/nirholas/papertrade-ai and it has the context it needs.
More from the same author
- All repositories by nirholas: the full catalog, grouped by topic
- three.ws: the platform for 3D AI agents with Solana wallets, a skill marketplace and x402 payments
- Questions or ideas: open an issue or start a discussion
Contributors
Star history
Source: README.md at commit d4554bb
Tools
0Version history
1- v0.1.0LatestOct 10, 2026
Score
85% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 daysRequired25 pts
- Auth declaredRequired10 pts
- Tools listedRequired15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts