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

# SDK Overview

> The Joyride TypeScript SDK, CLI, and MCP server.

## Packages

| Package               | Distribution                 | Purpose                                                                                         |
| --------------------- | ---------------------------- | ----------------------------------------------------------------------------------------------- |
| `joyride-cli`         | `npm install -g joyride-cli` | Human-facing terminal workflow, wallet management, and bundled MCP server                       |
| `@joyride/mcp-server` | Bundled inside `joyride-cli` | stdio MCP server (18 tools) for Claude, Cursor, Codex, and other AI agents                      |
| `@joyride/core`       | Internal                     | Core exchange clients, decimal-string/symbol types, wallet auth (SIWS), and keystore encryption |

`joyride-cli` is the only package you install. It ships with the MCP server — invoked via `joyride mcp serve` — and bundles `@joyride/core` as its internal library.

## Current role of the SDK

The SDK sits on top of the exchange APIs and does two main jobs:

* normalizes wire-format responses into TypeScript-friendly shapes
* packages workflows for humans (CLI) and AI agents (MCP server)

## Access and installation

You can integrate directly against Joyride's hosted HTTP and WebSocket APIs without using SDK packages — wallet generation and SIWS authentication are documented in [Authentication](../exchange/authentication).

For the fastest path to trading, install the CLI:

```bash theme={null}
npm install -g joyride-cli
```

Verify:

```bash theme={null}
joyride --help
```

No API key required. The CLI is **login-only** — create your account in the web app at [joyride.exchange](https://joyride.exchange) (referral code + terms attestation), then sign in from the CLI with the same wallet. Invite/referral codes are redeemed in the web app, not the CLI.

## Authentication

The SDK uses Solana wallet-based authentication via SIWS (Sign-In with Solana). Wallets are encrypted locally with AES-256-GCM + scrypt and stored as keystore files in `~/.joyride/wallets/`.

The CLI's `joyride login` command performs the SIWS handshake once over the core trading WebSocket and stores the resulting JWT at `~/.joyride/session.json`. The MCP server reads that JWT — it does not sign SIWS challenges itself. The session lifetime is set by the server (the JWT's `exp` claim), not a fixed client default — run `joyride auth status` to see the exact expiry. Run `joyride logout` on shared or untrusted machines.

CLI wallet credential resolution priority:

1. `JOYRIDE_PRIVATE_KEY` env var (Base58 key, bypasses keystore)
2. Keystore + `JOYRIDE_KEYSTORE_PASSWORD` env var
3. Keystore + interactive passphrase prompt (TTY mode only)

The MCP server does not accept `JOYRIDE_PRIVATE_KEY` directly — it requires a valid session from `joyride login`. See the [MCP Server Guide](./mcp-server) for details.

## Guides

* [Agent Quickstart](../quickstart) — the fastest path for Claude Code, Cursor, Codex, and other local MCP clients
* [CLI Guide](./cli) — install, configure, and trade from the terminal
* [MCP Server Guide](./mcp-server) — connect AI agents to Joyride

## Strategy examples

Reference templates for building 0DTE options strategies with the SDK:

* [`0dte-long-atm-call.ts`](https://github.com/JoyrideExchange/joyride-monorepo/blob/staging/services/sdk-core/examples/0dte-long-atm-call.ts) — find today's ATM call, size by max-loss budget, check settlement timing, output CLI command to execute
