---
title: "Deploy Swetrix Events MCP"
description: "MCP server for the Swetrix Events API - tracking pageviews & custom events."
category: "Analytics"
url: https://railway.com/deploy/swetrix-events-mcp
---

# Deploy Swetrix Events MCP

MCP server for the Swetrix Events API - tracking pageviews & custom events.

**[Deploy Swetrix Events MCP on Railway](https://railway.com/template/swetrix-events-mcp)**

- **Creator:** André Lademann's Projects
- **Category:** Analytics

## Template content

### mcp-swetrix

- **Source:** kieksme/mcp-swetrix
- **Public domain:** Yes

## Documentation

# Deploy and Host Swetrix Events MCP on Railway

Swetrix Events MCP is a remote [Model Context Protocol](https://modelcontextprotocol.io) server that lets an AI assistant send tracking data straight into Swetrix — pageviews, custom events, heartbeats, error events, and revenue — using 5 purpose-built tools, without you writing any tracking code by hand.

## About Hosting Swetrix Events MCP

This template builds the `swetrix-events-mcp-server` package from the [kieksme/mcp-swetrix](https://github.com/kieksme/mcp-swetrix) monorepo and runs it in Streamable HTTP mode, listening on port 3000 behind a public Railway domain. A random `MCP_HTTP_AUTH_TOKEN` bearer token is generated automatically at deploy time to protect the `/mcp` endpoint; `SWETRIX_API_KEY` is optional and only needed if you plan to use the revenue-tracking tool. Once it's live, point any MCP-compatible client — Claude Desktop, Claude Code, or another agent — at `https:///mcp` with that bearer token to start sending events.

## Common Use Cases

- Let an AI agent record pageviews and custom events for a site or app it's operating on your behalf
- Track errors and revenue events from automated workflows or chat-driven checkouts
- Prototype analytics instrumentation for a new product without wiring up a client-side SDK first

## Dependencies for Swetrix Events MCP Hosting

- A [Swetrix](https://swetrix.com) account (cloud or self-hosted) with a project ID
- An MCP-compatible client, such as Claude Desktop, Claude Code, or another agent that supports the Streamable HTTP transport

### Deployment Dependencies

- [Swetrix documentation](https://swetrix.com/docs) — where to find your project ID and browse the underlying events API
- [Model Context Protocol specification](https://modelcontextprotocol.io) — the protocol this server implements

## Why Deploy Swetrix Events MCP on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Swetrix Events MCP on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


## Similar templates

- [Matomo Analytics + MariaDB](https://railway.com/deploy/matomo-analytics-mariadb) — Privacy-friendly analytics with MariaDB and persistent volumes.
- [Bugsink](https://railway.com/deploy/bugsink) — Self-hosted Error Tracking. Sentry-SDK compatible
- [SubTrackr](https://railway.com/deploy/bscottsubtrackr) — Self-hosted Subscription Tracker

Open this page in a browser: https://railway.com/deploy/swetrix-events-mcp
