Prediction Market Agent Tools

Give your AI agent access to prediction market intelligence. One line to connect. Six tools available.

MCP Server

Works with Claude Code, Cursor, Cline, Roo Code — any MCP-compatible client.

# Claude Code
$ claude mcp add simplefunctions --url https://simplefunctions.dev/api/mcp/mcp

# Cursor / Cline / Roo Code — add to MCP config:
{
  "mcpServers": {
    "simplefunctions": {
      "url": "https://simplefunctions.dev/api/mcp/mcp"
    }
  }
}

That's it. Your agent now has six tools:

get_context

Thesis snapshot: causal tree, edges, orderbook, confidence

list_theses

All your theses with status and confidence

inject_signal

Push news, notes, or external events into a thesis

trigger_evaluation

Run deep analysis with heavy model

scan_markets

Search Kalshi markets — no API key needed

create_thesis

Build a new thesis with causal model

What your agent can do

Claude Code
> check recession markets for mispriced contracts

Tool: get_context f582bf76

Recession 2026 YES @ 35¢ — your thesis implies 72¢.
Edge: +37¢, spread 1¢, liquidity high.
You hold 3022 contracts at 32¢ (P&L: +$91).

Recommendation: Hold. Edge is still large. Consider
adding if price drops below 30¢.
Any MCP Client
> scan oil markets for opportunities

Tool: scan_markets query="oil"

Found 12 oil-related series on Kalshi:

  KXWTIMAX   WTI Crude Oil Max Price 2026    vol 8.2M
  KXWTIMIN   WTI Crude Oil Min Price 2026    vol 3.1M
  KXGAS      Gas Price Above Threshold       vol 1.4M
  ...

KXWTIMAX-26DEC31-T150 has the largest edge from your
thesis (thesis 75¢, market 38¢, edge +37).

Interactive CLI Agent

For human-in-the-loop oversight. Same tools, natural language interface.

sf agent
$ sf agent f582bf76

> compare my positions against current edges
⚡ get_context ✓ (0.3s)
⚡ get_positions ✓ (0.5s)

Position           Avg    Now    P&L     Edge   Action
KXWTIMAX-T135     57¢    60¢    +$23    +20    HOLD
KXRECSSNBER-26    32¢    35¢    +$91    +37    HOLD

Unpositioned opportunities:
WTI $150 YES      —      38¢    —       +37    CONSIDER
Gas $4.50 Mar     —      14¢    —       +41    CONSIDER
$ npm install -g @spfunctions/cli
$ sf agent

Sessions persist locally. Use /edges /tree /pos /eval for quick views.

REST API

If MCP doesn't fit your stack, use the REST API directly.

GET  /api/thesis/:id/context    — thesis snapshot
POST /api/thesis/:id/signal     — inject signal
POST /api/thesis/:id/evaluate   — trigger evaluation
POST /api/thesis/create         — create thesis
GET  /api/thesis                — list all theses

Full docs at simplefunctions.dev/docs

How it works under the hood

1

You feed the system a thesis

US-Iran war persists, oil stays elevated, recession by Q3

2

It builds a causal tree

Structured assumptions with probabilities. Each node is verifiable.

3

Every 15 minutes, the heartbeat engine runs

Scans news (Tavily), refreshes prices (Kalshi + Polymarket), enriches with orderbook depth, evaluates signals, updates confidence.

4

Your agent reads the latest state

Via get_context — one call returns everything: causal tree, edges, orderbook, confidence, last evaluation.

5

Your agent injects observations

Via inject_signal — news, notes, or external events. The backend evaluates them automatically.

The agent doesn't need to search for news or fetch prices. The backend does it. The agent only needs to read, write notes, and occasionally trigger deep evaluation.

Free during beta · charge by token after 15M