Skip to content
lib/onboarding.ts
1import { LoopsClient } from "loops"
2
3const loops = new LoopsClient(process.env.LOOPS_API_KEY)
4
5// Sync the signed-up user as a contact
6await loops.updateContact({
7 email: user.email,
8 userId: user.id,
9 properties: { planName: "Team" },
10})
11
12// Start the onboarding workflow
13await loops.sendEvent({
14 userId: user.id,
15 eventName: "projectCreated",
16 eventProperties: { projectName: "Q3 launch" },
17})

Connect your agent

Add the Loops connector in Claude, or the MCP server in Claude Code.

Or in Claude Code
claude mcp add loops https://mcp.loops.so --scope user --transport http
In Claude Code, run /mcp to sign in.Setup guide

Install the Loops plugin in ChatGPT.

Click Install plugin, then sign in to Loops.Setup guide

Add the MCP server, then sign in when Codex asks.

codex mcp add loops --url https://mcp.loops.so
Needs Codex CLI 1.48.0 or later.Setup guide

Cursor connects through the Loops CLI and agent skills. This installs both.

curl -fsSL https://install.loops.so/wizard | sh
Then ask Cursor to set up Loops in your project.Setup guide

Add this URL as a remote MCP server, then sign in to Loops.

https://mcp.loops.so
Guides cover Amp, OpenCode and VS Code.Setup guide

Why build on the Loops API

One REST API behind every SDK, skill, and agent tool.

MarketingProductTransactional
Contacts and events

One API for every email

Marketing, product, and transactional email share the same contacts and events.

POST /api/v1/events/send200
{ "eventName": "plan.upgraded",
"userId": "usr_123" }

Events start workflows

Send an event from your backend and the matching workflow takes it from there. A contact update can stop it when the user activates.

openapi.jsonloops-api skillMCP server

Agent-ready

An OpenAPI spec and an API skill give coding agents everything they need.

JavaScriptGoNuxtPHPRuby

SDKs for your stack

Official SDKs for JavaScript, Go, Nuxt, PHP, and Ruby.