Skip to main content
Glama
README.md
# Prism Videos MCP — Railway

This repository is a Railway-ready MCP server written in Python.

## Architecture

Claude → MCP (Railway) → Prism Videos API

The server exposes a Streamable HTTP MCP endpoint at:

`/mcp`

and a health endpoint at:

`/health`

## Important Prism API limitation

The official Prism API documentation currently describes:

- character management
- template browsing/details
- polling generation status
- downloading completed generations

It does **not** currently document a public API endpoint for starting a brand-new video generation from a prompt.

Therefore this repository deliberately does NOT invent a fake generation endpoint.

`prism_generate_video` only activates when `PRISM_GENERATE_ENDPOINT` is explicitly configured.

Do not guess an endpoint such as `/generate` or `/video/generations`.

## Railway deployment

1. Push this repository to GitHub.
2. In Railway choose **New → GitHub Repository**.
3. Select this repository.
4. Railway will detect the root `Dockerfile`.
5. Add the following Railway Variables:

```text
PRISM_API_KEY=your_real_prism_api_key
PRISM_BASE_URL=https://prismvideos.com/api
PRISM_GENERATE_ENDPOINT=
PRISM_TIMEOUT_SECONDS=120
```

Do NOT commit the real Prism API key to GitHub.

Railway stores service variables separately from the repository.

6. Deploy.
7. Generate a public Railway domain.
8. Your MCP endpoint will be:

```text
https://YOUR-RAILWAY-DOMAIN/mcp
```

Health check:

```text
https://YOUR-RAILWAY-DOMAIN/health
```

## Local test

Python 3.10+ is required by the current MCP Python SDK.

Install:

```bash
pip install -r requirements.txt
```

Set environment variables from `.env`.

Run:

```bash
uvicorn server:app --host 127.0.0.1 --port 8000
```

MCP endpoint:

```text
http://127.0.0.1:8000/mcp
```

## What we still need for full Prism automation

To make Claude create six scenes automatically and return a finished ~30-second Short, we need an officially supported Prism generation API call.

Once Prism provides that endpoint/schema, the intended pipeline is:

1. Claude creates the six scene prompts.
2. MCP calls Prism for each scene.
3. MCP polls each generation.
4. MCP downloads each finished clip.
5. FFmpeg joins the six clips.
6. MCP returns the final video URL/file reference.

This repository already contains the MCP/HTTP/Railway foundation for that workflow.

## Security note

The initial deployment disables MCP DNS-rebinding protection so the automatically generated Railway hostname works immediately.

After the Railway domain is known, the `TransportSecuritySettings` in `server.py` should be changed to an exact hostname allowlist.

For a public production MCP server, add proper MCP authorization/OAuth before exposing it broadly.