# Yavio

> The Open Source Analytics and Visibility Layer for ChatGPT Apps and MCP Apps.

- **Type:** MCP server
- **Install:** `agentstack add mcp-teamyavio-yavio`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [teamyavio](https://agentstack.voostack.com/s/teamyavio)
- **Installs:** 0
- **Category:** [Data & Analytics](https://agentstack.voostack.com/c/data-and-analytics)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [teamyavio](https://github.com/teamyavio)
- **Source:** https://github.com/teamyavio/yavio
- **Website:** https://yavio.ai

## Install

```sh
agentstack add mcp-teamyavio-yavio
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

Product Analytics for MCP Apps and ChatGPT Apps

  Open-source. Self-hosted. See how users actually use your AI tools.

  
  
  
  

---

> **Alpha (v0.1)** — Yavio is under active development. APIs, configuration, and database schemas may change between releases without notice or migration paths. Do not use in production without pinning exact versions.

## What is Yavio?

Yavio is the analytics and visibility layer for MCP servers and ChatGPT Apps. It captures how AI platforms (ChatGPT, Claude, Cursor, Windsurf, VS Code, etc.) invoke your tools and how users interact with your widgets — tool calls, conversions, funnels, errors, retention — with a 3-line SDK integration and a full analytics dashboard.

The entire platform is **open source (MIT)** and self-hosted via Docker Compose. Cloud hosting is coming soon.

  

## Quick Start (Self-Hosted)

### 1. Start the platform

```bash
git clone https://github.com/teamyavio/yavio.git
cd yavio

# Generate .env with random secrets
./scripts/setup-env.sh

# Start all services (migrations run automatically on first start)
docker compose up -d
```

The dashboard is at `http://localhost:3000`, ingestion API at `http://localhost:3001`.

### 2. Create a project

Open the dashboard, register an account, create a workspace and project, then copy your API key.

### 3. Install the SDK

```bash
npm install @yavio/sdk
```

### 4. Wrap your MCP server

```typescript
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { withYavio } from "@yavio/sdk";

const server = withYavio(
  new McpServer({ name: "my-app", version: "1.0.0" }),
  {
    apiKey: "yav_your_key_here",
    endpoint: "http://localhost:3001/v1/events",
  }
);
```

That's it. Every tool call is now tracked automatically.

### Using the CLI

You can also use the CLI for setup and platform management:

```bash
npm i -g @yavio/cli

# Interactive SDK setup — creates .yaviorc.json
yavio init

# Platform management
yavio up          # Start services
yavio down        # Stop services (data preserved)
yavio status      # Health check and stats
yavio logs        # Tail service logs
yavio doctor      # Diagnose setup issues
```

## Features

- **Zero-config MCP instrumentation** — `withYavio()` wraps your MCP server and captures every tool call, latency, errors, and platform automatically
- **User identification** — `.identify(userId, traits)` ties events to known users for retention, cohorts, and per-user analytics
- **Funnel tracking** — `.step()`, `.track()`, `.conversion()` for custom funnel stages and business events
- **Cross-layer correlation** — a single trace ID stitches server-side tool calls and browser widget interactions into one combined funnel
- **Widget SDK** — `useYavio()` React hook auto-captures 12 interaction types (clicks, scrolls, forms, rage clicks, performance, etc.)
- **Full analytics dashboard** — overview KPIs, per-tool breakdowns, funnels, user paths, error analysis, live event feed
- **Platform detection** — auto-detects which AI platform invoked your tool (ChatGPT, Claude, Cursor, Windsurf, VS Code)
- **PII stripping** — automatic removal of emails, credit cards, SSNs, and phone numbers at both SDK and server layers
- **Multi-tenant workspaces** — teams, roles (owner/admin/member/viewer), invitations, multiple projects per workspace
- **Self-hosted** — run the full stack on your own infrastructure with `docker compose up`

## Architecture

```
┌───────────────────────────┐       ┌────────────────────────────────────────┐
│  Your App                 │       │  Yavio Platform                        │
│                           │       │                                        │
│  ┌─────────────────────┐  │       │  ┌──────────────────────────────────┐  │
│  │ @yavio/sdk          │  │       │  │ Ingestion API (Fastify)          │  │
│  │ withYavio(server)   │  │ HTTP  │  │                                  │  │
│  │                     │──┼─┐     │  │ Auth · Rate limiting             │  │
│  │ Auto-captures:      │  │ │ events │ Validation · PII stripping       │  │
│  │  · tool calls       │  │ ├────►│  └───────────────┬──────────────────┘  │
│  │  · connections      │  │ │     │                  │ write               │
│  │  · resources        │  │ │     │                  ▼                     │
│  │  · prompts          │  │ │     │  ┌───────────────────┐  ┌──────────┐  │
│  └─────────────────────┘  │ │     │  │ ClickHouse        │  │ Postgres │  │
│                           │ │     │  │ Analytics store    │  │ App data │  │
│  ┌─────────────────────┐  │ │     │  └─────────┬─────────┘  └────┬─────┘  │
│  │ Widget (React)      │  │ │     │            │ read             │ read   │
│  │ useYavio()          │──┼─┘     │            ▼                 ▼        │
│  │                     │  │       │  ┌──────────────────────────────────┐  │
│  │ Auto-captures:      │  │       │  │ Dashboard (Next.js)              │  │
│  │  · clicks, scrolls  │  │       │  │ Analytics · Teams · Projects     │  │
│  │  · forms, nav       │  │       │  └──────────────────────────────────┘  │
│  │  · rage clicks      │  │       │                 ▲                      │
│  └─────────────────────┘  │       │                 │                      │
│                           │       └─────────────────┼──────────────────────┘
└───────────────────────────┘                         │
                                        Browser ──────┘
```

| Component | Description |
|-----------|-------------|
| **@yavio/sdk** | Server-side `withYavio()` proxy + React `useYavio()` hook |
| **@yavio/cli** | SDK setup (`yavio init`) and self-hosted management (`yavio up/down/status/logs/doctor`) |
| **Ingestion API** | High-throughput Fastify service — auth, validation, PII strip, ClickHouse write |
| **Dashboard** | Next.js web app with auth, workspaces, projects, and 7 analytics views |
| **ClickHouse** | Analytics event storage (ReplacingMergeTree, built-in dedup) |
| **PostgreSQL** | Application data (users, workspaces, projects, API keys) |

## SDK Usage

### User Identification

Tie events to known users for retention and per-user analytics:

```typescript
import { yavio } from "@yavio/sdk";

server.registerTool("checkout", { inputSchema: { items: z.array(z.string()) } }, async (params) => {
  yavio.identify("user_123", { plan: "pro", company: "Acme" });
  yavio.conversion("purchase", { value: 99 });

  return { content: [{ type: "text", text: "Order placed." }] };
});
```

### Funnel Steps

Track progression through multi-step flows:

```typescript
server.registerTool("search", { inputSchema: { query: z.string() } }, async ({ query }) => {
  yavio.step("search_initiated", { queryLength: query.length });
  const results = await performSearch(query);
  yavio.step("results_found", { count: results.length });

  return { content: [{ type: "text", text: `Found ${results.length} results` }] };
});
```

### Custom Events and Conversions

```typescript
yavio.track("feature_used", { feature: "export", format: "pdf" });
yavio.conversion("subscription_upgrade", { value: 99, currency: "USD" });
```

### Widget SDK (React)

Track user interactions in ChatGPT App widgets:

```tsx
import { useYavio } from "@yavio/sdk/react";

function BookingWidget() {
  const yavio = useYavio();

  const handleBook = (booking) => {
    yavio.step("room_selected", { roomType: booking.type });
    yavio.conversion("booking_completed", { value: booking.price });
  };

  return  handleBook(room)}>Book;
}
```

The widget SDK auto-captures clicks, scrolls, form interactions, navigation, performance metrics, rage clicks, and more.

### Configuration

The SDK resolves config in this order:

1. **Code options** — `withYavio(server, { apiKey, endpoint })`
2. **Environment variables** — `YAVIO_API_KEY`, `YAVIO_ENDPOINT`
3. **Config file** — `.yaviorc.json` (auto-discovered via directory walk-up)
4. **No-op** — if no API key is found, the SDK does nothing (zero overhead)

## Self-Hosting Requirements

| Component | Minimum | Recommended |
|-----------|---------|-------------|
| CPU | 2 cores | 4+ cores |
| RAM | 4 GB | 8+ GB |
| Disk | 20 GB | 100+ GB |
| Docker | v24+ | Latest stable |
| Docker Compose | v2.20+ | Latest stable |

## Tech Stack

| Layer | Technology |
|-------|------------|
| Monorepo | pnpm + Turborepo |
| Language | TypeScript (strict) |
| Ingestion | Fastify 5 |
| Dashboard | Next.js (App Router) |
| Analytics DB | ClickHouse |
| App DB | PostgreSQL + Drizzle ORM |
| Auth | NextAuth.js v5 |
| UI | shadcn/ui + Tailwind |
| Testing | Vitest |
| Linting | Biome |

## Project Structure

```
packages/
  shared/       Shared types, validation schemas, error codes
  db/           Drizzle ORM schema, ClickHouse client, migrations
  ingest/       Fastify ingestion API
  sdk/          Server SDK + React widget SDK
  dashboard/    Next.js analytics dashboard
  cli/          CLI for setup and platform management
  docs/         Documentation site (Fumadocs)
```

## Contributing

We welcome contributions! Please read [CONTRIBUTING.md](CONTRIBUTING.md) before submitting a PR.

Join our [Discord](https://discord.gg/BprRh2fr) to discuss ideas and get help.

## Security

Found a vulnerability? Please report it responsibly — see [SECURITY.md](SECURITY.md). Do **not** open a public issue.

## License

MIT — see [LICENSE](LICENSE).

Copyright (c) 2026 Yavio GmbH

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [teamyavio](https://github.com/teamyavio)
- **Source:** [teamyavio/yavio](https://github.com/teamyavio/yavio)
- **License:** MIT
- **Homepage:** https://yavio.ai

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** yes
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-teamyavio-yavio
- Seller: https://agentstack.voostack.com/s/teamyavio
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
