{
  "schema_version": "2024-11-05",
  "name": "revtrail",
  "display_name": "Revtrail",
  "description": "Revenue-first web and mobile analytics. Read which marketing channels produced paying customers, and manage conversion goals and funnels for one site.",
  "version": "1.0.0",
  "documentation": "https://userevtrail.com/resources/api",
  "openapi": "https://userevtrail.com/openapi.json",
  "contact": "support@revtrail.dev",
  "transport": {
    "type": "stdio",
    "command": "npx",
    "args": [
      "-y",
      "revtrail-mcp"
    ],
    "env": {
      "REVTRAIL_API_KEY": {
        "description": "Site-scoped Revtrail API key (rtk_…) from Dashboard → Sites → the key icon.",
        "required": true,
        "secret": true
      }
    }
  },
  "authentication": {
    "type": "apiKey",
    "scopes": [
      {
        "name": "analytics:read"
      },
      {
        "name": "goals:write"
      },
      {
        "name": "funnels:write"
      }
    ],
    "instructions": "Create a scoped key at https://userevtrail.com/dashboard, then set REVTRAIL_API_KEY in the MCP server environment."
  },
  "tools": [
    {
      "name": "revtrail_overview",
      "description": "Get the site's aggregate analytics: daily traffic and revenue, top sources and pages, goals, funnels, AI-bot visibility, and revenue per visitor.",
      "scope": "analytics:read",
      "operationId": "apiV1Overview"
    },
    {
      "name": "revtrail_create_goal",
      "description": "Register a conversion goal for a custom event name. Idempotent by event name.",
      "scope": "goals:write",
      "operationId": "apiV1CreateGoal"
    },
    {
      "name": "revtrail_create_funnel",
      "description": "Define an ordered conversion funnel of 2–5 distinct event names.",
      "scope": "funnels:write",
      "operationId": "apiV1CreateFunnel"
    }
  ]
}