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

# Connect a client

> Add the Tolstoy MCP servers to ChatGPT, Claude, Cursor, and other AI clients.

Every Tolstoy MCP connection uses OAuth 2.1 — there are no API keys. Add the server URL, then sign in with your Tolstoy account when prompted. The connection is bound to that workspace.

Use whichever server you need (you can add both):

* **Tolstoy Library** — `https://apilb.gotolstoy.com/mcp/v1/library/mcp`
* **Tolstoy Studio** — `https://apilb.gotolstoy.com/mcp/v1/mcp`

<Note>
  Per-client setup is also available inside the Tolstoy platform under **Settings → MCP**, with a copy-paste URL and step-by-step guide for each client.
</Note>

## ChatGPT

Tolstoy Library is a published **ChatGPT app** — the easiest path:

1. In ChatGPT, search apps for **Tolstoy Library**.
2. Click **Connect** and sign in with your Tolstoy account.
3. Ask ChatGPT about your library, widgets, products, or ads — it uses the tools, with interactive views inline.

To add the Studio server (or Library via URL), enable **Settings → Apps & Connectors → Advanced → Developer mode**, then add a connector with the endpoint above.

## Claude

1. Open **Settings → Connectors** in the Claude app or on claude.ai.
2. **Add custom connector**, name it `Tolstoy Library` (or `Tolstoy Studio`), and paste the endpoint.
3. Click **Connect**, sign in with your Tolstoy account.

## Cursor

Add a remote MCP server in Cursor's MCP settings with the endpoint above; the first tool call opens an OAuth tab to sign in.

## CLI clients

```bash theme={null}
# Claude Code
claude mcp add --transport http tolstoy-library https://apilb.gotolstoy.com/mcp/v1/library/mcp
claude mcp add --transport http tolstoy-studio  https://apilb.gotolstoy.com/mcp/v1/mcp

# Gemini CLI
gemini mcp add --transport http tolstoy-library https://apilb.gotolstoy.com/mcp/v1/library/mcp
```

### Codex CLI

Codex CLI's `codex mcp add` targets STDIO servers, so add the remote server to `~/.codex/config.toml` directly, then run the OAuth login:

```toml theme={null}
[mcp_servers.tolstoy-library]
url = "https://apilb.gotolstoy.com/mcp/v1/library/mcp"

[mcp_servers.tolstoy-studio]
url = "https://apilb.gotolstoy.com/mcp/v1/mcp"
```

```bash theme={null}
codex mcp login tolstoy-library
```

The first login opens a browser tab to sign in with your Tolstoy account; the token is cached for future sessions. Repeat `codex mcp login tolstoy-studio` if you added the Studio server too.

## Generic config

Most clients accept a JSON config like:

```json theme={null}
{
  "mcpServers": {
    "tolstoy-library": { "url": "https://apilb.gotolstoy.com/mcp/v1/library/mcp" },
    "tolstoy-studio": { "url": "https://apilb.gotolstoy.com/mcp/v1/mcp" }
  }
}
```

## Open source

The server definitions and an always-current tool list live in the [GoTolstoy/mcp](https://github.com/GoTolstoy/mcp) repo. Agent skills that teach clients the shoppable-video workflows are in [GoTolstoy/agent-skills](https://github.com/GoTolstoy/agent-skills).
