SaaSFunnelsDocs
Developer Tools

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

ToolBest forPrimary user
SaaSFunnels CLILocal setup, payload validation, smoke events, diagnostics, readiness checks.Humans and CI jobs.
SaaSFunnels MCP ServerAgent-readable workspace context, source requirements, mapping gaps, readiness, and safe previews.MCP-capable coding agents.
Agent HandoffsDurable setup instructions for your coding agent or a plain Markdown workflow.Humans preparing agent tasks.
CI Event ValidationFailing 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 setup

The 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 init
  • saasfunnels agent install
  • saasfunnels events sample
  • saasfunnels 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

  1. Create or obtain the narrow key for a local or CI task, or use Clerk sign-in for hosted MCP.
  2. Run saasfunnels init to store non-secret local defaults.
  3. Generate an agent handoff if a coding agent will help instrument events.
  4. Validate candidate payloads locally.
  5. Send one Direct API smoke event from a server-safe environment.
  6. Run saasfunnels doctor and saasfunnels readiness.
  7. 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.