trail

finance MCP Server

Multi-touch attribution tracker — rebuilds the full lead journey

VerifiedInstall Ready
financefinance
6 views0 stars0 forksv0.1.0MIT

Why This Matters

Discovered via github-topic:mcp and last synced 3mo ago.

VerifiedInstall Ready
Source
github-topic:mcp
Stars
0
Last synced
3mo ago
Install
Instructions detected

Install

1. Install the package

npx -y --package=@silverbackbase/trail trail-mcp

2. Add to claude_desktop_config.json

{
  "mcpServers": {
    "trail": {
      "command": "npx",
      "args": [
        "trail"
      ]
    }
  }
}

Config file location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) / %APPDATA%\Claude\claude_desktop_config.json (Windows)

21
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (21)

DATABASE_URL

PostgreSQL connection string. If set, Trail uses Postgres. If absent, falls back to SQLite.

trail_get_journey

Full touchpoint journey for a lead

gclid

`google_ads`

TRAIL_TZ

Timezone for MCP output (default: `Europe/Paris`)

trail_get_top_paths

Most common multi-touch paths before conversion

Signal

Channel

fbclid

`facebook_ads`

Tool

Description

trail_get_channel_performance

Visitors / leads / conversion rate per channel

li_fat_id

`linkedin_ads`

ttclid

`tiktok_ads`

trail_list_accounts

List all accounts

trail_get_recent_sessions

Check that the tracker is receiving visits (no conversion required)

DB_PATH

SQLite file path (default: `./trail.db`). Only used when `DATABASE_URL` is not set.

trail_get_report

Attribution report by channel (first / last / linear)

trail_create_account

Create a client account, get the tracker snippet (header or GTM)

trail_list_leads

List leads with acquisition channel and conversion date

Source

Command

warn

info

direct

Click IDs (`gclid`, `fbclid`…) take priority over `utm_source`. UTM parameters and click IDs are persisted in `localStorage` with a 30-day TTL — if a visitor lands via a Google Ad, closes their browser, and returns directly a week later, the original channel is still attributed at conversion time. --- ## Installation ### Self-hosted (Node.js + SQLite) Requires Node.js 22+. ```bash DATABASE_URL=postgres://... npx -y --package=@silverbackbase/trail trail ``` Without `DATABASE_URL`, Trail starts on `http://localhost:3000` with a SQLite database created automatically at `./trail.db`. Add the tracker to your site: ```html <script src="http://localhost:3000/t.js" data-account-id="your-site" async defer></script> ``` ### Deploy to Railway [![Deploy on Railway](https://railway.com/button.svg)](https://railway.com) ```bash git clone https://github.com/silverbackb/Trail.git cd trail pnpm install pnpm --filter @trail/tracker run build pnpm --filter @silverbackbase/trail run build ``` **Required environment variables:**

TRAIL_URL

Public URL of your Trail instance (e.g. `https://trail.yoursite.com`)