> ## Documentation Index
> Fetch the complete documentation index at: https://docs.futuur.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude (MCP)

> Use Futuur prediction markets directly inside Claude via the Futuur MCP server.

export const McpConfigBuilder = () => {
  const [pub, setPub] = React.useState("");
  const [priv, setPriv] = React.useState("");
  const [copied, setCopied] = React.useState(false);
  const pk = pub.trim();
  const sk = priv.trim();
  const filled = pk !== "" && sk !== "";
  const quoteEnv = value => value && (/[\s"'\\=&|^<>]/).test(value) ? `"${value.replace(/\\/g, "\\\\").replace(/"/g, '\\"')}"` : value;
  const command = `claude mcp add futuur -- npx -y @futuur/futuur-mcp -e FUTUUR_PUBLIC_KEY=${quoteEnv(pk)} -e FUTUUR_PRIVATE_KEY=${quoteEnv(sk)}`;
  const copy = () => {
    navigator.clipboard.writeText(command).then(() => {
      setCopied(true);
      setTimeout(() => setCopied(false), 2000);
    });
  };
  const labelStyle = {
    display: "block",
    fontSize: "13px",
    fontWeight: 600,
    marginBottom: "6px",
    color: "#fafafa"
  };
  const inputStyle = {
    width: "100%",
    padding: "8px 12px",
    borderRadius: "8px",
    border: "1px solid #52525b",
    background: "#27272a",
    color: "#fafafa",
    fontFamily: "ui-monospace, monospace",
    fontSize: "13px",
    boxSizing: "border-box",
    outline: "none"
  };
  const hintStyle = {
    marginBottom: "12px",
    fontSize: "12px",
    color: "#a1a1aa",
    lineHeight: 1.5
  };
  const footerStyle = {
    marginTop: "12px",
    marginBottom: 0,
    fontSize: "12px",
    color: "#a1a1aa",
    lineHeight: 1.5
  };
  return <div className="not-prose" style={{
    position: "relative",
    margin: "24px 0",
    padding: "20px",
    borderRadius: "12px",
    border: "1px solid #3f3f46",
    background: "#18181b"
  }}>
      <style>{`
        #futuur-mcp-public-key::placeholder,
        #futuur-mcp-private-key::placeholder { color: #71717a; opacity: 1; }
      `}</style>
      <input type="text" name="email" autoComplete="email" tabIndex={-1} aria-hidden="true" style={{
    position: "absolute",
    width: 0,
    height: 0,
    opacity: 0,
    pointerEvents: "none"
  }} defaultValue="" />

      <div style={{
    display: "flex",
    alignItems: "center",
    gap: "14px",
    marginBottom: "20px",
    paddingBottom: "18px",
    borderBottom: "1px solid #3f3f46"
  }}>
        <svg width={36} height={36} viewBox="0 0 24 24" fill="#d97757" aria-hidden="true" style={{
    flexShrink: 0
  }}>
          <path d="m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z" />
        </svg>
        <div>
          <p style={{
    margin: 0,
    fontSize: "18px",
    fontWeight: 700,
    color: "#fafafa",
    lineHeight: 1.3
  }}>
            Claude
          </p>
          <p style={{
    margin: "4px 0 0",
    fontSize: "13px",
    color: "#a1a1aa",
    lineHeight: 1.4
  }}>
            Connect Futuur to Claude with <span style={{
    color: "#e4e4e7",
    fontFamily: "ui-monospace, monospace"
  }}>claude mcp add</span>
          </p>
        </div>
      </div>

      <div style={{
    display: "grid",
    gridTemplateColumns: "1fr 1fr",
    gap: "12px",
    marginBottom: "16px"
  }}>
        <div>
          <label htmlFor="futuur-mcp-public-key" style={labelStyle}>
            Public key
          </label>
          <input id="futuur-mcp-public-key" name="futuur-mcp-public-key" style={inputStyle} value={pub} onChange={e => setPub(e.target.value)} placeholder="paste your public key" spellCheck={false} autoComplete="off" autoCorrect="off" autoCapitalize="off" data-lpignore="true" data-1p-ignore="true" data-form-type="other" />
        </div>
        <div>
          <label htmlFor="futuur-mcp-private-key" style={labelStyle}>
            Private key
          </label>
          <input id="futuur-mcp-private-key" name="futuur-mcp-private-key" style={inputStyle} type="password" value={priv} onChange={e => setPriv(e.target.value)} placeholder="paste your private key" spellCheck={false} autoComplete="new-password" data-lpignore="true" data-1p-ignore="true" data-form-type="other" />
        </div>
      </div>

      {!filled && <p style={hintStyle}>
          Paste both keys above to generate your <code style={{
    color: "#e4e4e7"
  }}>claude mcp add</code> command. Empty keys stay empty until you fill them in.
        </p>}

      <div style={{
    position: "relative",
    overflow: "auto",
    borderRadius: "8px",
    background: "#09090b",
    padding: "16px 88px 16px 16px",
    opacity: filled ? 1 : 0.85
  }}>
        <pre style={{
    margin: 0,
    fontFamily: "ui-monospace, monospace",
    fontSize: "12px",
    lineHeight: 1.6,
    color: "#e4e4e7",
    whiteSpace: "pre-wrap",
    wordBreak: "break-all"
  }}>
          {command}
        </pre>
        <button type="button" style={{
    position: "absolute",
    top: "10px",
    right: "10px",
    padding: "6px 12px",
    fontSize: "12px",
    fontWeight: 600,
    borderRadius: "6px",
    border: "none",
    background: "#52525b",
    color: "#fafafa",
    cursor: "pointer"
  }} onClick={copy}>
          {copied ? "Copied" : "Copy command"}
        </button>
      </div>

      <p style={footerStyle}>
        Run in your terminal. Requires the{" "}
        <a href="https://docs.anthropic.com/en/docs/claude-code" style={{
    color: "#93c5fd",
    textDecoration: "underline"
  }}>
          Claude Code CLI
        </a>
        . Your keys never leave this page except in the command you copy.
      </p>
    </div>;
};

The [Model Context Protocol](https://modelcontextprotocol.io) (MCP) lets Claude call external tools on your behalf. The Futuur MCP server exposes tools covering market discovery, order placement, position management, and account info — all accessible through natural language.

**Get connected in under a minute:** paste your API keys, copy the `claude mcp add` command, run it in your terminal, then start a new Claude session.

**You can say things like:**

* *"Show me the top 10 markets by volume"*
* *"Simulate buying 200 OOM on the Yes outcome of event #1234"*
* *"What are my open positions and how are they performing?"*
* *"Sell 50 shares of my wager on the US election market"*

***

## Prerequisites

<Steps>
  <Step title="Node.js 18 or higher">
    Download from [nodejs.org](https://nodejs.org). Verify with `node --version`.
  </Step>

  <Step title="Claude Code CLI">
    Install the [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code). Verify with `claude --version`.
  </Step>

  <Step title="Futuur API keys">
    Log in to [futuur.com](https://futuur.com) → **Settings** → **API** → generate a key pair. You'll get a **public key** and a **private key**.
  </Step>
</Steps>

***

## Setup

Paste your Futuur API keys below, then copy and run the generated command in your terminal.

<McpConfigBuilder />

<Steps>
  <Step title="Paste your API keys">
    Use the fields above. Keys stay in your browser — they are only embedded in the command you copy.
  </Step>

  <Step title="Copy and run">
    Paste the `claude mcp add` command into your terminal and press Enter. Claude registers the Futuur MCP server with your keys.
  </Step>

  <Step title="Start Claude">
    Open a new Claude Code session (`claude`) — the Futuur tools are available immediately.
  </Step>
</Steps>

<Tip>
  To add the server for a single project only, run the command from that project directory. To add it globally, run it from any directory — Claude stores it in your user config.
</Tip>

<Accordion title="Manual JSON config (optional)">
  If you prefer to edit config files yourself, add this under `"mcpServers"` in `~/.claude.json` (global) or `.claude/settings.json` (project):

  ```json theme={null}
  {
    "futuur": {
      "command": "npx",
      "args": ["-y", "@futuur/futuur-mcp"],
      "env": {
        "FUTUUR_PUBLIC_KEY": "your_public_key_here",
        "FUTUUR_PRIVATE_KEY": "your_private_key_here"
      }
    }
  }
  ```
</Accordion>

***

## Available tools

<CardGroup cols={2}>
  <Card title="Market discovery" icon="search">
    `get_markets` · `get_market_details` · `get_price_history` · `get_categories`
  </Card>

  <Card title="Account" icon="user">
    `get_user_profile` · `get_user_ranking`
  </Card>

  <Card title="Trading" icon="arrow-left-right">
    `get_bet_simulation` · `place_bet` · `list_orders` · `cancel_order`
  </Card>

  <Card title="Positions" icon="chart-line">
    `get_user_bets` · `get_wager_details` · `get_partial_sell_amount` · `sell_bet`
  </Card>
</CardGroup>

| Tool                      | What it does                                                                                          |
| ------------------------- | ----------------------------------------------------------------------------------------------------- |
| `get_markets`             | List and search events with filters — category, tag, status, ordering                                 |
| `get_market_details`      | Full details for one event including all outcome markets                                              |
| `get_price_history`       | Historical prices for an event (`day` / `week` / `month` / `year` / `all_time`)                       |
| `get_categories`          | List available market categories                                                                      |
| `get_user_profile`        | Your account profile and wallet balances (see also [`GET /me/balances/`](/api-reference/me/balances)) |
| `get_user_ranking`        | Your leaderboard position                                                                             |
| `get_bet_simulation`      | Preview a buy order — cost and shares — without placing it                                            |
| `place_bet`               | Execute a limit order from a confirmed simulation                                                     |
| `list_orders`             | List your open, filled, or cancelled orders                                                           |
| `cancel_order`            | Cancel an open order by ID                                                                            |
| `get_user_bets`           | List your wager positions with filters                                                                |
| `get_wager_details`       | Full details for one wager                                                                            |
| `get_partial_sell_amount` | Simulate how much you'd receive for selling N shares                                                  |
| `sell_bet`                | Sell all or part of a wager position                                                                  |

***

## Example session

```
You:    Show me the top 5 prediction markets right now

Claude: [calls get_markets with ordering=-volume, limit=5]
        Here are the top markets by volume: ...

You:    I want to bet 100 OOM that Trump wins. Show me the details first.

Claude: [calls get_market_details for the event]
        The "Trump wins 2026" market is currently priced at 62% (0.62).
        Market ID: 8821, Event ID: 4401.

You:    Simulate buying 100 OOM on the Yes outcome

Claude: [calls get_bet_simulation with event_id=4401, market=8821, amount=100, currency=OOM]
        You'd receive approximately 161 shares at 0.62 each. Total cost: 100 OOM.
        Shall I place the order?

You:    Yes, go ahead

Claude: [calls place_bet with confirmed payload]
        Order placed. ID: 99231, status: filled.
```

<Tip>
  Use `currency_mode: "play_money"` to practice with OOM (play money) before trading real funds.
</Tip>

***

## Links

<CardGroup cols={2}>
  <Card title="GitHub repository" icon="github" href="https://github.com/futuur/Futuur-MCP">
    Source code, issues, and contributions
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    How HMAC-SHA512 signing works
  </Card>

  <Card title="Placing a bet" icon="arrow-right" href="/guides/placing-a-bet">
    Full step-by-step guide to placing orders via the REST API
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/events/list">
    Browse all available endpoints
  </Card>
</CardGroup>
