Use Pathrail from Claude, Cursor and ChatGPT
Connect your assistant to your analytics and ask it which channel made money.
Pathrail runs an MCP server at https://pathrail.io/api/mcp, so an assistant can read the same reports you see in the dashboard. Make an API key on the Account page first. A read key is enough to ask questions; a full key also lets the assistant add goals, funnels and alerts.
Claude Code
claude mcp add --transport http pathrail https://pathrail.io/api/mcp --header "Authorization: Bearer sk_pr_..."
Claude Desktop
Desktop reads servers from claude_desktop_config.json (Settings, Developer, Edit config). Desktop speaks to remote servers through mcp-remote:
{
"mcpServers": {
"pathrail": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://pathrail.io/api/mcp", "--header", "Authorization:Bearer ${PATHRAIL_KEY}"],
"env": { "PATHRAIL_KEY": "sk_pr_..." }
}
}
}Cursor, Windsurf and VS Code
In Cursor, add this to ~/.cursor/mcp.json (or .cursor/mcp.json in a project). Windsurf and other clients take the same shape.
{
"mcpServers": {
"pathrail": {
"url": "https://pathrail.io/api/mcp",
"headers": { "Authorization": "Bearer sk_pr_..." }
}
}
}VS Code uses .vscode/mcp.json:
{
"servers": {
"pathrail": {
"type": "http",
"url": "https://pathrail.io/api/mcp",
"headers": { "Authorization": "Bearer sk_pr_..." }
}
}
}ChatGPT
ChatGPT's connectors sign in with OAuth, and Pathrail's MCP server takes an API key, so the simplest route there is a custom GPT with an Action. Create a GPT, add an Action, set Authentication to API key, Bearer, paste your key, and import this schema:
openapi: 3.1.0
info: { title: Pathrail, version: "1" }
servers: [{ url: https://pathrail.io/api/v1 }]
paths:
/sites:
get: { operationId: listSites, summary: Sites this key can reach }
/stats/{report}:
get:
operationId: report
summary: Read a Pathrail report (overview, breakdown, revenue, ai, funnels...)
parameters:
- { name: report, in: path, required: true, schema: { type: string } }
- { name: site_id, in: query, schema: { type: string } }
- { name: period, in: query, schema: { type: string, example: 7d } }
- { name: dimension, in: query, schema: { type: string, example: channel } }Things to ask
| Revenue | Ask Claude which channel made money last week, and how that compares with the week before. |
| AI assistants | Which assistants read my pricing page, and did any of them send paying customers? |
| Funnels | Where do people drop out between the docs and signup? Add a funnel for it. |
| Bots | How much traffic was removed as bots this month, and why? |
| Setup | Install Pathrail in this codebase. (The assistant calls get_install_instructions.) |
Every tool is listed on the MCP server page. In the MCP Registry, Pathrail's name is io.pathrail/pathrail, for clients that browse the registry.