Skip to main content
Glama

ClickTrail MCP

ClickTrail is the open-source attribution handoff layer that keeps observed acquisition context attached to conversion records inside the stack you own.

ClickTrail MCP makes that handoff inspectable and completable by coding agents. It supports a safe snapshot mode and a bounded Verify mode. Agents can inspect a supplied project snapshot, run clicktrail-verify against an explicit local repository and synthetic/staging URL, receive a canonical evidence report, and optionally ask TypeSafe to route and prioritize the next remediation.

Build and test

npm run typecheck
npm test
npm run build

Related MCP server: project-surface

Run

Use the published package when available:

npx -y @vizuh/clicktrail-mcp

Or run the checked-out server:

npm run build
node dist/index.mjs

Example Codex configuration:

codex mcp add clicktrail -- npx -y @vizuh/clicktrail-mcp

Grok Build can use the same local stdio server after a checked-out build:

grok mcp add --scope project clicktrail -- node /path/to/clicktrail-mcp/dist/index.mjs
grok inspect

This manual setup is intentional while @vizuh/clicktrail-mcp@0.3.0 is not published on npm. Do not copy an npx command into a distributable plugin until that exact package version is reachable from the public registry. xAI's Responses API remote MCP surface is separate and accepts streaming HTTP or SSE, not this stdio process.

The server reads newline-delimited JSON-RPC messages from stdin and writes responses to stdout. Snapshot tools do not read project files. The explicit verify_project tool invokes a local verifier against a caller-selected repository and URL; it does not submit forms, call ad platforms, transmit customer data, or claim live provider verification.

Workflow tools

  • inspect_project → detect_attribution_gaps → plan_installation

  • generate_nextjs_integration / generate_shopify_integration

  • simulate_ad_click → verify_capture → verify_form_attachment → verify_crm_attachment

  • verify_conversion_delivery → attribution_health

  • verify_project → advise_report (optional TypeSafe routing and prioritization)

The server also provides capture_click_id_schema, validate_attribution_pipeline, diagnose_missing_click_ids, calculate_click_id_coverage, reconcile_conversions, send_conversion, send_qualified_lead, send_sale, and check_conversion_status. Delivery tools build payloads only. check_conversion_status always returns unknown; verify_conversion_delivery classifies a caller-supplied receipt without authenticating it.

Choosing tools and interpreting results

Snapshot tools operate locally on supplied data, need no credentials, and perform no external writes or provider calls. verify_project is an explicit local subprocess boundary and may access the selected repository and URL. advise_report uses TypeSafe only when configured and sends redacted summaries. Discovery includes parameter descriptions and read-only annotations; initialization includes workflow guidance.

Question

Tool

Result boundary

What does this source snapshot contain?

inspect_project

Keyword signals, not executed tests

Which lifecycle stages need work?

detect_attribution_gaps

Pass only { "evidence": inspection.evidence }

Why were click IDs lost?

diagnose_missing_click_ids

Query, redirect, cookie, and browser observations

What fraction of sessions carried attribution?

calculate_click_id_coverage

Ratios over supplied sessions

How many declared stages pass?

attribution_health

Seven-stage summary, not traffic measurement

How should I verify an event without a receipt?

check_conversion_status

Always unknown, with manual next checks

Does this supplied receipt report acceptance?

verify_conversion_delivery

No receipt provenance or event-ID verification

Do CRM and destination records match?

reconcile_conversions

Event-ID matching and same-currency totals

Can I run the deterministic verifier?

verify_project

Canonical 0.3.0 report and evidence envelope

Which skill should handle the findings?

advise_report

Optional TypeSafe advice; factual statuses remain unchanged

check_conversion_status and simulate_ad_click expose output schemas and return both structuredContent and equivalent JSON text for older clients. For example:

{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"check_conversion_status","arguments":{"eventId":"evt_demo_1"}}}
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"simulate_ad_click","arguments":{"url":"https://example.test/?gclid=synthetic","consent":true,"accountId":"acct_demo","eventId":"evt_demo_1"}}}

The status call echoes the event ID with status: "unknown", a reason, and nextChecks. The simulation returns evidence: "synthetic-local-only"; reporting and verification remain unproven. Parsed IDs can appear in its result without consent, but no storage occurs. Empty form or CRM expectations check no keys and must not be treated as handoff proof.

Available Tools

20 tools
attribution_healthC

Score the seven attribution lifecycle stages without inventing runtime proof.

Inputs: stages, statuses.

calculate_click_id_coverageC

Calculate capture, persistence, and attachment coverage.

Inputs: sessions.

capture_click_id_schemaB

Return the canonical click ID allowlist and lifecycle schema.

Inputs: no named parameters.

check_conversion_statusC

Explain how to verify a conversion without querying a provider.

Inputs: eventId.

detect_attribution_gapsC

Find unproven or missing attribution lifecycle stages.

Inputs: files, evidence, framework, packageJson.

diagnose_missing_click_idsC

Diagnose common click ID loss boundaries.

Inputs: safari, crossDomain, landingQuery, cookieMissing, +1 more.

generate_nextjs_integrationC

Generate a consent-gated Next.js attribution integration.

Inputs: cookieName.

generate_shopify_integrationC

Generate a consent-gated Shopify Web Pixel and order webhook attribution integration.

Inputs: eventName.

inspect_projectC

Inspect a caller-provided project snapshot for attribution capabilities.

Inputs: files, tests, framework, packageJson.

plan_installationC

Create a framework-specific, evidence-aware installation plan.

Inputs: framework.

reconcile_conversionsC

Reconcile CRM conversions against destination conversion records.

Inputs: crm, destination.

send_conversionB

Build a destination-neutral conversion payload without network side effects.

Inputs: eventId (required), value, clickIds, currency, +1 more.

send_qualified_leadB

Build a qualified lead conversion payload without network side effects.

Inputs: eventId (required), value, clickIds, currency.

send_saleB

Build a sale conversion payload without network side effects.

Inputs: eventId (required), value, clickIds, currency.

simulate_ad_clickC

Simulate a synthetic click-to-account attribution journey locally.

Inputs: url (required), leadId, consent, eventId, +4 more.

validate_attribution_pipelineC

Validate declared attribution lifecycle stages and consent.

Inputs: eventId (required), stages, consent, clickIds.

verify_captureC

Verify that a click ID was captured intact after consent.

Inputs: captured (required), expectedClickId (required), key, consent.

verify_conversion_deliveryB

Classify provider delivery from an explicit receipt or return unknown.

Inputs: providerReceipt.

verify_crm_attachmentC

Verify that attribution reached a CRM/account record.

Inputs: record (required), expected (required).

verify_form_attachmentC

Verify that attribution was copied into form fields.

Inputs: fields (required), attribution (required), requiredKeys.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.7/5.0

    Scored across 20 tools

    Disambiguation2/5

    Multiple tools overlap in diagnostic and validation purposes: validate_attribution_pipeline, diagnose_missing_click_ids, calculate_click_id_coverage, detect_attribution_gaps, and attribution_health all assess attribution health from slightly different angles, making selection ambiguous. The three send_* tools also differ only by payload type, adding further confusion.

    Naming Consistency4/5

    Nearly all tools follow a consistent verb_noun snake_case pattern (capture_, generate_, send_, verify_, etc.), which aids predictability. The lone exception is 'attribution_health', which breaks the pattern with a noun_noun construction, causing a minor inconsistency.

    Tool Count3/5

    With 20 tools, the server sits in the heavy range (16-25). The domain is broad, but many diagnostic and sending tools could be merged into fewer general-purpose tools without losing capability, making the count feel somewhat excessive.

    Completeness4/5

    The tool set covers the core attribution lifecycle: schema, integration generation, capture verification, conversion payload construction, delivery verification, diagnosis, and reconciliation. Minor gaps like a generic integration generator or direct conversion mutation exist but are workable for most agent workflows.

    Maintenance

    ActivityStale
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to query a repository's verified semantic model, including capabilities, ownership, contracts, constraints, impact, health, and verification status, without re-deriving project facts. It exposes read-only tools for inspecting, reasoning about, and verifying the provenance-tracked surface.
      2
      Apache 2.0
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables coding agents to inspect recorded browser flows—including user actions, network activity, console output, storage, DOM events, and screen recordings—for debugging, bug reporting, and regression testing without reproducing the issue.
      -
    • A
      license
      B
      quality
      C
      maintenance
      Enables AI coding agents to perform evidence-based, read-only audits of supported software projects by exposing bounded project inventory and static-analysis findings for discovery, code review, integration tracing, security, and tests. Reports are returned as Markdown or JSON directly in the tool response, with no code executed or files written.
      8
      MIT