@clarvivo/mcp
Clarvivo's MCP server lets coding agents install and verify Clarvivo analytics, read summarized traffic/revenue data, connect payment providers, and manage events, funnels, and alerts without leaving the agent.
Setup analytics: detects the app framework (Next.js, Vite, Astro, etc.), reuses or creates the matching Clarvivo project, and returns the exact file and code edit; SPA route changes are tracked automatically.
Installation help: get_install_snippet returns framework-specific snippets, and verify_installation proves live traffic arrived without reading raw analytics.
Data overviews: list projects, get compact traffic stats, and access summarized traffic sources, pages, audience, and revenue insights without putting raw daily rows into context.
Export: export_data writes CSV/JSON or a printable HTML report locally, returning only metadata.
Revenue: connect_revenue detects Stripe, Polar, Razorpay, Paddle, Lemon Squeezy, or Dodo, connects the webhook, and returns the attribution edit; verify_revenue checks proof-of-life and attribution coverage without exposing payment data.
Events and funnels: add_event proposes trackEvent calls with handler placement; create_funnel creates or reuses ordered funnels and flags unmatched steps.
Alerts: create_alert creates traffic/conversion alerts and avoids duplicates; list_funnels shows existing funnels and steps.
Safe by default: requires CLARVIVO_API_TOKEN, reports missing scopes and billing walls, and never exposes API tokens or payment signing secrets.
Supports Clarvivo analytics setup and installation verification for Astro sites.
Supports adding Clarvivo analytics to Create React App projects with the correct installation snippet.
Supports adding Clarvivo analytics to Docusaurus documentation sites.
Supports adding Clarvivo analytics to Gatsby websites.
Supports Clarvivo analytics for Next.js App Router and Pages Router projects.
Supports adding Clarvivo analytics to Nuxt applications.
Supports Clarvivo analytics in React apps, including React apps built with Vite or Create React App.
Supports Clarvivo analytics for React Router v7 applications.
Supports adding Clarvivo analytics to Remix applications.
Supports Clarvivo analytics in Svelte apps, including SvelteKit.
Supports Clarvivo analytics setup for Vite projects, including React, Vue, and Svelte apps.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@@clarvivo/mcp Set up Clarvivo analytics for my Next.js app and verify traffic."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@clarvivo/mcp
Install Clarvivo analytics without leaving your coding agent. The server detects the app framework, reuses or creates the right Clarvivo project, and returns the exact file and code edit. It can then verify real traffic, connect payment revenue, and configure events, funnels, and alerts.
The 60-second flow
Sign in to Clarvivo. New users create an API token right on the dashboard page after signing in; paying users create one in Settings → API tokens.
Add this MCP server to your coding client with
CLARVIVO_API_TOKENin its environment.Ask the agent: “Set up Clarvivo analytics for
example.com.”The agent detects the framework, calls
setup_analytics, makes the returned edit, and deploys through your normal workflow.Visit the deployed site, then ask the agent to verify the installation.
The tracker observes history.pushState, history.replaceState, and popstate, so client-side SPA route changes work automatically. Do not add router hooks.
Related MCP server: ai-google-analytics-mcp
Tools
Tool | Purpose |
| Detect the framework, reuse a matching-domain project or create one, and return the exact installation edit. |
| Get framework-specific instructions for an existing API key or project. |
| Prove the deployed snippet works from a proof-of-life event count, without reading analytics. |
| List accessible projects and their public tracking API keys. |
| Return a small traffic and top-line revenue summary for 1–90 days, capped to the top five pages and referrers. |
| Aggregate up to 90 days into channel shares, the top ten referrers, and the top ten UTM source rows. |
| Return the top ten pages with visitors, entries, exits, bounce rate, and average time. |
| Return recorded revenue split by marketing source (utm_source) and by payment provider. Revenue with no campaign context is grouped as Direct, meaning unattributed. |
| Return the Google searches bringing people to the site, with clicks, impressions, CTR, and average position. Spends Search Console quota. |
| Return the pages earning Google Search impressions and clicks, with CTR and average position. Spends Search Console quota. |
| Return the daily Search Console series plus window totals, read from stored snapshots so it costs no Search Console quota. |
| Summarise devices, browsers, operating systems, countries, visitor segments, screens, and languages. |
| Write CSV/JSON locally, or create a self-contained printable HTML report for PDF; return metadata only. |
| Detect Stripe, Polar, Razorpay, Paddle, Lemon Squeezy, or Dodo; connect its webhook; and return the attribution edit. |
| Summarise webhook proof-of-life and attribution coverage without dumping payment data. |
| Register an event and propose the |
| Create an ordered funnel or reuse one with the same name, then flag unmatched steps. |
| Create a traffic/conversion alert or reuse an alert of the same type. |
| List funnels and their ordered steps. |
setup_analytics supports Next.js App Router, Next.js Pages Router, Vite (React/Vue/Svelte), Create React App, Astro, SvelteKit, Nuxt, Remix / React Router v7, Gatsby, Docusaurus, and static HTML.
Revenue by source
get_revenue_sources is the tool that answers "which campaigns made money". It splits
recorded revenue two ways: by marketing source (utm_source) and, separately, by payment
provider — those are different questions and conflating them is the usual mistake.
Revenue whose payment carried no Clarvivo campaign context is grouped as Direct. That
means unattributed, not "the visitor typed the URL in". verify_revenue reports what share
of revenue is attributed at all; if that share is low, treat the split as a floor rather
than a verdict.
Search Console
get_search_queries and get_search_pages proxy Google's Search Analytics API, so each
call spends the project's Search Console quota; both cap what they return and report the
total they trimmed. get_search_trends reads Clarvivo's stored snapshots instead, costs
no quota, and is the one to reach for on repeated checks.
All three need a token carrying search:read, and the project must already have Search
Console connected in Clarvivo — the MCP reads the data, it does not run the Google
sign-in for you.
Read your data
Ask for a quick overview with get_stats, then use get_traffic_sources, get_pages, or get_audience when you need a focused breakdown. These tools aggregate the full reporting window inside the MCP server, cap every returned list, and never place raw daily analytics rows into the model context. Their default window is 30 days and accepts 1–90 days.
Analytics reads require the analytics:read token scope. If the account is still awaiting its first payment or its access has lapsed, the tools stop at the same billing wall as the dashboard and link to the billing page.
get_stats also reports revenue when the token carries revenue:read. Without that scope it still returns the full traffic summary and says why the revenue block is missing, rather than failing the whole call for an optional extra.
Grant every scope you intend to use when you create the token. A token's scopes are fixed at creation — they cannot be edited afterwards, only revoked and replaced — so a missing scope means minting a new token, updating CLARVIVO_API_TOKEN, and restarting the MCP client. The tools span projects:read, projects:write, analytics:read, revenue:read, revenue:write, funnels:read, funnels:write, events:write, alerts:write and search:read.
Export
export_data writes the result to disk instead of returning file contents. CSV and JSON use Clarvivo's paid export routes; pdf creates a slim, self-contained .html report with headline metrics, channels, top pages, and sources. Open that file in a browser and use Print → Save as PDF, matching the dashboard workflow.
The default filename is clarvivo-export-<project>-<date>.<ext> in the current working directory. A custom path must remain inside that directory and cannot contain ... Existing files are protected unless overwrite: true is passed. Data export remains plan-gated and uses the existing analytics:read scope.
Connect payments
Ask the agent: “Connect Clarvivo revenue for this project.”
connect_revenuedetects the payment SDK frompackage.json, connects the provider, and returns the webhook URL plus the exact events to enable.Copy the provider signing secret from its webhook settings into Clarvivo at Dashboard → Settings → Integrations. Do not paste the secret into the agent or tool call.
Apply the returned client-to-server attribution edit. It reads
clv_vidfrom browser local storage and puts it in the provider's supported metadata, custom data, or notes field. This is the step that makes revenue-by-channel work.Complete a test payment, wait for delivery, then ask: “Verify Clarvivo revenue.”
The checkout snippet adapts to a Next.js route handler, Express handler, or serverless function. If no supported SDK is found, the tool returns a server-only signed POST /api/ingest/:apiKey/revenue example using CLARVIVO_INGEST_SECRET; that secret must never enter browser code.
Track events & funnels
Ask: “Track successful signups in Clarvivo.”
add_eventregisters the event and proposes awindow.clarvivo.trackEvent(...)call for the success handler. The tool reports the edit; your coding agent applies it.Ask: “Create a Signup funnel with Landing, Pricing, and Success.”
create_funnelorders the steps, reuses an existing same-name funnel on retries, and points out steps that do not yet match a tracked page.Ask: “Alert me when conversion drops by 20%.”
create_alertreuses an existing alert of that type instead of creating duplicates.
The browser SDK global is window.clarvivo. It exposes trackEvent(name, properties), trackConversion(value, currency), and trackPurchase(...).
Configuration
Replace clv_live_REPLACE_ME below. Tokens are secrets; keep personal config files out of source control. The tracking API key returned by tools is intentionally public because it ships in page source.
For local development or self-hosting, add CLARVIVO_BASE_URL (for example http://127.0.0.1:5000) beside the token.
Claude Code
The official CLI accepts --env before the -- separator. This user-scoped command works from every project:
claude mcp add clarvivo --scope user \
--env CLARVIVO_API_TOKEN=clv_live_REPLACE_ME \
-- npx -y @clarvivo/mcpCheck it with claude mcp get clarvivo. See Claude Code MCP documentation.
Cursor
Create .cursor/mcp.json in a project, or ~/.cursor/mcp.json globally:
{
"mcpServers": {
"clarvivo": {
"command": "npx",
"args": ["-y", "@clarvivo/mcp"],
"env": {
"CLARVIVO_API_TOKEN": "clv_live_REPLACE_ME"
}
}
}
}One-click install with a placeholder token (review and replace it in Cursor before starting the server):
Cursor requires the single-server config to be JSON-stringified and base64-encoded in the config parameter. See Cursor MCP configuration and Cursor install links.
Codex CLI
Add this to ~/.codex/config.toml:
[mcp_servers.clarvivo]
command = "npx"
args = ["-y", "@clarvivo/mcp"]
[mcp_servers.clarvivo.env]
CLARVIVO_API_TOKEN = "clv_live_REPLACE_ME"The equivalent command is:
codex mcp add clarvivo \
--env CLARVIVO_API_TOKEN=clv_live_REPLACE_ME \
-- npx -y @clarvivo/mcpThis was checked against the installed codex mcp add --help and the official OpenAI Codex MCP documentation.
Windsurf
Open ~/.codeium/windsurf/mcp_config.json and add:
{
"mcpServers": {
"clarvivo": {
"command": "npx",
"args": ["-y", "@clarvivo/mcp"],
"env": {
"CLARVIVO_API_TOKEN": "clv_live_REPLACE_ME"
}
}
}
}Refresh the MCP list after saving. See Windsurf’s MCP documentation.
Cline
Open Cline’s MCP Servers settings, choose Configure MCP Servers, and add this entry to cline_mcp_settings.json (normally under ~/.cline/data/settings/):
{
"mcpServers": {
"clarvivo": {
"command": "npx",
"args": ["-y", "@clarvivo/mcp"],
"env": {
"CLARVIVO_API_TOKEN": "clv_live_REPLACE_ME"
},
"disabled": false
}
}
}See Cline configuration locations.
Visual Studio Code / GitHub Copilot
Create .vscode/mcp.json:
{
"servers": {
"clarvivo": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@clarvivo/mcp"],
"env": {
"CLARVIVO_API_TOKEN": "clv_live_REPLACE_ME"
}
}
}
}One-click install with a placeholder token:
VS Code’s URI uses URL-encoded JSON rather than Cursor’s base64 encoding. See the VS Code MCP developer guide and configuration reference.
Zed
Open your Zed settings file and merge:
{
"context_servers": {
"clarvivo": {
"command": "npx",
"args": ["-y", "@clarvivo/mcp"],
"env": {
"CLARVIVO_API_TOKEN": "clv_live_REPLACE_ME"
}
}
}
}See MCP in Zed.
Generic MCP client
For clients using the common mcpServers shape:
{
"mcpServers": {
"clarvivo": {
"command": "npx",
"args": ["-y", "@clarvivo/mcp"],
"env": {
"CLARVIVO_API_TOKEN": "clv_live_REPLACE_ME"
}
}
}
}Node.js 20 or newer is required.
Authentication and billing errors
Every tool checks for CLARVIVO_API_TOKEN before doing work. If it is missing, the tool returns the token URL and a copy-pasteable environment variable name. The bearer token is never included in tool output or logs.
Tools also report a missing token scope by name and link directly to the API-token settings page. Payment signing secrets are dashboard-only: connect_revenue has no secret input and sends only { provider, connected: true } to Clarvivo.
Clarvivo has no free tier. If project creation returns PROJECT_LIMIT_REACHED, HTTP 402, or HTTP 403, the tool stops immediately and links to billing. It does not retry or claim the project was created.
Development
cd mcp
npm install
npm run build
npm testSet CLARVIVO_BASE_URL=http://127.0.0.1:5000 when using a local Clarvivo server. Tests mock HTTP and never call production.
Publishing checklist
No submission happens automatically. Complete these after the package and public repository are ready:
npm: publish
clarvivo-mcppublicly, confirm thebinis executable, and test a cleannpx -y @clarvivo/mcpMCP initialize handshake. Use npm provenance/2FA and inspectnpm pack --dry-runfirst.Official MCP Registry: verify the
io.github.cracked-collective/clarvivonamespace, publish the matching npm version first, then runmcp-publisher login,mcp-publisher validate, andmcp-publisher publishagainst the includedserver.json. The registry stores metadata, not the package. Follow the official registry quickstart.Smithery: authenticate with the Smithery CLI and publish a local MCP bundle (
.mcpb) under the Clarvivo namespace, or publish a hosted URL if an HTTP transport is added later:smithery mcp publish <bundle.mcpb> -n clarvivo/clarvivo. Smithery’s current publisher accepts hosted URLs or MCP bundles; see Smithery CLI publishing.mcp.so: use the server submission form. It currently requires a public repository URL and name; the paid path is optional and advertises immediate publishing.
PulseMCP: use the site’s Submit flow and provide the public repository, npm install command, nineteen-tool inventory, auth variable, license, and maintainer contact. Re-check the form at submission time because PulseMCP does not publish a stable submission schema.
Glama: click Add Server in the Glama registry, submit the public GitHub repository, and add
glama.jsonif organization ownership/metadata verification requests it. Confirm Glama can inspect all nineteen tools.Cursor Marketplace: package the MCP config as an Agent Plugin or Cursor Plugin with a valid
plugin.json/.cursor-plugin/plugin.json, public Git repository, README, and optional committed logo; declare the token variable in the manifest schema, then submit the repository at cursor.com/marketplace/publish. Use the official submission checklist.awesome-mcp-servers: first ensure the Glama listing exists, then fork punkpeye/awesome-mcp-servers, add one alphabetized line in the appropriate category with repository link and concise description, and open a PR following its contribution guide.
Additional discovery: submit the same canonical metadata to
mcpservers.org,MCP Central, andmcp-marketplace.io; keep every listing pointed at the npm package and one canonical repository so versions and security notices do not drift.
For every listing, use the same name, description, repository, license, token variable, Node requirement, nineteen-tool inventory, and install snippets from this README.
Available Tools
11 toolsadd_eventRegister a tracked eventC
Register a Clarvivo event and propose the exact window.clarvivo.trackEvent call and handler placement. This tool does not edit files.
Inputs: name (required), type (required), projectId (required), url, +2 more.
connect_revenueConnect payment revenueAIdempotent
Detect a supported payment SDK (or use the named provider), connect its Clarvivo webhook, and return a three-step setup checklist with the exact attribution edit. Never accepts or transmits webhook secrets.
Inputs: projectId (required), provider.
create_alertCreate an analytics alertCIdempotent
Create a traffic or conversion alert, reusing an existing alert of the same type.
Inputs: type (required), projectId (required), threshold (required).
create_funnelCreate a conversion funnelAIdempotent
Create an ordered funnel, reusing a case-insensitive name match so retries never duplicate it, and flag steps without a known tracked page.
Inputs: name (required), steps (required), projectId (required).
get_install_snippetGet framework install instructionsARead-onlyIdempotent
Return the exact tracking snippet, target file, placement, and framework-specific code for an existing Clarvivo API key or project.
Inputs: framework (required), apiKey, projectId.
get_statsGet compact traffic statsARead-onlyIdempotent
Return a small pre-summarised traffic overview, active visitor count, and top five pages/referrers instead of raw daily analytics rows.
Inputs: projectId (required), days.
list_funnelsList conversion funnelsARead-onlyIdempotent
List the project's funnels and ordered steps.
Inputs: projectId (required).
list_projectsList Clarvivo projectsARead-onlyIdempotent
List accessible Clarvivo projects with their IDs, domains, and public tracking API keys.
Inputs: no named parameters.
setup_analyticsSet up Clarvivo analyticsAIdempotent
Detect this repository's framework, reuse or create the Clarvivo project for a domain, and return the exact file and code edit. Use this first when asked to add analytics.
Inputs: domain (required), name, framework.
verify_installationVerify analytics installationARead-onlyIdempotent
Check Clarvivo's proof-of-life receipt to confirm that traffic from the deployed site has arrived, without reading analytics or sending synthetic events.
Inputs: projectId (required).
verify_revenueVerify payment revenueARead-onlyIdempotent
Check payment webhook proof-of-life and attribution coverage without returning revenue amounts or customer data.
Inputs: projectId (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool targets a distinct responsibility: snippet retrieval, installation verification, project listing, stats, setup, revenue connection, revenue verification, event registration, funnel creation, alert creation, and funnel listing. The slight overlap between setup_analytics and get_install_snippet is differentiated by their detection vs retrieval purposes.
All tools follow a consistent verb_noun naming pattern using clear verbs (get, verify, list, setup, connect, add, create) and snake_case. There is no mixing of conventions or ambiguous verbs.
11 tools is well within the ideal range for a domain covering analytics setup, events, funnels, and alerts. Each tool provides a unique capability without redundancy or bloat.
The tool surface covers the full analytics lifecycle from installation and verification through stats, revenue, events, funnels, and alerts. Minor gaps exist in update/delete operations for configured items, but these are not critical for the primary use case.
Maintenance
Related MCP Connectors
Privacy-first product analytics. Your agent sets up tracking and answers questions about traffic.
Revenue-first analytics installed and verified by AI agents through Talivia
Analytics, tag manager, email inboxes and session replay an AI agent sets up itself. Open source.
Live SEO workflow tools for Claude Code, Codex, and AI agents.
Related MCP Servers
- AlicenseAqualityDmaintenancePrivacy friendly, cookieless web analytics built MCP-first. "Add analytics to my Next.js app" → an AI agent runs the setup_analytics_for_site tool, picks the right install snippet, edits your layout file, and verifies the script is loading. OAuth onboarding, no API keys to paste.2851 npm1MIT
- AlicenseBqualityDmaintenanceProvisions Google Analytics 4 for local AI/web projects by creating properties and web data streams, injecting gtag snippets, and saving configuration.14MIT

Taliviaofficial
AlicenseNot gradedqualityCmaintenanceRevenue-first website analytics that your AI agent can install, connect, and verify for you. Talivia shows founders which referrers, campaigns, pages, search keywords, and customer journeys turn visits into revenue. @talivia/agent connects Codex, Claude Code, ChatGPT, OpenClaw, Hermes, and other MCP clients to Talivia so an agent can finish the analytics setup inside your project43 npm26MIT- AlicenseAqualityCmaintenanceGives Claude read access to Google Analytics 4, Google Search Console, and Microsoft Clarity data, with connections stored once and reusable across projects.8MIT