tradingmcppolymarket

Prediction Market Data MCP with Polymarket

Specialized MCPs for financial data + general MCP for news/sentiment. Layer Scavio search with financial MCPs for trading agents.

9 min

PredMCP combines Polymarket prediction data and Hyperliquid trading data into a single MCP server for AI agents. The pattern is powerful: specialized MCPs for financial data (prices, odds, positions) paired with a general search MCP for news sentiment and event coverage. Layering Scavio search for real-time news context with financial MCPs creates trading agents that combine market signals with information signals.

What PredMCP provides

PredMCP gives agents access to: Polymarket contract prices (what does the crowd think about event X?), Hyperliquid perpetual prices and funding rates (how is the market positioned on asset Y?), and order book depth. These are quantitative signals. What they lack is qualitative context: why did a prediction market move? What news drove the price change? Is there information the market has not priced in yet?

The missing layer: news and sentiment

A prediction market contract on "Will Company X launch Product Y by Q3 2026?" moves from 40% to 65% in an hour. PredMCP tells you the price moved. It does not tell you why. A search query reveals: a leaked internal memo, a supply chain report, or an executive interview that the market is reacting to. The agent that combines both signals can act faster and with more conviction than one using either alone.

Layered MCP architecture

Python
import requests, os, json

H = {"x-api-key": os.environ["SCAVIO_API_KEY"]}

def get_prediction_context(market_question: str) -> dict:
    """Combine prediction market data with news search for full context."""

    # Layer 1: Get prediction market price (via PredMCP)
    # This would come from the MCP call in practice
    market_data = mcp_call("predmcp", "get_market", {
        "question": market_question
    })

    # Layer 2: Search for recent news about the event
    news_resp = requests.post("https://api.scavio.dev/api/v1/search",
        headers=H,
        json={"platform": "google", "query": f"{market_question} news 2026"},
        timeout=10)
    news_results = news_resp.json().get("organic", [])[:5]

    # Layer 3: Check for contradicting/confirming signals
    sentiment_query = market_question.replace("Will", "").replace("?", "")
    sentiment_resp = requests.post("https://api.scavio.dev/api/v1/search",
        headers=H,
        json={"platform": "google", "query": f"{sentiment_query} analysis"},
        timeout=10)
    analysis_results = sentiment_resp.json().get("organic", [])[:3]

    return {
        "market_price": market_data.get("price"),
        "market_volume": market_data.get("volume"),
        "recent_news": [{
            "title": r.get("title"),
            "snippet": r.get("snippet"),
            "source": r.get("link")
        } for r in news_results],
        "analysis": [{
            "title": r.get("title"),
            "snippet": r.get("snippet")
        } for r in analysis_results]
    }

Trading agent decision flow

Python
def trading_agent_decision(markets_to_watch: list[str]) -> list[dict]:
    """Agent evaluates prediction markets using price + news signals."""
    opportunities = []

    for market in markets_to_watch:
        context = get_prediction_context(market)
        price = context.get("market_price", 0.5)

        # Simple signal: recent news sentiment vs market price
        news_titles = " ".join(
            n["title"].lower() for n in context.get("recent_news", [])
        )

        # Bullish news signals
        bullish_words = ["confirmed", "approved", "launched", "ahead of schedule"]
        bearish_words = ["delayed", "cancelled", "failed", "rejected"]

        bullish_count = sum(1 for w in bullish_words if w in news_titles)
        bearish_count = sum(1 for w in bearish_words if w in news_titles)

        # Potential opportunity: news is bullish but price is low
        if bullish_count > bearish_count and price < 0.6:
            opportunities.append({
                "market": market,
                "signal": "bullish_news_low_price",
                "current_price": price,
                "news_sentiment": "bullish",
                "confidence": "medium"
            })

        # Potential opportunity: news is bearish but price is high
        if bearish_count > bullish_count and price > 0.7:
            opportunities.append({
                "market": market,
                "signal": "bearish_news_high_price",
                "current_price": price,
                "news_sentiment": "bearish",
                "confidence": "medium"
            })

    return opportunities

MCP configuration for the full stack

JavaScript
// .mcp.json - combining financial and search MCPs
{
  "mcpServers": {
    "predmcp": {
      "command": "npx",
      "args": ["predmcp-server"],
      "env": {
        "POLYMARKET_API_KEY": "...",
        "HYPERLIQUID_API_KEY": "..."
      }
    },
    "search": {
      "command": "npx",
      "args": ["scavio-mcp-server"],
      "env": {
        "SCAVIO_API_KEY": "..."
      }
    }
  }
}

Information edge vs market edge

Prediction markets are efficient at pricing public information. The edge comes from: finding news faster than other participants (automated search monitoring), synthesizing across multiple sources (combining search results with market data), and identifying information asymmetries (news exists but market has not moved yet). The search API at $0.005/query lets you monitor dozens of markets continuously for less than $5/month, scanning for mismatches between what the news says and what the market prices.

Risk management

Never trade on search results alone. News can be: wrong, outdated, misinterpreted, or already priced in. The search layer is an input signal, not a trading signal. Use it to flag opportunities for human review. The agent identifies the mismatch, the human validates the thesis, then acts. This human-in-the-loop pattern prevents the agent from acting on misleading headlines or satire articles that surface in search results.