> ## Documentation index
> Fetch the complete documentation index at: https://docs.predictefy.com/llms.txt
> Use it to discover every available page before exploring further.

# AI agents

> Connect Predictefy to a chat client or build an agent on the API.

**Using an LLM (Claude, Cursor, ChatGPT)?** Predictefy ships an MCP server exposing
**43 tools** — **33 read, intelligence, and platform tools** for normalized markets, order books,
history, cross-venue intelligence, and trader analytics across **16 served prediction-market venues**,
plus **10 guardrailed execution tools** for a non-custodial trade surface. One-line install:
`npx -y @predictefy/mcp` (get a free API key at
[portal.predictefy.com/keys](https://portal.predictefy.com/keys)). No install? Paste
`https://docs.predictefy.com/llms.txt` into your LLM — it is a self-contained integration brief.
Building an autonomous agent? Start with the [TypeScript SDK](/guides/sdk/) or
[Python SDK](/guides/python-sdk/) and the
[published agent skill](/.well-known/agent-skills/predictefy/skill.md). **Pick your route below.**

## Which piece is which

| Layer         | Asset                                                                    | Reach for it when                                                                  |
| ------------- | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------- |
| **Context**   | [`llms.txt`](/llms.txt)                                                  | You want a curated, self-contained integration brief to paste into an LLM.         |
| **Context**   | [`llms-full.txt`](/llms-full.txt)                                        | All 56 authored pages plus the generated API operation catalogue.                  |
| **Context**   | Per-page `.md` twins                                                     | Clean Markdown for any of the 56 authored pages; API pages have no twin.            |
| **Tools**     | [`@predictefy/mcp`](/guides/mcp/)                                        | A chat client or agent needs callable Predictefy tools at runtime.                 |
| **Tools**     | [REST API](/api/)                                                        | You need the normalized HTTP contract directly.                                    |
| **Tools**     | [`@predictefy/sdk`](/guides/sdk/)                                        | You are building a typed TypeScript agent.                                         |
| **Tools**     | [`predictefy` on PyPI](/guides/python-sdk/)                              | You are building a Python research, automation, or backtesting agent.              |
| **Tools**     | [`@predictefy/cli`](/guides/cli/)                                        | An agent or operator needs the same API from a shell.                              |
| **Discovery** | [`/.well-known/agent-card.json`](/.well-known/agent-card.json)           | An A2A platform needs Predictefy's identity and capability card.                   |
| **Discovery** | [`/.well-known/agent-skills/`](/.well-known/agent-skills/index.json)     | A platform needs the published skill URL and integrity digest.                     |
| **Discovery** | [`/.well-known/mcp/server-card.json`](/.well-known/mcp/server-card.json) | An MCP directory or platform builder needs the local stdio install contract.       |
| **Discovery** | The `llms.txt` convention                                                | A crawler checks the docs origin for an LLM-readable starting point.               |
| **Discovery** | [`sitemap-index.xml`](/sitemap-index.xml)                                | A crawler needs the complete index of docs URLs.                                   |

## Route A — use Predictefy from your chat client

Start read-first. Use the MCP server for research, market screening, cross-venue comparison, and
Trader Intelligence. Treat price gaps as **indicative price discrepancies** unless every live
executability gate passes.

Create a free key at [portal.predictefy.com/keys](https://portal.predictefy.com/keys), then choose
your client.

### Claude Code

```sh
claude mcp add predictefy -e PREDICTEFY_API_KEY=pk_live_your_key_here -- npx -y @predictefy/mcp
```

### Claude Desktop

Add this server to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "predictefy": {
      "command": "npx",
      "args": ["-y", "@predictefy/mcp"],
      "env": {
        "PREDICTEFY_API_KEY": "pk_live_your_key_here"
      }
    }
  }
}
```

### Cursor

Create `.cursor/mcp.json` in your project:

```json
{
  "mcpServers": {
    "predictefy": {
      "command": "npx",
      "args": ["-y", "@predictefy/mcp"],
      "env": {
        "PREDICTEFY_API_KEY": "pk_live_your_key_here"
      }
    }
  }
}
```

### VS Code

Create `.vscode/mcp.json` in your workspace:

```json
{
  "servers": {
    "predictefy": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@predictefy/mcp"],
      "env": {
        "PREDICTEFY_API_KEY": "pk_live_your_key_here"
      }
    }
  }
}
```

### Advanced: trading from chat

The **10 execution tools are registered by default**. Set `MCP_ENABLE_TRADE=false` to disable them
and run a server that cannot trade or return a collateral-moving transaction to sign.

No tool both builds and signs an order: build operations return unsigned artifacts, and signing
stays client-side. Server-side spend caps still apply — by default, **100 USD per order** and
**1,000 USD per API key over a rolling 24 hours**. Read [Trading & execution](/guides/trading/)
before acting; it records the current per-venue reality and guardrails.

## Route B — build an agent on the API

Choose context at the granularity your agent needs:

- Paste [`llms.txt`](/llms.txt) when the model needs a compact integration brief in-context.
- Load [`llms-full.txt`](/llms-full.txt) when you need all 56 authored pages plus the complete
  generated API operation catalogue.
- For one authored page, use `/index.md`, `/quickstart.md`, or replace the trailing slash in a
  `/guides/**/` or `/reference/**/` URL with `.md`.
- Do not append `.md` to `/api/` or `/api/operations/**/`: the generated API reference has no
  per-page markdown twins. Use [`llms-full.txt`](/llms-full.txt) for its operation catalogue.

### Install the published agent skill

The canonical skill is served at
`https://docs.predictefy.com/.well-known/agent-skills/predictefy/skill.md`.

For Claude Code, install it at `~/.claude/skills/predictefy/SKILL.md`:

```sh
mkdir -p ~/.claude/skills/predictefy
curl -fsSL https://docs.predictefy.com/.well-known/agent-skills/predictefy/skill.md \
  -o ~/.claude/skills/predictefy/SKILL.md
```

For runtimes using the [Agent Skills](https://agentskills.io) ecosystem, install the same file in
the shared user directory:

```sh
mkdir -p ~/.agents/skills/predictefy
curl -fsSL https://docs.predictefy.com/.well-known/agent-skills/predictefy/skill.md \
  -o ~/.agents/skills/predictefy/SKILL.md
```

Other runtimes can fetch the raw `.well-known` URL directly. The
[skill discovery index](/.well-known/agent-skills/index.json) publishes its URL and digest.

### Discovery cards for platform builders

- [`agent-card.json`](/.well-known/agent-card.json) advertises the A2A identity and capabilities.
- [`agent-skills/index.json`](/.well-known/agent-skills/index.json) lists the published skill and
  its integrity digest.
- [`mcp/server-card.json`](/.well-known/mcp/server-card.json) describes the local stdio MCP package
  and install contract; it does not advertise a hosted MCP endpoint.

### Build with the API, SDKs, or CLI

- Use the [REST API](/api/) when your agent owns its HTTP client.
- Use [`@predictefy/sdk`](/guides/sdk/) for TypeScript or
  [`predictefy` on PyPI](/guides/python-sdk/) for Python.
- Use [`@predictefy/cli`](/guides/cli/), **the terminal and AI-agent client**, when shell commands
  are the right integration boundary.

:::note[Beta releases]
These packages are published on beta lines. Pin exact versions rather than tracking `latest`.
:::

```sh
npm install @predictefy/sdk
pip install predictefy
npm install --global @predictefy/cli
```
