These are the official instructions from ShortDrama Studio (shortdrama.studio) to connect an AI agent to it. ShortDrama Studio is an MCP server: once connected, the agent can create short dramas in the user's account and write their story bible, characters, episodes and scene scripts, check them, then generate the pictures, videos and music and render the episodes, with the user's permission.

Complete the steps for your agent yourself by running the commands or editing the config file directly. Do not ask the user to run them. The only thing the user does is create an access token on the website and give it to you.

1. Ask the user for their access token
2. Check the token
3. Add the ShortDrama Studio MCP server with the token
4. (Optional) Install the official skills locally

Server URL (Streamable HTTP): `https://mcp.shortdrama.studio/mcp`

Use the server name `shortdrama`. If a server with that name is already there, update it instead of adding a second one, and keep the user's other settings as they are.

---

## 1. Ask the user for their access token

Do this first, before changing any config. Stop and ask the user, in their language, with these steps:

1. Open https://shortdrama.studio and sign in (or create a free account).
2. Open **Settings → MCP & Agents**, then **Access tokens → New token**.
3. Give it a name (for example the agent's name), keep **Read** and **Write**, tick **Generate** if the agent may spend credits on pictures, video and music, pick an expiry and a daily credit cap, then **Create token**.
4. Copy the token (it starts with `sds_pat_` and is shown only once) and paste it here.

Wait for the token. Do not continue without it, and never invent one. If the user has a token already, use it.

A token looks like `sds_pat_` + 8 letters or digits + `_` + 32 letters or digits. Treat it as a password: do not repeat it back in full, do not write it into a file that is committed (such as a project's `.vscode/mcp.json` or `.cursor/mcp.json` in a git repository), and do not paste it into logs.

## 2. Check the token

```
curl -s -o /dev/null -w "%{http_code}" -X POST https://mcp.shortdrama.studio/mcp \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

`200` means the token works. `401` means it is wrong, revoked or expired: tell the user and ask for a new one (step 1). If `curl` is not available, skip this check.

---

## 3. Add the MCP server

Use the section for your agent. Replace `<TOKEN>` with the user's token.

### Claude Code

```
claude mcp add --transport http --scope user shortdrama https://mcp.shortdrama.studio/mcp --header "Authorization: Bearer <TOKEN>"
```

If `shortdrama` exists already, run `claude mcp remove --scope user shortdrama` first. Then tell the user to restart Claude Code (or start a new session). No sign-in is needed: the token is the sign-in.

### Codex: `~/.codex/config.toml`

```toml
[mcp_servers.shortdrama]
url = "https://mcp.shortdrama.studio/mcp"
http_headers = { Authorization = "Bearer <TOKEN>" }
```

On older Codex versions, also add `experimental_use_rmcp_client = true` at the top level.

### OpenCode: `~/.config/opencode/opencode.json` (or `opencode.jsonc`)

Add under `"mcp"`:

```json
"shortdrama": { "type": "remote", "url": "https://mcp.shortdrama.studio/mcp", "enabled": true, "oauth": false, "headers": { "Authorization": "Bearer <TOKEN>" } }
```

### Cursor: `~/.cursor/mcp.json` (the user-level file, not the project's)

Add under `"mcpServers"`:

```json
"shortdrama": { "url": "https://mcp.shortdrama.studio/mcp", "headers": { "Authorization": "Bearer <TOKEN>" } }
```

### VS Code (GitHub Copilot): `.vscode/mcp.json`

This file usually lives in the project, so do not write the token into it. Add an input that asks for it once and keeps it in VS Code's secret storage:

```json
{
  "inputs": [{ "type": "promptString", "id": "shortdrama-token", "description": "ShortDrama Studio access token", "password": true }],
  "servers": {
    "shortdrama": { "type": "http", "url": "https://mcp.shortdrama.studio/mcp", "headers": { "Authorization": "Bearer ${input:shortdrama-token}" } }
  }
}
```

Merge into the existing `inputs` and `servers` if the file has them. Tell the user to paste the token when VS Code asks.

### Windsurf: `~/.codeium/windsurf/mcp_config.json`

Add under `"mcpServers"` (note: `serverUrl`, not `url`):

```json
"shortdrama": { "serverUrl": "https://mcp.shortdrama.studio/mcp", "headers": { "Authorization": "Bearer <TOKEN>" } }
```

### Gemini CLI: `~/.gemini/settings.json`

Add under `"mcpServers"`:

```json
"shortdrama": { "httpUrl": "https://mcp.shortdrama.studio/mcp", "headers": { "Authorization": "Bearer <TOKEN>" } }
```

### Scripts, bots and other agents (Hermes, CI)

Send the token with every request to the MCP server, or to the REST tools at `https://api.shortdrama.studio/v2/tools/<tool_name>`:

```
Authorization: Bearer <TOKEN>
```

Store it the way your agent stores secrets (an environment variable or secret store).

### Claude.ai, Claude Desktop and ChatGPT

These apps cannot send an access token: their connectors sign in with OAuth instead, so skip step 1. Tell the user to add a custom connector with the URL `https://mcp.shortdrama.studio/mcp` (in Settings → Connectors) and sign in when asked.

---

## 4. (Optional) Install the official skills locally

The official skills (workflow, vertical-drama storycraft, genres, visual prompting, character consistency, dialogue) are already served by the MCP server, as MCP skills (`skill://shortdrama/…`) and through the `list_skills` and `get_skill` tools. Ask the user whether they also want a local copy. If they do not, skip this section.

Download https://api.shortdrama.studio/v2/downloads/shortdrama-skills.zip and unzip it into your agent's skills folder, for example `~/.claude/skills` for Claude Code or `~/.codex/skills` for Codex. It holds one folder per skill.

---

## Good to know

- Connecting and writing stories never costs ShortDrama Studio credits: your tokens are your own. Credits are spent only on generation (pictures, video, music) and rendering, within the daily cap the user set on the token, and only if the token has the **Generate** permission. Call `estimate_cost` before generating and tell the user the price.
- Start a session with `get_drama_spec` (every valid option) and, for an existing drama, `get_drama_context`. Everything you make shows up live in the user's studio at https://shortdrama.studio/projects.
- Every change you make is kept in the drama's history with your name on it and can be undone.
- The token expires on the date the user picked. When the server starts answering `401`, ask the user for a new token and replace the old one in the config. The user can revoke it at any time in Settings → MCP & Agents.
- Agents that see too many tools can use `https://mcp.shortdrama.studio/mcp/writer` (story only) or `https://mcp.shortdrama.studio/mcp/producer` (story and production) instead, with the same token.

---

Once done, tell the user:

```
┌─ ShortDrama Studio is connected ─────────────────────┐
│  ✓ MCP server  shortdrama                            │
│  ✓ Token       sds_pat_<first 8>…  (checked)         │
│  ✓ Config      <path or command used>                │
│                                                      │
│  Restart your agent, then try:                       │
│  "Create a 10-episode CEO romance and cast it"       │
└──────────────────────────────────────────────────────┘
```

---

## Resources

- Setup guide: https://shortdrama.studio/mcp
- Tool reference (every tool with its permissions and input schema): https://api.shortdrama.studio/v2/schemas/tools.json
- Script format for import and export: https://shortdrama.studio/shortdrama-script-format
- Help: support@shortdrama.studio

These instructions are published at `https://shortdrama.studio/agent-setup/prompt.md` so you can re-verify them at any time.
