pyxis-mcp
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., "@pyxis-mcpwhere does the sign-up funnel lose the most people this week?"
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.
The MCP server of Pyxis: lets an AI agent read your dashboard's numbers, with a read-only token you can revoke at any time.
Pyxis · Live demo · API reference
Status: on npm as
pyxis-mcp, every release published from GitHub Actions with provenance. The fifteen tools read the live Pyxis API.
Ecosystem
Repository | Role |
Ingestion, dashboard sign-in and queries, erasure, retention | |
Browser tracker published to npm as | |
The dashboard: overview, funnels, features, requests | |
pyxis-mcp (this one) | MCP server that lets an AI agent read the dashboard's numbers |
Related MCP server: shop-sql-mcp
Why it exists
More and more questions about a product are asked to an agent instead of a dashboard: "how did last week compare", "where does the sign-up funnel lose people", "which route started failing". This server gives Claude Code, Claude Desktop, Cursor and other MCP clients the same numbers the Pyxis dashboard shows, and nothing more: it uses an access token that only reads, created by an admin in the dashboard's Settings and revocable there at any moment. Like the rest of Pyxis, there is no personal data to hand over: events carry no cookies, no addresses and no user agents.
Tools
Every tool only reads, and maps to one GET route of the Pyxis API. Dates are YYYY-MM-DD in the
project's time zone; list_projects gives each project's today, so call it first.
Tool | What it answers |
| The projects the token can read: id, name, time zone, today there, conversion event, first and last event |
| Visits, identified users, conversions and failed writes against the previous period; top pages and events |
| Visits and conversions by device type, browser, system, country and region |
| Visits per day and channel, and the sources and campaigns behind them |
| Entry and exit pages, single-page visits, visit length |
| Visits by weekday and local hour |
| The most used named events or screens, day by day |
| How the property values of one named event break down |
| Calls to the site's backend per route: failures, statuses, durations, latest errors |
| How many visits or people reached each step, and the time between steps |
| The same funnel per device type or channel |
| The visits or people who reached, or dropped at, one step |
| The visits of a range, filtered by pages, events, channel, device, country, campaign, failed requests |
| Every event of one visit, or every visit of one identified person |
| Time zone, conversion event, allowed origins, retention, live public keys |
A result is JSON text, { "untrusted_visitor_text": "…", "report": … }: the report is the API's
answer, and the first field reminds the agent that names, paths and values inside it were written by
the site's visitors. Problems come back as tool errors the agent can act on (a revoked token, an
unknown project, the rate limit and when to retry).
Configuration
Variable | Required | Meaning |
| yes | A read-only access token ( |
| no | The Pyxis API to read, as an origin. Defaults to |
A missing or malformed value stops the server with a sentence on standard error that names the variable and never repeats its value.
Use it
Create a token in the dashboard (Settings, Access tokens), then add the server to your client. It
runs with npx, so there is nothing to install beforehand (Node 22 or later).
Claude Code:
claude mcp add pyxis -e PYXIS_TOKEN=pyxis_at_… -- npx -y pyxis-mcpClaude Desktop (claude_desktop_config.json) and Cursor (.cursor/mcp.json):
{
"mcpServers": {
"pyxis": {
"command": "npx",
"args": ["-y", "pyxis-mcp"],
"env": { "PYXIS_TOKEN": "pyxis_at_…" }
}
}
}A self-hosted Pyxis adds PYXIS_API_URL. To run it from source instead, npm ci && npm run build
in a clone and use node /path/to/pyxis-mcp/dist/cli.js as the command. Keep the token out of
shared files and chats; revoke it in the dashboard the moment it leaks.
Architecture
flowchart LR
Agent["MCP client<br>(Claude Code, Cursor…)"] -- "stdio, JSON-RPC" --> Server["pyxis-mcp<br>(on the user's machine)"]
Server -- "HTTPS GET<br>Authorization: Bearer pyxis_at_…" --> API["Pyxis API"]
API --> DB[("Events")]The server opens no port and keeps no state. The API decides what the token may read, exactly as it does for a dashboard session (ADR 0002).
Tech stack
TypeScript (strict) on Node 22 or later, ES modules. Vitest with V8 coverage, ESLint
(typescript-eslint strict, type-checked) and Prettier, Husky and commitlint, GitHub Actions with
CodeQL, Dependabot and release-please.
Getting started
npm ci
npm run lint && npm run typecheck && npm run test:cov && npm run buildTesting
npm run test:covruns the unit tests in Node and fails below 100% of statements, branches, functions and lines. The server is tested with a real MCP client over an in-memory transport and a fakefetch.One file is left out of the unit coverage:
src/cli.ts, which only wires the modules to the standard input and output.npm run test:e2ecovers it: afternpm run build, a real MCP client startsdist/cli.js, lists the tools and calls them against a local fake of the API, checks that standard output carries nothing but the protocol, and that a bad configuration stops the process with the reason on standard error.src/contract.test.tschecks the tools againstcontract/openapi.json, the API's own contract (npm run contract:synccopies it from pyxis-api): every route a token may read has a tool, and every tool sends only declared parameters, with values inside their enums.npm run test:toolingtests the lint rule and the scripts.CI runs the unit tests on Node 24 and again on Node 22, the oldest version the package supports.
Project structure
src/
├── config.ts reads PYXIS_TOKEN and PYXIS_API_URL
├── pyxis-api.ts one GET to the API, failures as sentences
├── tools.ts the fifteen tools: input schemas, routes, requests
├── server.ts registers the tools on the MCP server
├── version.ts the package version, for the server and the user agent
└── cli.ts the executable: stdio transport
e2e/ the built server driven by a real MCP client
contract/ the API's OpenAPI contract, copied from pyxis-api
eslint-rules/ the local rule that forbids comments
scripts/ the comment check and the contract sync
docs/adr/ architecture decision recordsPrivacy and security
Read-only: the API accepts the token only on its read routes; it cannot write, sign in, manage sessions or create tokens.
The token only travels in the
Authorizationheader to the configured API, over https (plain http only to localhost), and never reaches a log, an error message or a tool result.Text written by a site's visitors is returned as data, and each tool description says it is not an instruction.
Vulnerabilities: see SECURITY.md.
Architecture decisions
ADR | Decision |
Record architecture decisions | |
A local, read-only server that uses the admin's access token |
Roadmap
Repository skeleton, quality gates, configuration reader
Tools over the API's read routes, tested against its OpenAPI contract
First release on npm, with provenance
Setup guides for Claude Code, Claude Desktop and Cursor
Contributing and license
See CONTRIBUTING.md and the Code of Conduct. MIT licensed: see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only Google Search Console and Google Analytics for AI agents.
Read-only website analytics, AI referrals, crawlers, goals, revenue, and funnels.
Read-only Google Analytics 4 MCP server for AI assistants.
Read-only access to your Nexly web analytics: traffic, pages, acquisition, events, and reports.
Related MCP Servers
- FlicenseBqualityCmaintenanceA read-only stdio-based MCP server that provides tools to query Plausible Analytics data, including listing sites, fetching statistics with metrics/dimensions/filters, and getting realtime visitor counts.3-
- FlicenseNot gradedqualityCmaintenanceProvides AI agents read-only analytical access to a SQLite database over stdio, with tools for listing tables, describing schemas, and running paginated SQL queries.-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to query Google Analytics 4 data—traffic, acquisition, top pages, audiences, events, conversions, and realtime metrics—through natural language. Supports local stdio use for a single user and HTTP multi-tenant OAuth for teams.1MIT
- AlicenseAqualityCmaintenanceEnables AI tools that support the Model Context Protocol to query Plausible Analytics traffic and conversion data, break metrics down by page, source, country, device, and UTM parameters, and compare two date ranges side by side. All query tools are read-only and work with either a hosted bring-your-own-key endpoint or a local STDIO install.449 npmMIT