Streakfox
API

MCP Setup

Connect Streakfox MCP with a customer-scoped token.

Streakfox exposes an MCP server for agents that set up and operate retention programs.

Production endpoint:

https://mcp.streakfox.com/mcp

Authentication

MCP uses customer-scoped bearer tokens. Tokens are created from an authenticated dashboard session and are stored by Streakfox as hashes.

Create a token through the dashboard API:

curl -X POST https://app.streakfox.com/api/trpc/mcp.createToken \
  -H "Content-Type: application/json" \
  -b "YOUR_DASHBOARD_SESSION_COOKIE" \
  -d '{"json":{"name":"Local agent"}}'

The response includes the raw token once. Use it as the MCP bearer token:

Authorization: Bearer sfx_mcp_...

Do not use deployment tokens or internal ingest secrets for customer MCP setup.

Tools

ToolPurpose
list_projectsList projects available to the authenticated token.
create_projectCreate a project in the token's user or organization scope.
list_programsList programs for an authorized project.
create_programCreate a program/widget for an authorized project.
update_programUpdate program name, event key, cadence, target, timezone, or status.
create_or_rotate_webhook_secretCreate or rotate a program inbound webhook secret.
get_install_snippetsReturn widget, REST, webhook, and MCP setup snippets.
record_eventRecord a program event through MCP.
get_streak_stateRead current program state for a subject.
list_at_risk_usersFind subjects whose streak has not updated since a cutoff date.
create_milestoneCreate or update a milestone for a program event key.

Setup Flow

  1. Create an MCP token from the dashboard API.
  2. Configure your MCP client with https://mcp.streakfox.com/mcp and the bearer token.
  3. Call list_projects or create_project.
  4. Call create_program or update_program.
  5. Call create_or_rotate_webhook_secret if inbound webhooks will record events.
  6. Call get_install_snippets for widget, REST, webhook, and MCP examples.
  7. Call record_event, then get_streak_state to verify the event updated state.

Example Tool Arguments

Create a program:

{
  "projectId": "PROJECT_ID",
  "name": "Activation streak",
  "eventKey": "activation_complete",
  "mode": "continuous",
  "cadence": "daily",
  "target": 1,
  "status": "live"
}

Record an event:

{
  "projectId": "PROJECT_ID",
  "userHash": "agent-user-123",
  "event": "activation_complete",
  "externalService": "internal-agent",
  "integrationId": "support-resolution-agent",
  "meta": {
    "ticketId": "TCK-123"
  }
}

MCP events are stored with source: "mcp" so they appear separately in event-source analytics while updating the same program state.

On this page