# UnrealUGC MCP Server [![npm](https://img.shields.io/npm/v/@unrealugc/mcp)](https://www.npmjs.com/package/@unrealugc/mcp) [![CI](https://github.com/UnrealUGC/mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/UnrealUGC/mcp/actions/workflows/ci.yml) The official [Model Context Protocol](https://modelcontextprotocol.io) server for [UnrealUGC](https://unrealugc.com). It gives MCP-compatible assistants eleven typed tools for browsing creators and models, estimating credit cost, and generating AI UGC video ads. This repository contains only the public MCP adapter. The UnrealUGC application and backend remain private. ## Prerequisites - Node.js 20 or newer - An UnrealUGC API key from **Dashboard → Settings → API Keys** API keys start with `usk_live_` and should be stored in your MCP client's environment settings, never committed to a repository. ## Local stdio setup You do not need to install the package globally. MCP clients can launch it with `npx`. ### Claude Desktop Add this server to your Claude Desktop configuration: ```json { "mcpServers": { "unrealugc": { "command": "npx", "args": ["-y", "@unrealugc/mcp"], "env": { "UNREALUGC_API_KEY": "usk_live_..." } } } } ``` ### Claude Code ```bash claude mcp add unrealugc --env UNREALUGC_API_KEY=usk_live_... -- npx -y @unrealugc/mcp ``` ### Codex ```toml [mcp_servers.unrealugc] command = "npx" args = ["-y", "@unrealugc/mcp"] [mcp_servers.unrealugc.env] UNREALUGC_API_KEY = "usk_live_..." ``` Cursor, Windsurf, OpenClaw, and other stdio MCP clients use the same command and environment variable. ## Hosted Streamable HTTP setup Clients that support remote MCP can connect without running a local process: ```text URL: https://unrealugc.com/api/mcp Authorization: Bearer usk_live_... ``` See the [MCP setup guide](https://unrealugc.com/docs/mcp) for client-specific instructions. ## Tools | Tool | Purpose | | --- | --- | | `get_me` | Confirm the account, plan, and balance behind an API key | | `get_credits` | Read subscription and purchased credit pools | | `list_models` | Browse available video models and capabilities | | `list_creators` | Browse stock creators and custom avatars | | `list_voices` | Browse stock and custom voices | | `list_projects` | Find product and campaign projects | | `create_project` | Create a project for related generations | | `list_videos` | Browse generation history with filters and pagination | | `get_video` | Poll a generation and retrieve its output URL | | `estimate_video_cost` | Estimate credits from the script before spending | | `generate_video` | Start an asynchronous video generation | `generate_video` supports native or selected voices, silent reaction/b-roll clips, per-scene visual directions, and parallel or sequential multi-clip generation. ## Generation flow 1. Call `list_models` and `list_creators`. 2. Call `estimate_video_cost` with the proposed script. 3. Check `get_credits` if budget matters. 4. Call `generate_video`. 5. Poll `get_video` about every 15 seconds, or use UnrealUGC webhooks for completion events. ## Environment variables | Variable | Required | Default | | --- | --- | --- | | `UNREALUGC_API_KEY` | Yes | — | | `UNREALUGC_BASE_URL` | No | `https://unrealugc.com` | | `UNREALUGC_REQUEST_TIMEOUT_MS` | No | `30000` | `UNREALUGC_BASE_URL` is intended for UnrealUGC development and staging environments. ## Development ```bash npm ci npm run check npm pack --dry-run ``` See [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request. Security reports should follow [SECURITY.md](SECURITY.md). ## Links - [UnrealUGC MCP overview](https://unrealugc.com/mcp) - [MCP documentation](https://unrealugc.com/docs/mcp) - [REST API documentation](https://unrealugc.com/docs/api) - [UnrealUGC dashboard](https://unrealugc.com/dashboard) ## License MIT © Next MVP Solutions LLC