Cursor#
Connect ClipKit to Cursor's Agent so it can author and preview ClipKit videos while you code.
Two ways to use ClipKit#
Cursor is a coding agent, so it can work with ClipKit two ways — call ClipKit's hosted MCP tools, or write code against ClipKit's npm packages right in your repo. Both are first-class; pick by where you want the video to live.
| MCP tools (hosted) | npm packages (code) | |
|---|---|---|
| Wire-up | add the URL to mcp.json | npx @clipkit/cli init in your repo |
| The agent | calls tools (add_element, preview_still, render_video) | edits a video.ts Source, runs clipkit validate / render |
| Your video is | scratch state on clipkit.dev, shareable by link | a video.ts in your repo — version-controlled, reviewable |
| Installs | nothing | @clipkit/cli, @clipkit/protocol, @clipkit/runtime |
| Best for | quick authoring, preview stills inline | videos that live in your codebase, CI renders, reuse |
They're not exclusive — wire the MCP tools for fast iteration and keep finished videos as code. New to ClipKit? Start with the connector (Option A) — it's zero-install.
Option A — hosted MCP connector#
Add ClipKit to ~/.cursor/mcp.json (global) or .cursor/mcp.json (this project):
{ "mcpServers": { "clipkit": { "url": "https://www.clipkit.dev/mcp" } } }
Verify the connector#
In Settings → Tools & Integrations, the clipkit entry shows a green dot and lists its tools. Toggle it off/on (or relaunch Cursor) if the config didn't hot-reload. Then ask the Agent to run a ClipKit tool.
Option B — npm packages (code)#
No MCP server involved — Cursor writes ClipKit code directly in your project. Scaffold once:
npx @clipkit/cli init my-video cd my-video && npm install
That pins @clipkit/cli, @clipkit/protocol, and @clipkit/runtime, writes a starter video.ts (a plain, typed Source object), and drops an AGENTS.md so any AI agent working in the directory picks up the authoring guide. Then ask the Agent to:
- edit
video.ts— typed by@clipkit/protocol, so the schema drives its edits; npx clipkit validate video.ts— the same Zod check the runtime and the MCP server run;- render —
@clipkit/rendererlocally, orPOSTthe Source to the hosted API.
Add @clipkit/patterns for prebuilt scene and data-viz units, @clipkit/lint for soft checks. Full walkthrough: Quickstart.
Notes#
- Use
"url", not"serverUrl"— that's a different client's key and won't work in Cursor. - You don't need a
"transport"field — Cursor auto-detects Streamable HTTP from thehttps://URL. - A
CLIPKIT_API_KEY(Settings → API keys) is only needed for the paid render path in Option B (clipkit render/ the hosted render API), never by the connector — the hosted server is open, so don't add anAuthorizationheader.
New to the tools? The MCP server overview has the full tool list and how projects work.