How to Connect Cursor to a Video Pipeline with MCP

Cursor is where a lot of people building on top of a video API already live. Over MCP it can also run the pipeline itself. This guide adds Treza's hosted MCP server to Cursor's mcp.json, walks through the tools it exposes, and shows prompts that turn the editor into a video production console.

Alex Daro
Alex Daro
How to Connect Cursor to a Video Pipeline with MCP

Cursor is an editor, not a video tool, and that is exactly why connecting it to a video pipeline is useful. If you are building a product that calls a video generation API, testing a webhook that fires when a render finishes, or writing the integration code for a client's channel, you are already in Cursor. The Model Context Protocol lets you also run the pipeline from there, instead of alt-tabbing to a dashboard every time you want to check a render.

This guide uses Treza's hosted MCP server, the same server Claude Code and claude.ai connect to. Cursor speaks the same Streamable HTTP MCP transport, so the setup is a config file, not a plugin install.

What the connection gives Cursor

Treza's MCP server lives at trezalabs.com/api/mcp. Once it is added, Cursor's agent gets five tools scoped to your account:

  • list_pipelines and get_pipeline, so it can find the right pipeline and read its structure
  • run_pipeline, which starts a render on Treza's workers and returns a run id immediately
  • list_runs and get_run, so it can poll progress, inspect per-node results, and return the finished video's URL

Five tools, not fifty. That keeps tool selection reliable when Cursor's agent is juggling your codebase context alongside the video pipeline.

The pipelines are whatever you built on the canvas: a captioned short, a clip factory, a full publish-to-YouTube automation. Cursor triggers the chain; the chain does the production.

Step 1: Have a pipeline worth driving

Build or pick a pipeline in Treza and confirm one manual run works before you wire an agent to it. A template is the fastest start, since the captioned short template already chains script, shots, narration, and captions. Whatever quality you lock into the pipeline is what every run Cursor triggers inherits, so fix it once on the canvas rather than in a prompt.

Step 2: Add the server to Cursor

Cursor's MCP servers live in an mcp.json file, either project-scoped at .cursor/mcp.json or global at ~/.cursor/mcp.json. Open Cursor Settings, go to Tools & MCP, and choose New MCP Server, which drops you straight into that file. Add Treza as a remote server:

{
  "mcpServers": {
    "treza": {
      "url": "https://trezalabs.com/api/mcp"
    }
  }
}

Save the file and go back to Tools & MCP to enable it. Because this is a remote HTTP server, Cursor will prompt you to sign in to Treza to authorize the connection rather than asking for a key up front, the same OAuth flow the server uses for claude.ai and Claude Code. No API key needs to touch your mcp.json or get committed to a repo. If you want a server available on a CI box or a headless agent instead, a scoped API key with pipelines:read and pipelines:run permissions works in an Authorization header in its place.

Project-scoped config is worth using if you are on a team: check .cursor/mcp.json into the repo so anyone who opens the project gets the same pipeline access after their own sign-in, without passing keys around.

Step 3: Ask for a video

Once the server shows as connected, prompts like these work as-is:

  • "List my video pipelines and tell me what each one does."
  • "Run the daily short pipeline with the topic 'bioluminescent deep sea creatures' and give me the output link when it finishes."
  • "Did last night's scheduled run succeed? If it failed, show me which node failed and why."
  • "Pull the last three runs of the clip factory and compare their durations and costs."

Because run_pipeline returns a run id immediately instead of blocking, a long render does not freeze the agent loop. Cursor polls get_run and reports back once the status flips, so you can keep editing code in the same session while a five-minute render finishes in the background.

Why this matters more inside an editor

Connecting a chat client to a video pipeline is convenient. Connecting an editor to one changes the workflow, for a specific reason: if you are building against Treza's own API, you can test the exact calls your code will make without leaving the file you are editing.

Say you are wiring a webhook handler that reacts to a finished run. You can ask Cursor to trigger a real pipeline run, watch it poll get_run the same way your handler will, and see the actual response shape your code needs to parse, all in the same window as the handler itself. That closes the loop between "what does the API return" and "does my code handle it" without a separate terminal, curl command, or dashboard tab.

It also means agent-built features stay accountable. Runs started from Cursor draw the same prepaid credits and appear in the same run history as everything else, so if an agent's test run costs money or fails, it shows up where you would already look for it.

Where this beats a one-shot integration

Wiring an agent directly to a raw video model API gets you a clip. Wiring it to a pipeline gets you production, and the difference shows up in three places:

  1. The prompt engineering lives in the pipeline, not the editor. Model choices, caption styles, and publishing settings are versioned on the canvas. Every run Cursor triggers inherits them, so output quality does not depend on how the agent happened to phrase a request.
  2. The output is finished. A pipeline run can end with narration mixed, captions burned in, and the video uploaded as a private draft for review. Cursor hands back a link to something shippable, not raw frames that need three more tools to become a video.
  3. Costs and history are accountable. Runs started from an editor session draw the same prepaid credits and show up in the same run history as everything else, so agent-triggered work stays auditable even when nobody watched it happen.

Set up the pipeline first

None of this works without a pipeline behind the connector. If you have not built one yet, start with an AI video pipeline template on the canvas, confirm a manual run produces the output you want, then point Cursor at it. The AI video generator template gallery is the fastest way to get from a blank canvas to a pipeline worth driving from an editor.

Frequently Asked Questions

Can Cursor generate videos by itself?

No. Cursor has no built-in video model. What it can do is drive one over MCP: with the Treza connector added, its agent lists your pipelines, starts runs, monitors progress, and returns the finished video's URL, while models like Veo 3.1, Sora 2 Pro, and Seedance 2.0 do the rendering inside the pipeline.

Where do I add the MCP server in Cursor?

In Cursor Settings, under Tools & MCP, choose New MCP Server. That opens mcp.json, either project-scoped at .cursor/mcp.json or global at ~/.cursor/mcp.json. Add Treza's server under mcpServers with the URL https://trezalabs.com/api/mcp, then enable it back in Tools & MCP.

Do I need an API key to connect?

No. The remote server authenticates with OAuth: Cursor prompts you to sign in on Treza's own page and approve the connection, and no key touches your mcp.json or a committed file. If you need a headless setup, such as a CI box, a scoped API key with pipelines:read and pipelines:run permissions works in an Authorization header instead.

What does a run started from Cursor cost?

The same as a run started from the dashboard or the API: each generation is charged at the model's rate from your prepaid balance, only successful generations are charged, and the run appears in the same history with per-node costs. A typical video generation settles around $1.06.

Can the whole team share one pipeline connection?

Check the project-scoped .cursor/mcp.json into your repository with the server URL but no credentials. Everyone who opens the project gets the same pipeline access after completing their own OAuth sign-in, so nobody has to pass around a shared key.