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/mcpChoose the connection your client supports:
| Connection | What you need | Use it when |
|---|---|---|
| Hosted Streamable HTTP | Clerk sign-in and a SaaSFunnels Organization | Interactive workspace access from Codex and other supported clients. |
| Local stdio | Node.js 22+, the saasfunnels CLI, and a developer:read key for live reads | Local 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
- In an MCP client that supports Streamable HTTP and OAuth, add a remote server named
saasfunnelswith 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. - 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, anduser:org:readif the client asks for scopes. - 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/mcpSaaSFunnels 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 serveThe 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 serveLoad 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
| Symptom | Check |
|---|---|
Opening /mcp in a browser shows 401 | This is the expected OAuth challenge. Add the URL to an MCP client and sign in there. |
Hosted sign-in reports invalid_client | Contact support with the client name and version so its OAuth identity can be reviewed. |
| Sign-in succeeds but workspace tools are denied | Select the Clerk Organization linked to the workspace and confirm current membership. |
| Local client reports command not found | Install the CLI with Node.js 22+ and point the client at the saasfunnels executable. |
| Local validation works but workspace reads fail | Set 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-eventYou 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-writesThis 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:
| Resource | Use it for |
|---|---|
saasfunnels://semantics/events | Semantic event types, event kinds, sentiment fields, and signal-family unlock context. |
saasfunnels://sources/direct-api | Direct API requirements and backend-only guidance. |
saasfunnels://sources/posthog | PostHog webhook requirements and sample payload shape. |
saasfunnels://sources/segment | Segment payload requirements and sample payload shape. |
saasfunnels://safety/data-exposure | Redaction, secret handling, payload safety, and read-only policy. |
saasfunnels://features/catalog-schema | Feature catalog manifest and local-only discovery boundary. |
saasfunnels://funnels/entry-installation | Funnel 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
| Tool | Availability | Local key |
|---|---|---|
validate_event_payload | Hosted and local | None |
validate_feature_catalog_manifest | Hosted and local | None |
generate_direct_api_handoff | Hosted and local | None |
get_integration_health | Hosted and local read | developer:read |
get_workspace_readiness | Hosted and local signal-family read | developer:read |
list_mapping_gaps | Hosted and local read | developer:read |
list_recent_signals | Hosted and local read | developer:read |
get_signal_payload_preview | Hosted and local read | developer:read |
inspect_funnel_entry | Hosted and local read | developer:read |
propose_funnel_entry_installation | Hosted and local plan | developer:read |
get_account_strategy | Hosted read | Not applicable; Clerk OAuth required |
simulate_account_funnel_fit | Hosted read-only simulation | Not applicable; Clerk OAuth required |
apply_funnel_entry | Explicit local stdio draft write | funnels:author and write enablement |
submit_funnel_entry_evidence | Explicit local stdio evidence write | funnels:author and write enablement |
send_test_event | Explicit local setup smoke write | direct: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.