# Use it from an AI assistant

> Connect Claude, ChatGPT, Codex or Cursor once, then ask for videos in chat. No code, no API key.

Raylight runs an MCP server, the standard way AI assistants connect to other apps. Add it once in Claude, ChatGPT, Codex, Cursor or another client and sign in with your Raylight account. Setup steps for each are on [the connect page](https://www.raylight.app/mcp).

## Ask for a video

Then ask in plain words, like "make a 15 second feature recap for our dark mode release", and paste in release notes or links to screenshots. The assistant sends the brief, shows you the pitch, and only greenlights it when you tell it to. You can also send comments and get a new version, or answer from the Greenlight link in the Pitch ready email instead.

## Tools

The MCP server at `https://api.raylight.app/mcp` has two kinds of tools: editor tools that work inside an open Raylight project (read shots, apply edits, render frames), and the server-side tools below, which run productions and webhooks without an editor tab. The full list with limits and privacy is on [/mcp/docs](https://www.raylight.app/mcp/docs).

It uses OAuth, not API keys: the client signs you in once and gets a token for your account. See [Authentication](https://www.raylight.app/docs/authentication.md).

### Production tools

| Tool | Does |
| --- | --- |
| `create_production` | Push a brief: intent, context, media URLs, code files, format, brand, greenlight mode, externalId, origin. Returns the production; the pitch arrives in the background. |
| `get_production` | One production: stage, the pitch as markdown, its events, the queue status, and the share and edit links once wrapped. |
| `list_productions` | A workspace's productions newest first, filterable by stage or `externalId`. `["pitch_ready"]` finds pitches waiting for a greenlight. |
| `greenlight_production` | Greenlight. Charges the pitch's `estimatedCredits` once (60 credits per second of video). The tool tells the assistant to confirm with you first, and clients that honour tool annotations ask too; pass `pitchVersion` from `get_production`. |
| `comment_on_production` | Send comments and get the next pitch version, free. 5 rounds of comments per production (6 versions in all). |
| `decline_production` | Decline a pitch. Nothing charged. Terminal. |
| `cancel_production` | Cancel before production: free before the greenlight, refunded while still waiting for a render machine. |
| `code_to_layers` | Convert React with Tailwind into canvas layer ops for an open project: frames with auto layout, text, shapes, icons, image placeholders. Parsed, never run. |

### Webhook tools

| Tool | Does |
| --- | --- |
| `list_webhooks` | The workspace's endpoints: URL, events, enabled, last attempt and success, and why one was switched off. |
| `create_webhook` | Register an HTTPS URL. Shows the signing secret once. |
| `update_webhook` | Change the URL, description or events, or switch an endpoint on or off. |
| `delete_webhook` | Delete an endpoint and its delivery log. |
| `test_webhook` | Send a signed `ping`. |
| `list_webhook_deliveries` | The delivery log: status, attempts, the receiver's last status and response body. |
| `roll_webhook_secret` | Mint a new signing secret; the old one verifies for 24 hours. |
| `redeliver_webhook` | Send a past delivery again as a new event. |

## A prompt that runs the loop

Prompt:

```text
Using the Raylight MCP server (https://api.raylight.app/mcp): start a production for the feature I just built. Intent: a 10 second feature announcement for existing customers. Pass the main UI component files as code, set origin to this repo and branch, then poll get_production until the pitch is ready and show me the shots. Do not call greenlight_production until I say yes.
```

The agent reads your files, calls `create_production` with the components that render the feature, polls `get_production`, and shows you the shots. The greenlight is a separate call, and the tool tells the agent to confirm it with you first. Until then nothing is charged: the pitch is free.

## When to use MCP versus the API

- **MCP** when a person is in the loop in a chat or editor: the agent has your files and your attention, and OAuth means no key to manage.
- **REST, the SDK or the CLI** when nobody is watching: CI, deploy hooks, scheduled digests. Keys, idempotency and webhooks are built for that.
- Both share one Productions page and one set of webhooks, so a production started from MCP can be greenlit from an email and land in Slack.

## More

- Previous: [Overview](https://www.raylight.app/docs/index.md)
- Next: [Greenlight links](https://www.raylight.app/docs/greenlight-links.md)
- All docs: https://www.raylight.app/llms.txt
- Everything in one file: https://www.raylight.app/llms-full.txt
- OpenAPI: https://api.raylight.app/v1/openapi.json
