Cursor SDK Lets Notion Ship a Full Coding Agent in Weeks
Cursor's SDK lets any product embed full coding agents in weeks, with Notion as the first major proof of concept
Cursor can now be summoned directly inside Notion. Tag @Cursor in a doc, drop a spec into a thread, or assign it a task from a database, and a cloud agent picks it up end-to-end: planning, building, testing, and opening a PR your team can review. No context-switching to an IDE required.
What makes this more interesting than a typical integration announcement is how Notion built it. Notion stood up this integration in just a few weeks using the Cursor SDK, letting them embed coding agents into their product without having to build and maintain the entire agent themselves. That speed is a signal worth paying attention to.
The SDK is the real story
The Cursor SDK is a TypeScript package (npm install @cursor/sdk) that gives developers programmatic access to the same runtime, harness, and models that power the Cursor desktop app, CLI, and web interface. Think of it less as a library and more as a way to rent Cursor's entire agent engine for your own product.
The "harness" here is the key concept. The harness refers to the full set of supporting infrastructure that makes an agent effective beyond just the LLM call itself. In Cursor's case, that includes intelligent context management: codebase indexing, semantic search, and instant grep so agents retrieve the right code context before generating responses. You also get MCP servers (the open standard for wiring external tools into agents), skills, hooks, subagents, and cloud sandboxing, all out of the box.
The Cursor SDK is available for all users. You can create agents programmatically from your own code, scripts, CI/CD pipelines, or products, and agents get the full Cursor harness: codebase indexing, MCP servers, skills, hooks, and subagents.
How Notion wired it together
The first message creates the agent with the prompt, the selected repo, the model, any MCP servers, and automatic PR creation enabled. Each follow-up starts a new run, streamed over SSE so users watch the work happen live and resume from the last event if a connection drops. SSE (Server-Sent Events) is a lightweight protocol for streaming real-time updates from server to browser.
The architectural fit was unusually clean. As Notion engineer Victor Shen put it: "The best compliment I can give the SDK is that integrating Cursor was a thin adapter. The shape of agents and runs lined up with our model almost directly."
With support for remote MCPs, the Cursor SDK connects agents to Notion's custom server. That allows Cursor to read and write into the workspace it's working for in real time, with full state awareness instead of coding in a vacuum. This matters because an agent that can't read your Notion pages is just guessing at context.
What you can actually do with it
The Notion integration supports a few concrete workflows out of the box:
- Once connected, your agent can turn a page, task, or comment into working code and a pull request. You can create PRs from Notion, fix bugs from tasks, and run agents in the background while you move on to other work.
- You can shape Cursor for the task at hand: start from a template for common workflows like codebase Q&A, repo exploration, or bug triage, or write your own instructions from scratch.
- You also choose which MCP servers, skills, and subagents Cursor can reach, and set up custom triggers so that you can automatically kick off Cursor within your own product.
Setting it up takes minutes. You need a Cursor account (logging in with GitHub gives the easiest setup), and during setup you create a Cursor User API Key and paste it into Notion.
The SDK itself, for builders
If you want to embed Cursor agents into your own product the way Notion did, the SDK is a TypeScript-first API. Here's the minimal cloud agent pattern that creates an agent, sends a task, and waits for a PR:
import { Agent } from "@cursor/sdk";
const agent = await Agent.create({
apiKey: process.env.CURSOR_API_KEY!