npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

prediction-click-mcp-server

v1.0.0

Published

MCP server for prediction.click — real-time crypto fair value & Polymarket trading data

Readme

prediction-click-mcp-server

MCP server for prediction.click — real-time crypto fair value and Polymarket Up/Down market data.

This server gives AI agents access to mathematically derived fair values for Polymarket's short-term crypto markets (BTC, ETH, SOL, XRP, DOGE, BNB), enabling them to identify mispricings and execute trades.

Quick Start

Prerequisites: Get an API key at prediction.click/api-keys and purchase credits.

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "prediction-click": {
      "command": "npx",
      "args": ["-y", "prediction-click-mcp-server"],
      "env": {
        "PREDICTION_CLICK_API_KEY": "pk_YOUR_KEY"
      }
    }
  }
}

Claude Code

claude mcp add prediction-click -e PREDICTION_CLICK_API_KEY=pk_YOUR_KEY -- npx -y prediction-click-mcp-server

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "prediction-click": {
      "command": "npx",
      "args": ["-y", "prediction-click-mcp-server"],
      "env": {
        "PREDICTION_CLICK_API_KEY": "pk_YOUR_KEY"
      }
    }
  }
}

Custom Base URL

By default the server connects to https://api.prediction.click. To use a different instance (e.g., local development):

{
  "mcpServers": {
    "prediction-click": {
      "command": "npx",
      "args": ["-y", "prediction-click-mcp-server"],
      "env": {
        "PREDICTION_CLICK_URL": "http://localhost:3000"
      }
    }
  }
}

Tools

scan_opportunities

Scan all 24 markets (6 assets x 4 timeframes) and return the most profitable trading opportunities ranked by edge. This is the best starting point for finding trades.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | min_edge | number | No (default: 0) | Minimum edge in percentage points to include (e.g., 3 for 3%+) |

Example response:

{
  "scanned_at": "2026-03-20T12:00:00.000Z",
  "total_opportunities": 5,
  "opportunities": [
    { "asset": "BTC", "timeframe": "5m", "side": "UP", "edge": 4.21, "fair_value": 53.21, "market_price": 49.00, "bid_depth": 1800, "ask_depth": 48200 },
    { "asset": "ETH", "timeframe": "1h", "side": "DOWN", "edge": 2.85, "fair_value": 51.85, "market_price": 49.00, "bid_depth": 6900, "ask_depth": 117700 }
  ]
}

get_markets

Get a full grid of all market data — fair values, market prices, and orderbook depth (bid/ask in $) for every asset and timeframe.

Parameters: none

get_fair_value

Get detailed fair value for a specific asset and timeframe, including model parameters, volatility, and Polymarket token IDs for trading.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | asset | BTC\|ETH\|SOL\|XRP\|DOGE\|BNB | Yes | Crypto asset | | timeframe | 5m\|15m\|1h\|4h | Yes | Market timeframe |

get_spot_price

Get the current real-time spot price from Binance, plus recent 1-minute candles (~8 hours of history).

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | asset | BTC\|ETH\|SOL\|XRP\|DOGE\|BNB | Yes | Crypto asset |

get_orderbook

Get the Polymarket CLOB orderbook (bids and asks) for a specific market.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | asset | BTC\|ETH\|SOL\|XRP\|DOGE\|BNB | Yes | Crypto asset | | timeframe | 5m\|15m\|1h\|4h | Yes | Market timeframe | | side | yes\|no | No (default: yes) | yes = UP token, no = DOWN token |

get_opportunity

Find profitable fills for a specific market by walking the orderbook. Returns fills where market price is below fair value (positive edge), with expected profit after Polymarket fees.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | asset | BTC\|ETH\|SOL\|XRP\|DOGE\|BNB | Yes | Crypto asset | | timeframe | 5m\|15m\|1h\|4h | Yes | Market timeframe |

get_history

Get historical fair value and market price data (1-second granularity). Useful for analyzing how fair value and market price have diverged over time.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | asset | BTC\|ETH\|SOL\|XRP\|DOGE\|BNB | Yes | Crypto asset | | timeframe | 5m\|15m\|1h\|4h | Yes | Market timeframe |

get_health

Check the health status of all prediction.click backend services.

Parameters: none

get_prediction_log

Get historical prediction results with accuracy statistics. Shows win/loss outcomes for past markets, broken down by asset and timeframe.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | asset | BTC\|ETH\|...\|all | No (default: all) | Filter by asset | | timeframe | 5m\|15m\|1h\|4h\|all | No (default: all) | Filter by timeframe | | limit | number | No (default: 50) | Max log entries to return (1-200) |

Example response:

{
  "summary": { "total_predictions": 142, "outcomes": { "up": 78, "down": 64 } },
  "breakdown_by_asset": { "BTC": { "total": 30, "up": 18, "down": 12 } },
  "breakdown_by_timeframe": { "1h": { "total": 40, "up": 22, "down": 18 } },
  "recent_logs": [...]
}

Concepts

What is prediction.click?

prediction.click computes fair values for Polymarket's short-term crypto Up/Down markets using a Student-t pricing model with EWMA volatility. The edge is the gap between the mathematically derived fair value and the current market price on Polymarket.

Assets & Timeframes

  • Assets: BTC, ETH, SOL, XRP, DOGE, BNB
  • Timeframes: 5m, 15m, 1h, 4h

Each combination (e.g., BTC/5m) is a separate Polymarket market with UP and DOWN tokens.

Edge

Edge = Fair Value - Market Price. A positive edge means the market is underpriced relative to the model, suggesting a buying opportunity.

Typical Agent Workflow

  1. Call scan_opportunities (with optional min_edge filter) to find the best edges across all markets
  2. For promising opportunities, call get_opportunity to see exact fills and expected profit
  3. Use get_orderbook to check liquidity before placing orders
  4. Use get_fair_value for real-time model details and token IDs needed for trading
  5. Use get_prediction_log to evaluate historical model accuracy by asset/timeframe

API Access & Pricing

This MCP server connects to api.prediction.click by default. An API key is required to use it.

| Tier | Rate Limit | Cost | Min Deposit | |------|-----------|------|-------------| | Basic | 10 req/s | $30 / 1M requests | $30 USDC | | Pro | 50 req/s | $20 / 1M requests | $100 USDC |

Get an API key:

  1. Connect wallet at prediction.click/api-keys — key auto-created (0 credits)
  2. Purchase credits via x402 (USDC payment on Base — gas fees are paid by the server, not the user)

Purchase credits (x402):

import { wrapFetchWithPayment } from "x402-fetch"

const paidFetch = wrapFetchWithPayment(fetch, walletClient)

// Buy 1M credits ($30 USDC on Base)
const res = await paidFetch(
  "https://api.prediction.click/api/credits/purchase?package=basic_1m&wallet=0xYOUR_WALLET&network=base",
  { method: "POST" }
)
const { key, tier, credits } = await res.json()

Supported network: Base (USDC)

Credit packages: | Package | Credits | Price (USDC) | $/1M | Tier | |---------|---------|-------------|------|------| | basic_1m | 1M | $30 | $30 | Basic | | basic_5m | 5M | $140 | $28 | Basic | | pro_10m | 10M | $200 | $20 | Pro | | pro_50m | 50M | $900 | $18 | Pro |

Use your API key:

curl https://api.prediction.click/api/markets \
  -H "Authorization: Bearer pk_YOUR_KEY"

Configure the MCP server with your API key:

{
  "mcpServers": {
    "prediction-click": {
      "command": "npx",
      "args": ["-y", "prediction-click-mcp-server"],
      "env": {
        "PREDICTION_CLICK_API_KEY": "pk_YOUR_KEY"
      }
    }
  }
}

License

MIT