SaaSFunnelsDocs
Developer Tools

SaaSFunnels MCP Server

Connect MCP-capable coding agents to safe SaaSFunnels setup context, diagnostics, readiness, and payload validation.

The SaaSFunnels MCP server lets a coding agent read setup requirements, validate payloads, and inspect signal-family readiness. For an interactive connection, use the hosted URL:

https://app.saasfunnels.ai/mcp

Choose the connection your client supports:

ConnectionWhat you needUse it when
Hosted Streamable HTTPClerk sign-in and a SaaSFunnels OrganizationInteractive workspace access from Codex and other supported clients.
Local stdioNode.js 22+, the saasfunnels CLI, and a developer:read key for live readsLocal or CI workflows that need the CLI.

Hosted MCP exposes read, explain, validate, simulate, plan, and prepare capabilities only. Local MCP is read-only by default and exposes narrowly bounded write tools only when you explicitly enable them.

Connect hosted MCP with Clerk

  1. In an MCP client that supports Streamable HTTP and OAuth, add a remote server named saasfunnels with the URL above. Enter the URL in the client's MCP server setting; opening it as a web page returns an authorization error by design.
  2. Start the connection and choose Sign in when the client offers it. Complete Clerk consent and select the Organization linked to your SaaSFunnels workspace. Request openid, profile, and user:org:read if the client asks for scopes.
  3. Confirm the client lists SaaSFunnels tools, then try a read such as get_workspace_readiness. No SaaSFunnels API key is needed for this path.

In Codex, open Plugins → MCPs → Connect to a custom MCP. Name the server saasfunnels, select Streamable HTTP, paste the URL above, and save. Complete the sign-in prompt. Leave the optional bearer token and header fields empty.

For example, in VS Code use MCP: Add Server and select an HTTP server, or add this user or workspace configuration:

{
  "servers": {
    "saasfunnels": {
      "type": "http",
      "url": "https://app.saasfunnels.ai/mcp"
    }
  }
}

For Cursor, add a remote server in its MCP settings or ~/.cursor/mcp.json:

{
  "mcpServers": {
    "saasfunnels": {
      "url": "https://app.saasfunnels.ai/mcp"
    }
  }
}

For Claude Code, add the HTTP server and use /mcp to start its sign-in flow:

claude mcp add --transport http saasfunnels https://app.saasfunnels.ai/mcp

SaaSFunnels admits supported OAuth clients individually. If another client reports invalid_client, contact support with its name and version so it can be reviewed. Do not paste an API key into a hosted connection.

Start local stdio MCP

Install the CLI with Node.js 22 or newer, create a developer read key, and load it as SAASFUNNELS_API_KEY in the client environment. Then start MCP over stdio:

npm install --global saasfunnels
saasfunnels mcp serve

The command waits for an MCP client on standard input; it does not open a dashboard or print a success page. Configure your client's local MCP server with this command, arguments, and environment. The mcpServers shape is used by clients such as Cursor; other clients may use a different top-level key:

{
  "mcpServers": {
    "saasfunnels": {
      "command": "saasfunnels",
      "args": ["mcp", "serve"],
      "env": {
        "SAASFUNNELS_API_KEY": "<DEVELOPER_READ_KEY>"
      }
    }
  }
}

Keep the secret in the client's secret store or environment facility rather than committing this example with a real value.

In Claude Code, the equivalent local registration is:

claude mcp add --transport stdio saasfunnels -- saasfunnels mcp serve

Load SAASFUNNELS_API_KEY in the environment that launches Claude Code, or use its supported secret facility.

After connecting, confirm the client lists validate_event_payload and get_workspace_readiness. Local validation works without a key; live workspace reads need SAASFUNNELS_API_KEY with developer:read. If the client cannot find saasfunnels, use the absolute path returned by command -v saasfunnels in its command setting.

Connection problems

SymptomCheck
Opening /mcp in a browser shows 401This is the expected OAuth challenge. Add the URL to an MCP client and sign in there.
Hosted sign-in reports invalid_clientContact support with the client name and version so its OAuth identity can be reviewed.
Sign-in succeeds but workspace tools are deniedSelect the Clerk Organization linked to the workspace and confirm current membership.
Local client reports command not foundInstall the CLI with Node.js 22+ and point the client at the saasfunnels executable.
Local validation works but workspace reads failSet a developer:read key as SAASFUNNELS_API_KEY; an ingest key cannot replace it.

Enable the setup smoke write

To enable the setup smoke event tool, load both SAASFUNNELS_API_KEY and SAASFUNNELS_INGEST_API_KEY in the client environment, then start the server with the flag:

saasfunnels mcp serve --enable-send-test-event

You can also set SAASFUNNELS_MCP_ENABLE_SEND_TEST_EVENT=true, but keep the tool disabled unless the agent is actively verifying setup.

For an explicitly authorized local Funnel-authoring session, load a key with both developer:read and funnels:author:

saasfunnels mcp serve --enable-funnel-writes

This mode may update a versioned draft and submit source-free installation evidence. It cannot publish a Funnel.

MCP resources

The server exposes bounded resources, including a parameterized handoff:

ResourceUse it for
saasfunnels://semantics/eventsSemantic event types, event kinds, sentiment fields, and signal-family unlock context.
saasfunnels://sources/direct-apiDirect API requirements and backend-only guidance.
saasfunnels://sources/posthogPostHog webhook requirements and sample payload shape.
saasfunnels://sources/segmentSegment payload requirements and sample payload shape.
saasfunnels://safety/data-exposureRedaction, secret handling, payload safety, and read-only policy.
saasfunnels://features/catalog-schemaFeature catalog manifest and local-only discovery boundary.
saasfunnels://funnels/entry-installationFunnel entry kinds, installation evidence, and draft-only authoring boundary.
saasfunnels://agent-handoff/direct-api/{target}Generated Direct API handoff for Markdown, Codex, Claude Code, or Cursor.

Docs search and llms.txt remain app surfaces for broader documentation. Use MCP resources when the agent needs the compact setup contract.

MCP tools

ToolAvailabilityLocal key
validate_event_payloadHosted and localNone
validate_feature_catalog_manifestHosted and localNone
generate_direct_api_handoffHosted and localNone
get_integration_healthHosted and local readdeveloper:read
get_workspace_readinessHosted and local signal-family readdeveloper:read
list_mapping_gapsHosted and local readdeveloper:read
list_recent_signalsHosted and local readdeveloper:read
get_signal_payload_previewHosted and local readdeveloper:read
inspect_funnel_entryHosted and local readdeveloper:read
propose_funnel_entry_installationHosted and local plandeveloper:read
get_account_strategyHosted readNot applicable; Clerk OAuth required
simulate_account_funnel_fitHosted read-only simulationNot applicable; Clerk OAuth required
apply_funnel_entryExplicit local stdio draft writefunnels:author and write enablement
submit_funnel_entry_evidenceExplicit local stdio evidence writefunnels:author and write enablement
send_test_eventExplicit local setup smoke writedirect:write or events:write and write enablement

Every hosted tool call requires Clerk OAuth and current workspace membership, including tools that need no key in local mode.

get_workspace_readiness retains its existing tool name for client compatibility. It reports Signal family status, not overall Setup, Funnel, or Workspace readiness. Its evaluated_at, latest event and Signal timestamps, and sample limits describe the evidence behind each result. active means a stored active Signal was found; it does not claim recent customer activity. Authenticated live reads return an unavailable error if their source fails instead of returning sample data. Mapping-gap counts describe sampled rows and flag incomplete coverage; Funnel-fit results cover at most eight published Funnels.

Hosted MCP does not expose any of the write rows. Local Funnel writes require --enable-funnel-writes, the current draft revision, idempotency, and existing audit controls; they can never publish. Tool results are compact and redacted rather than full data exports.

The two Account tools are hosted-only. get_account_strategy reads an existing reviewable brief and never starts a new analysis. simulate_account_funnel_fit evaluates at most eight current published Funnels against authoritative workspace facts, fails closed when those facts are unavailable, and never creates an enrollment, delivery, identity change, or runtime decision row.

Agent workflow examples

Ask an MCP-connected coding agent:

Use SaaSFunnels MCP to read the Direct API source requirements, inspect this codebase for durable backend events, and propose 3 to 6 account-scoped events. Do not put ingest keys in browser code.
Validate this candidate Direct API payload with SaaSFunnels MCP. If it fails, explain only the missing identity, unsafe fields, idempotency gap, and semantic mapping fix.
Check SaaSFunnels readiness and mapping gaps. Then tell me which source or event family I should fix first before routing signals.
Read this account's existing strategy and simulate its fit against current published Funnels. Explain the strongest evidence, suppression, uncertainty, and next owning action. Do not create CRM records or execute an outreach action.

Keep humans in the loop for writes. MCP can help agents find, validate, and diagnose setup, but SaaSFunnels is not a campaign execution engine or CRM task owner.