SimpleFunctions
The SimpleFunctions server is an AI-powered prediction market intelligence platform for Kalshi and Polymarket, with traditional financial data via Databento. Key capabilities:
Market Data & Research
get_world_state— Compact ~800-token snapshot of real-money probabilities across ~9,700 live markets (geopolitics, economics, tech, policy, crypto)get_world_delta— Only changes since a given timestamp (~30–50 tokens, efficient polling)get_markets/search_markets— Browse or full-text search 130K+ prediction market contractsget_changes— Top 24h price movers by absolute probability changequery_databento— Real-time/historical OHLCV, trades, and quotes for CME futures, equities, and crypto
Analysis & Edge Detection
get_context— Global market snapshot (edges, movers, highlights) or thesis-specific bundleget_edges— Current mispricings where the causal model disagrees with market priceget_trade_ideas— AI-generated trade ideas derived from active theses and live dataenrich_content— Cross-reference arbitrary text/URLs against live markets with optional LLM analysismonitor_the_situation— End-to-end pipeline: scrape URLs/web, LLM analysis, optional market cross-reference
Thesis Management (requires API key)
create_thesis— Build a causal thesis from natural language; platform schedules recurring evaluationfork_thesis— Clone a public thesis for customizationlist_theses— View your theses with status and last evaluation timestampinject_signal— Append external observations (news, data) to a thesis's signal logtrigger_evaluation— Force immediate re-evaluation and confidence score update
Trading & Portfolio
Place direct orders, conditional intents with triggers, and automated market making with inventory management
View positions, balances, orders, fills, settlements, and performance history
All tools return JSON for seamless AI agent and LangChain integration, and the platform supports 24/7 autonomous monitoring with scheduled news/X scraping and closed-loop trading triggers.
Provides a Telegram bot interface for monitoring prediction market theses and executing trades directly through the messaging platform.
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
SimpleFunctions CLI (sf)
Reference and issue mirror for @spfunctions/cli, the supported SimpleFunctions command-line interface for prediction-market infrastructure.
The current CLI is distributed through npm. Install the package and treat the installed sf binary as the source of truth:
npm i -g @spfunctions/cli
sf login
sf status --json
sf world --json
sf describe --all --jsonsf is the primary local surface for SimpleFunctions. It queries live Kalshi + Polymarket state, inspects markets and orderbooks, exports structured JSON for coding agents, runs thesis and portfolio workflows, and keeps execution commands explicit and permission-gated.
What this repository is
Public reference page for the npm package.
Issue tracker for
@spfunctions/cli.Installation, support, and discovery pointer for the current
sfsurface.
Related MCP server: MCP Predictive Market
What this repository is not
It is not the current full operator-runtime source tree.
It is not the canonical command inventory.
It should not be used to infer current command counts, market counts, or execution behavior.
Use sf describe --all --json for the installed command manifest. Use https://simplefunctions.dev/api/internal/statistics for current public surface counts.
First useful workflow
sf status --json
sf world --json
sf discover --quality --json
sf inspect <ticker> --jsonIf a command is unavailable in your installed version, run:
npm i -g @spfunctions/cli@latest
sf describe --all --jsonProduct surface order
CLI: primary local control plane for humans, shell scripts, cron, Claude Code, Codex, and other coding agents.
HTTP/Data API: network surface for services, dashboards, notebooks, and remote workers.
SDKs and agent runtime: planned wrappers over stable CLI/API object contracts.
MCP: compatibility adapter for MCP-only hosts, not the canonical product center.
Links
CLI product page: https://simplefunctions.dev/cli
npm package: https://www.npmjs.com/package/@spfunctions/cli
llms.txt: https://simplefunctions.dev/llms.txt
Public package catalog: https://simplefunctions.dev/opensource
License
The public mirror is MIT-licensed. The supported npm distribution may include private SimpleFunctions runtime code.
Available Tools
16 toolscreate_thesisAInspect
Create a new thesis from a natural-language statement. The platform parses it, builds a causal tree, and schedules recurring evaluation. Side-effectful. Requires SF API key. Use fork_thesis instead if you want to start from an existing public thesis.
Inputs: apiKey (required), title (required), metadata.
enrich_contentAInspect
Cross-reference arbitrary text against live prediction markets: paste an article or note, get back the markets relevant to its claims plus an LLM digest. POSTs content to the server; no auth required, no persistence. Use for one-off article enrichment; use monitor_the_situation for scheduled URL scraping with webhook delivery.
Inputs: content (required), topics (required), model.
fork_thesisAInspect
Clone a public thesis (by id or slug) into the authenticated user's account, copying its causal tree as a starting point. Side-effectful. Requires SF API key. Use when you want to iterate on someone else's thesis; use create_thesis to start from scratch.
Inputs: apiKey (required), idOrSlug (required).
get_changesAInspect
What moved in the last 24 hours: incremental delta of probability changes across all tracked prediction markets, returned as compact markdown (~30-50 tokens). Read-only, no auth, no parameters. Thin wrapper over get_world_delta with since="24h"; use get_world_delta directly if you need a different lookback window or JSON output, or get_context for movers bundled with edges and highlights.
Inputs: no named parameters.
get_contextAInspect
START HERE — single entry point that returns either a global market snapshot or a thesis-specific context bundle. Global mode (no args): top mispriced edges, 24h price movers, highlights, traditional markets. Thesis mode (thesisId + apiKey): adds causal tree, signal log, and evaluation history for that thesis. Read-only, no rate limit. Use this first; only call get_edges / get_changes / get_world_state if you need that single slice in isolation.
Inputs: thesisId, apiKey.
get_edgesAInspect
Current mispricings (edges) detected across all public theses — contracts where the platform's causal model disagrees with market price. Read-only, no auth, no parameters. Returns only the edge list; use get_context for edges bundled with movers, highlights, and world state.
Inputs: no named parameters.
get_marketsAInspect
List live prediction market contracts with current YES/NO prices, 24h volume, and metadata. Read-only, no auth. Use for deep dives on a specific topic; use search_markets if you have a keyword instead of a topic, or get_context for a high-level overview.
Inputs: topic, limit.
get_trade_ideasAInspect
AI-generated trade ideas derived from active theses and current market data, each with rationale and target contract. Read-only, no auth, no parameters. Use when you want pre-packaged actionable suggestions; use get_edges for raw mispricings without commentary.
Inputs: no named parameters.
get_world_deltaAInspect
Incremental diff of the world model since a given timestamp — only the markets whose probability moved. ~30-50 tokens vs ~800 for the full state from get_world_state. Read-only, no auth. Use this for cheap polling loops; use get_world_state for an absolute snapshot.
Inputs: since (required), format.
get_world_stateAInspect
Calibrated world model: ~9,700 live prediction markets distilled into ~800 tokens of real-money probabilities across geopolitics, economics, tech, and policy. Read-only, no auth, no rate limit. Use when you need a compact snapshot of "what the market believes right now"; use get_changes for deltas only, or get_context for the broader bundle including edges and movers.
Inputs: focus, format.
inject_signalAInspect
Append an external observation (news headline, user note, data point) to a thesis. Stored in the thesis signal log and consumed on the next evaluation cycle — does NOT trigger evaluation by itself; call trigger_evaluation afterward if you need an immediate update. Writes state. Requires SF API key.
Inputs: thesisId (required), apiKey (required), content (required), type.
list_thesesAInspect
List every thesis owned by the authenticated user, with id, title, status, and last evaluation timestamp. Read-only. Requires SF API key. Use to discover thesisId values needed by get_context, trigger_evaluation, inject_signal, and fork_thesis.
Inputs: apiKey (required).
monitor_the_situationAInspect
End-to-end pipeline: scrape one or more URLs (or run a search/crawl/map/extract), optionally analyze with an LLM against a prompt + JSON schema, optionally cross-reference with prediction markets, and return the bundle. Side-effectful (calls Firecrawl + LLM, billed). Requires SF API key. Use for scheduled or one-shot URL ingestion; use enrich_content if you already have the text in hand.
Inputs: apiKey (required), source (required), analysis, enrich.
query_databentoAInspect
Fetch real-time and historical market data from Databento (CME futures, US equities, crypto). Read-only, billed per Databento usage. Use for OHLCV / trades / quotes on traditional instruments; use get_markets or search_markets for prediction-market contracts instead.
Inputs: symbols (required), dataset, schema, start, +2 more.
search_marketsAInspect
Full-text search prediction market contracts by keyword across question text and resolution criteria. Read-only, no auth. Use when you have a free-form term ("OPEC", "Powell", "TSMC"); use get_markets if you only want to filter by predefined topic.
Inputs: query (required).
trigger_evaluationAInspect
Force an immediate thesis evaluation: consumes pending signals, re-scans edges, and updates confidence scores. Side-effectful and LLM-billed (typically 5-30s, may be rate-limited per plan). Requires SF API key. Use after inject_signal when you need fresh output now; otherwise theses re-evaluate on their own schedule.
Inputs: thesisId (required), apiKey (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Tools are mostly distinct with clear descriptions, but the large number of 'get_*' tools (get_changes, get_context, get_edges, get_markets, get_trade_ideas, get_world_delta, get_world_state) could confuse an agent if not carefully read. However, each serves a unique purpose.
All tool names follow a consistent verb_noun snake_case pattern (e.g., create_thesis, enrich_content, get_markets). No mixing of conventions, making the naming predictable and clear.
16 tools is slightly above the ideal range but still reasonable for the server's scope (thesis management, market data, enrichment). Each tool has a distinct role, and the count does not feel excessive.
The tool surface covers core thesis creation, listing, and evaluation, but lacks update and delete operations for theses. Additionally, there is no direct trade execution tool, which may be intentional. Notable gaps in lifecycle management.
Maintenance
Related MCP Connectors
Live Kalshi and Polymarket data: EV edges, cross-venue arbitrage, markets, and whale trades.
Polymarket & Kalshi live prediction market odds aggregator and cross-venue arbitrage scanner MCP.
Live Kalshi + Polymarket prediction-market data and cross-venue arbitrage spreads, one schema.
Cross-venue prediction market odds (Polymarket, Kalshi, PredictIt, Manifold) with arbitrage signals
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables interaction with the Kalshi prediction market platform through their REST API. Supports trading and market operations with secure RSA key authentication for both production and demo environments.32MIT
- AlicenseAqualityDmaintenanceAggregates prediction market data from 5 major platforms (Manifold, Polymarket, Metaculus, PredictIt, Kalshi), enabling users to search markets, compare odds across platforms, detect arbitrage opportunities, and track predictions through natural language.85MIT
- FlicenseNot gradedqualityDmaintenanceProvides AI-powered tools for searching Polymarket prediction markets and calculating financial metrics like expected value and Kelly bet sizing. It enables users to perform arbitrage scanning, news-based sentiment analysis, and market research through natural language interfaces.-
- AlicenseAqualityDmaintenancePrediction market probability oracle for AI agents. 26 tools across 500+ live markets from Kalshi and Polymarket. Cross-source arbitrage detection, structured TPF signals, Kelly Criterion sizing, agent performance tracking, and webhook alerts.986 npm1MIT