Developer Tools Overview
Use the SaaSFunnels CLI, MCP server, and agent handoffs to speed up setup without exposing secrets.
SaaSFunnels developer tools help teams instrument revenue events, check setup quality, and give coding agents safe workspace context.
Use this section when you want to:
- Validate event payloads before shipping them.
- Send one Direct API smoke event from a server-safe environment.
- Run setup diagnostics for sources, mappings, readiness, and recent signals.
- Connect Codex, Cursor, Claude Code, or another MCP-capable client to SaaSFunnels context.
- Generate coding-agent handoff files without copying real keys into prompts.
Tool choice
| Tool | Best for | Primary user |
|---|---|---|
| SaaSFunnels CLI | Local setup, payload validation, smoke events, diagnostics, readiness checks. | Humans and CI jobs. |
| SaaSFunnels MCP Server | Agent-readable workspace context, source requirements, mapping gaps, readiness, and safe previews. | MCP-capable coding agents. |
| Agent Handoffs | Durable setup instructions for Codex, Cursor, Claude Code, or Markdown. | Humans preparing agent tasks. |
| CI Event Validation | Failing builds when event contracts drift. | Engineering teams. |
Private release candidate
The package and executable are both named saasfunnels. Before the public prerelease, run the same implementation from this repository:
node --experimental-strip-types packages/prevenue/src/saasfunnels.ts helpAll examples in this section use saasfunnels. The internal source directory remains packages/prevenue until the coordinated repository rename, but there is no public prevenue package or compatibility executable.
To exercise the installable artifact before publishing, build and pack it locally:
npm --prefix packages/prevenue run build
npm pack ./packages/prevenueThe private test window uses an explicit localhost, preview, or current controlled host. The final release repeats the same checks on app.saasfunnels.ai; it does not fork the CLI or MCP registry.
Authentication model
Local commands do not need credentials:
saasfunnels initsaasfunnels agent installsaasfunnels events samplesaasfunnels events validate
Live diagnostics need a workspace API key with developer:read:
export SAASFUNNELS_API_KEY=<DEVELOPER_READ_KEY>Direct API smoke sends need an ingest key with direct:write or events:write:
export SAASFUNNELS_INGEST_API_KEY=<SAASFUNNELS_INGEST_KEY>Read API Keys and Scopes before sharing keys with a shell, CI job, or MCP client.
Interactive hosted MCP uses Clerk sign-in and Organization selection instead of a copied API key.
Setup flow
- Create or obtain the narrow key for a local or CI task, or use Clerk sign-in for hosted MCP.
- Run
saasfunnels initto store non-secret local defaults. - Generate an agent handoff if a coding agent will help instrument events.
- Validate candidate payloads locally.
- Send one Direct API smoke event from a server-safe environment.
- Run
saasfunnels doctorandsaasfunnels readiness. - Connect MCP only when an agent needs live SaaSFunnels setup context.
Safety boundaries
- Do not expose Direct API ingest keys in browser, mobile, desktop, or public client code.
- Do not send raw provider payloads, full URLs with query strings, tokens, auth headers, webhook URLs, invite links, support text, prompts, comments, stack traces, or raw logs.
- Do not forward every analytics event. Start with a small allowlist of high-signal account-scoped events.
- Do not let a request body choose the authenticated workspace. Live API reads and writes resolve it server-side from the key or selected Clerk Organization.
- Keep MCP write tools disabled unless you are actively running a setup smoke test.
SaaSFunnels developer tools are for setup, validation, diagnostics, and reviewable actions. They are not a campaign execution engine or CRM task owner.