Skip to main content
Struct is designed to work natively with AI tools. Whether you’re building autonomous agents, using an AI coding assistant, or integrating prediction market data into an AI workflow — there’s a first-class path for you.

TypeScript SDK

The Struct SDK gives you a fully typed client for all Polymarket endpoints. Install it and start querying in seconds.
npm install @struct-to/sdk
import { Struct } from "@struct-to/sdk";

const struct = new Struct({ apiKey: "YOUR_API_KEY" });

const markets = await struct.polymarket.markets.list();

const event = await struct.polymarket.events.getBySlug("us-presidential-election");
Every method returns fully typed responses — no manual type definitions, no guessing field names.

SDK Reference

Full documentation, examples, and source code.

MCP Server

Struct exposes a Model Context Protocol (MCP) server that lets AI assistants like Claude, Cursor, and Windsurf query prediction market data directly. Add the Struct MCP server to your assistant’s configuration:
{
  "mcpServers": {
    "struct": {
      "command": "npx",
      "args": ["-y", "@struct-to/mcp"],
      "env": {
        "STRUCT_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}
Once connected, your AI assistant can search markets, pull real-time prices, look up trader positions, and more — all through natural language.

AI Skill

Install the Struct skill via skills.sh to give any Claude Code agent instant access to Struct’s Polymarket data.
npx skills.sh install struct
Once installed, the agent can query markets, events, trades, and positions without any additional setup.

Choose Your Path

ApproachBest For
REST APIFull control, any language, custom integrations
TypeScript SDKTypeScript/JavaScript projects with type safety
MCP ServerAI assistants and coding tools (Claude, Cursor, Windsurf)
AI SkillClaude Code agents via skills.sh
Last modified on February 16, 2026