MCPcopy
hub / github.com/cursor/cookbook

github.com/cursor/cookbook @main sqlite

repository ↗ · DeepWiki ↗
596 symbols 1,421 edges 64 files 4 documented · 1%
README

Cursor Cookbook

This repo contains small examples for building with Cursor.

Cursor Hooks

Cursor Hooks let you run custom checks and workflows around agent events such as prompt submission, shell commands, file edits, and agent completion.

Hooks examples

A guided project hook setup for audit logging, sensitive prompt guards, and follow-up checks that keep Cursor skills aligned with code changes.

Cloud Agents

Self-hosted Cloud Agents lab

Run Cursor Cloud Agent workers on customer-managed AWS infrastructure with examples for EC2 + Docker, ECS/Fargate, and EKS + Helm.

Cursor SDK

The Cursor SDK is the TypeScript API for running Cursor's coding agent from your own apps, scripts, and workflows. It supports the same agent across local workspaces and cloud runtimes, streams agent events as runs progress, and lets you manage prompts, models, cancellation, artifacts, and conversation state from code.

To run the SDK examples, create a Cursor API key from the Cursor integrations dashboard, then set it as CURSOR_API_KEY.

Quickstart

A minimal Node.js example that creates a local agent, sends one prompt, and streams the response.

Prototyping tool

A web app for spinning up agents to scaffold new projects and iterate on ideas in a sandboxed cloud environment.

Kanban board

A kanban board for viewing Cursor Cloud Agents, grouping them by status or repository, previewing artifacts, and creating new cloud agents from a repository and prompt.

Coding agent CLI

A minimal command-line interface that lets you spawn Cursor agents from your terminal.

DAG task runner

Decompose a task into a JSON DAG, fan it out across local subagents, and stream live status into a Cursor Canvas that hot-reloads on every state change. Ships as both a runnable example and a copyable Cursor skill at .cursor/skills/dag-task-runner.

Learn more in the Cursor SDK TypeScript docs.

Extension points exported contracts — how you extend this code

CliArgs (Interface)
(no doc)
sdk/dag-task-runner/src/run_dag.ts
OpenTUIComponents (Interface)
(no doc)
sdk/coding-agent-cli/src/tui/opentui.d.ts
RunnerTaskRun (Interface)
(no doc)
sdk/dag-task-runner/src/run_dag.ts
ModelOverrideSources (Interface)
(no doc)
sdk/dag-task-runner/src/run_dag.ts
RunTaskOptions (Interface)
(no doc)
sdk/dag-task-runner/src/run_dag.ts
StreamWaitTimeoutMessageOptions (Interface)
(no doc)
sdk/dag-task-runner/src/run_dag.ts

Core symbols most depended-on inside this repo

cn
called by 49
sdk/app-builder/src/lib/utils.ts
firstString
called by 35
sdk/agent-kanban/src/lib/agents/server.ts
cn
called by 30
sdk/agent-kanban/src/lib/utils.ts
setConversationRuntime
called by 23
sdk/app-builder/src/components/app-builder.tsx
asRecord
called by 15
sdk/agent-kanban/src/lib/agents/server.ts
getMessageDisplayRole
called by 14
sdk/app-builder/src/components/app-builder.tsx
addEntry
called by 10
sdk/coding-agent-cli/src/tui/App.tsx
jsonError
called by 9
sdk/agent-kanban/src/lib/agents/http.ts

Shape

Function 533
Method 31
Class 22
Interface 10

Languages

TypeScript97%
Python3%

Modules by API surface

sdk/app-builder/src/components/app-builder.tsx160 symbols
sdk/app-builder/src/lib/app-builder/server.ts66 symbols
sdk/agent-kanban/src/lib/agents/server.ts55 symbols
sdk/coding-agent-cli/src/tui/App.tsx51 symbols
sdk/coding-agent-cli/src/agent.ts42 symbols
sdk/agent-kanban/src/components/agent-kanban-app.tsx36 symbols
sdk/dag-task-runner/src/run_dag.ts34 symbols
self-hosted-cloud-agent/ecs/terraform/metrics_publisher.py18 symbols
sdk/dag-task-runner/src/canvas_writer.ts11 symbols
sdk/coding-agent-cli/src/index.ts10 symbols
sdk/app-builder/src/components/ui/field.tsx10 symbols
sdk/app-builder/src/components/ui/select.tsx9 symbols

Dependencies from manifests, versioned

@base-ui/react1.4.1 · 1×
@cursor/sdk1.0.7 · 1×
@opentui/core0.2.0 · 1×
@opentui/react0.2.0 · 1×
@phosphor-icons/react2.1.10 · 1×
@types/node20 · 1×
@types/react19 · 1×
@types/react-dom19 · 1×
class-variance-authority0.7.1 · 1×
clsx2.1.1 · 1×
eslint9 · 1×

For agents

$ claude mcp add cookbook \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact