Pariflow Agent MCP
Official stdio MCP server and DEMO-first CLI (19 tools) for Pariflow prediction markets, 211 perpetual futures (crypto, 24/7 equities/gold, Pre-IPO SpaceX/Anthropic/OpenAI), whale-flow screening, trade previews, and bounded DEMO-only 30-day scheduled strategies.
Documentation
Pariflow Agent MCP Server & CLI
Self-contained open-source Model Context Protocol (MCP) stdio server (src/pariflow-agent.mjs), CLI, and DEMO-first strategy workflows for Pariflow (pariflow.com).
Built on @modelcontextprotocol/sdk and zod, the server exposes 19 annotated MCP tools and 1 prompt directly from this repository so Claude Code, Codex, Cursor, or any MCP client can inspect prediction markets, screen whale flow, preview orders, inspect 211 perpetual futures (including Pre-IPO SpaceX/Anthropic/OpenAI and 24/7 NVDA/TSLA/Gold/S&P 500), and schedule 30-day server-side DEMO-only strategies on a free $10,000 virtual balance.
Important Safety Boundaries
- Read-only keys cannot trade. Start with a read-only key for discovery, account checks, and order previews.
- Scheduled strategy automation is strictly
DEMO-only. Server-side strategies (create_strategy/start_strategy) cannot useLIVEfunds (DEMO_ONLY_AUTOMATION).- Drafts never auto-start.
create_strategyonly saves rules;start_strategyrequires explicitconfirm: true.- Direct orders require explicit confirmation + idempotency key.
place_tradeandplace_perp_orderreject execution withoutconfirm: trueand a freshidempotencyKey(CONFIRM_REQUIRED).- Not affiliated with Paraflow. Pariflow (
pariflow.com) is a prediction market and perpetual futures trading platform; it is unrelated to the Paraflow AI design tool.
Requirements
- OS: macOS or Linux
- Runtime: Node.js 20+ and
npm - Account: Free Pariflow account with
$10,000virtual demo balance (https://pariflow.com/trading-demo— email or Google sign-up, no card or deposit required)
Quick Setup (Run Directly From Source or Docker)
Option A — Clone and Run Locally (Node.js 20+)
git clone https://github.com/Aduersarius/pariflow-agent-starter.git
cd pariflow-agent-starter
npm install
# Verify the local MCP stdio server handshake (registers all 19 tools)
npm run test:smoke
# Configure a scoped API key from https://pariflow.com -> Settings -> Agent access
export PARIFLOW_API_KEY=YOUR_AGENT_KEY
export PARIFLOW_BASE_URL=https://pariflow.com
# Start the stdio MCP server directly from this repository
npm start
Option B — Run via Docker (Built From This Repository)
docker build -t pariflow-agent-mcp .
docker run -i --rm -e PARIFLOW_API_KEY=YOUR_AGENT_KEY pariflow-agent-mcp
Configure MCP Clients
Claude Code (claude mcp add)
claude mcp add pariflow -- node /absolute/path/to/pariflow-agent-starter/src/pariflow-agent.mjs mcp
Cursor (.cursor/mcp.json) / Claude Desktop / Generic MCP Clients
{
"mcpServers": {
"pariflow": {
"command": "node",
"args": ["/absolute/path/to/pariflow-agent-starter/src/pariflow-agent.mjs", "mcp"],
"env": {
"PARIFLOW_API_KEY": "YOUR_AGENT_KEY",
"PARIFLOW_BASE_URL": "https://pariflow.com"
}
}
}
}
Codex (~/.codex/config.toml)
[mcp_servers.pariflow]
command = "node"
args = ["/absolute/path/to/pariflow-agent-starter/src/pariflow-agent.mjs", "mcp"]
(You can also save credentials locally via PARIFLOW_API_KEY=YOUR_AGENT_KEY node src/pariflow-agent.mjs configure, which writes ~/.pariflow/agent.json with 0600 owner-only permissions.)
Verify the server responds by asking your agent to call get_started and get_account_summary.
Reproducing the 30-Day Whale-Tape Replay Workflow
This repo implements the exact rule set tested in Pariflow Research's 30-day paper replay (methodology & full trade log, May 29 – June 27, 2026):
| Filter Stage | Alerts Cut | Remaining |
|---|---|---|
| Raw 30-day Polymarket whale-alert window | — | 26,885 |
| Buy side only | −6,561 | 20,324 |
| Trade size ≥ $70,000 | −17,817 | 2,507 |
| Maps cleanly to 1 exact outcome | −1,144 | 1,363 |
| Resolves within 7 days | −681 | 682 |
| No earlier opposite ≥$70k whale in same event | −346 | 336 |
| Fits bankroll/daily/exposure risk caps | −276 | 60 copied trades |
Recorded Replay Metrics & Honest Caveats (Paper Only — No Live Funds):
- Paper result:
$5,000start →$8,954.09(+79.1%), peaking at$10,284on June 24; 48 wins / 12 losses (80% win rate);$22,449total staked across 37 events (all 60 resolved within 22h; 42/60 within 3h). - Day-1 Drawdown: The first 3 copied trades all lost (Thunder vs. Spurs
$500@ 42¢, SK Brann twice$270@ 57¢ and$230@ 58¢), dropping the paper account −20% to$4,000before its first win. - High-Price Tail Risk (≥90¢): 11 copies entered at 90¢+ won 10 times (
+$87) and lost once (Spain @ 92¢,−$479) for −$392 net. - Duplicate Event Concentration: 18 of 37 events were copied more than once; half of all 12 losses came from double-copied events (SK Brann, Turkiye, Korea Republic).
- Slippage Assumption: The replay assumed flat
1¢slippage rather than full live orderbook depth impact.
Because of those findings, scripts/run-demo-strategy.mjs adds two client-side pre-flight guardrails when reviewing live candidates: flagging entries >= 0.90 and flagging duplicate events before you confirm anything.
Run the Starter Script (Safe Read-Only Dry Run First)
# Step 1: Read-only shortlist (zero orders, zero strategy writes)
node scripts/run-demo-strategy.mjs --mode scan
# Step 2: Create a DEMO strategy DRAFT (does NOT start or place orders)
node scripts/run-demo-strategy.mjs --mode draft --config configs/whale-replay-demo.json
# Step 3: Explicitly activate the DEMO strategy after inspecting the draft ID
node scripts/run-demo-strategy.mjs --mode start --strategy-id <STRATEGY_ID>
# Step 4: Check latest scheduled run, accepted/skipped counts, and next scan time
node scripts/run-demo-strategy.mjs --mode status --strategy-id <STRATEGY_ID>
# Step 5: Pause without deleting run history
node scripts/run-demo-strategy.mjs --mode pause --strategy-id <STRATEGY_ID> --reason "Completed demo test"
Bonus: Inspect Pre-IPO & 24/7 TradFi Perpetuals via CLI
# Read-only scan of SpaceX (SPCX), Anthropic (ANT / IO-ANTH), OpenAI (IO-OAI), NVDA, GOLD, SP500
node scripts/inspect-preipo-perps.mjs
Complete MCP Tool Surface (19 Tools + 1 Prompt)
Implemented in src/pariflow-agent.mjs and verified locally by npm run test:smoke (scripts/smoke-mcp.mjs). Every tool carries standard MCP readOnlyHint / destructiveHint / idempotentHint annotations.
| Category | MCP Tool | Permission | Purpose |
|---|---|---|---|
| Onboarding | get_started | local read | Returns safe flow, starter prompts, and response rules |
| Account | get_account_summary | read | Balances (DEMO/LIVE), active mode, and account risk limits |
| Discovery | get_top_trades | read | Largest mapped trades (date, limit, source, accountType, minAmount) |
| Discovery | search_markets | read | Search prediction events and perps (q, type: ALL|PREDICTION|PERP, limit) |
| Discovery | resolve_market | read | Resolve external title/whale print to exact Pariflow event/outcome IDs |
| Discovery | prepare_trade_target | trade | Map a missing outcome for a trusted high-confidence signal (never executes) |
| Predictions | preview_trade | read | Estimated fill price (LIVE returns short-lived quoteId + quoteExpiresAt) |
| Predictions | place_trade | trade | Execute DEMO or LIVE order (requires confirm: true + idempotencyKey) |
| Predictions | list_orders | read | Inspect recent orders (status, eventId, accountType, limit, offset) |
| Perps | list_perps | read | List 211 perp instruments with live mark prices, hourly funding, max leverage |
| Perps | get_perp_market | read | Live market bounds, fees, and funding for one perp symbol (e.g., SPCX, BTC) |
| Perps | preview_perp_order | read | Preview fill price, required isolated margin, est. liquidation price, fee |
| Perps | place_perp_order | trade | Execute DEMO/LIVE perp order (confirm: true, idempotencyKey, reduceOnly) |
| Perps | list_perp_positions | read | List open perp positions (entry, mark, leverage, unrealized P&L) |
| Strategies | create_strategy | trade | Save a persistent DEMO-only strategy draft (DRAFT state) |
| Strategies | start_strategy | trade | Activate draft (confirm: true, runNow default true); runs server-side |
| Strategies | pause_strategy | trade | Stop future scans while keeping run history |
| Strategies | get_strategy_status | read | Inspect lifecycle state, latest run totals, end date, and next scan |
| Strategies | list_strategies | read | List saved strategies filtered by DRAFT|ACTIVE|PAUSED|COMPLETED |
CLI Safety Defaults:
preview-trade,trade,preview-perp, andtrade-perpall defaultaccountModetoDEMOunless--account-mode LIVEis passed explicitly. Both--confirmand--confirm=trueare accepted onstart-strategy.
Glama MCP Directory
This server is listed on the Glama MCP Server Directory, where you can browse all 19 tools, inspect quality checks, and test the server online with MCP Inspector:
Documentation & Links
- Full Agent MCP & CLI docs: https://docs.pariflow.com/developers/agent-mcp-cli
- 30-Day Whale Replay Methodology: https://pariflow.com/blog/ai-trading-strategy-30-days
- Free
$10KDemo Account: https://pariflow.com/trading-demo - License: MIT — Educational and research tooling only; not financial or trading advice.