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 an MCP-capable coding agent 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 your coding agent or a plain Markdown workflow. | Humans preparing agent tasks. |
| CI Event Validation | Failing builds when event contracts drift. | Engineering teams. |
Start guided discovery
The package and executable are both named saasfunnels. Node.js 22 or newer is required. Run the guided command in your app repository:
npx --yes saasfunnels@latest setupThe command asks where your developer key is saved if needed, requests upload approval, and sends discovered features and plans to Setup for review. No separate CLI installation is required. See the CLI guide for resume and CI options.
The source and trusted-publishing workflow live in the SaaSFunnels CLI repository. There is no public prevenue package or compatibility executable. New installs use app.saasfunnels.ai; an explicit API-base override remains available for localhost, previews, and rollback checks.
Authentication model
Local commands do not need credentials:
saasfunnels initsaasfunnels agent installsaasfunnels events samplesaasfunnels events validate
Live diagnostics need SAASFUNNELS_API_KEY with developer:read. Direct API smoke sends need SAASFUNNELS_INGEST_API_KEY with direct:write or events:write.
Read API Keys and Scopes for a shell-safe entry command and client configuration guidance.
Interactive hosted MCP uses Clerk sign-in and Organization selection instead of a copied API key.
Additional event and diagnostic tools
- 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.