{
  "markdown": "# KrystalView MCP Server\n\nGive your AI agents direct access to website analytics. Query visitor sessions, investigate UX friction, analyze conversion funnels, review campaigns and errors, and get anomaly alerts — all from Claude, Cursor, or any MCP-compatible client.\n\n## Connection Options\n\n### Hosted Remote MCP\n\nUse this when your client supports remote MCP servers or connector-style OAuth.\nNo local package install is required.\n\n| Field | Value |\n|-------|-------|\n| Endpoint | `https://krystalview.com/mcp` |\n| Transport | `streamable-http` |\n| Authentication | OAuth authorization code + PKCE |\n| OAuth metadata | `https://krystalview.com/.well-known/oauth-authorization-server` |\n| Protected resource metadata | `https://krystalview.com/.well-known/oauth-protected-resource` |\n\nDuring OAuth, KrystalView asks the signed-in user to choose the site the MCP\nclient can read. The issued token is read-only and scoped to that site.\nThe hosted OAuth server supports dynamic client registration, authorization\ncode + PKCE, resource indicators, refresh-token rotation, and token revocation.\n\nFor clients that support custom headers instead of OAuth, the hosted endpoint\nalso accepts a KrystalView read API key as either:\n\n```http\nAuthorization: Bearer kv_live_...\n```\n\nor:\n\n```http\nX-API-Key: kv_live_...\n```\n\n### Local stdio MCP Package\n\nUse this when your MCP client runs local stdio servers, such as Claude Desktop,\nClaude Code, Cursor, or similar developer tools.\n\n### Install\n\n```bash\npip install krystalview-mcp\n```\n\n### Configure\n\nGenerate an API key in your [KrystalView console](https://krystalview.com) under **Settings > API Keys**.\n\n#### Claude Desktop\n\nAdd to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"krystalview\": {\n      \"command\": \"krystalview-mcp\",\n      \"env\": {\n        \"KRYSTALVIEW_API_KEY\": \"your-api-key-here\"\n      }\n    }\n  }\n}\n```\n\n#### Claude Code\n\n```bash\nclaude mcp add krystalview -- krystalview-mcp\n# Then set your API key:\nexport KRYSTALVIEW_API_KEY=\"your-api-key-here\"\n```\n\n#### Cursor\n\nAdd to your MCP settings:\n\n```json\n{\n  \"krystalview\": {\n    \"command\": \"krystalview-mcp\",\n    \"env\": {\n      \"KRYSTALVIEW_API_KEY\": \"your-api-key-here\"\n    }\n  }\n}\n```\n\n## Available Tools\n\n| Tool | Description |\n|------|-------------|\n| `get_sessions` | List/search visitor sessions with filters (device, location, friction, rage clicks) |\n| `get_session_detail` | Deep dive into a specific session — full timeline, events, navigation path |\n| `get_site_stats` | Aggregate performance metrics — sessions, friction, devices, top pages |\n| `get_scroll_depth` | Scroll-depth buckets for a specific page path |\n| `get_live_visitors` | Currently active visitor count and recent live sessions |\n| `get_anomalies` | AI-detected anomalies with explanations (traffic spikes/drops, friction surges) |\n| `get_funnels` | List defined conversion funnels |\n| `get_funnel_analysis` | Step-by-step funnel conversion rates and drop-off analysis |\n| `get_campaign_summary` | UTM campaign attribution summary |\n| `get_campaign_sessions` | Visitor sessions from a specific campaign |\n| `get_campaign_roas` | Paid campaign spend, conversions, and ROAS where connected |\n| `get_errors` | Aggregated client-side browser errors |\n| `get_notifications` | Recent KrystalView notifications and insights |\n\n## Example Prompts\n\nOnce connected, try asking your AI assistant:\n\n- *\"How's my site performing this week?\"*\n- *\"Show me frustrated mobile users from the last 24 hours\"*\n- *\"Why did our traffic drop yesterday?\"*\n- *\"Where are users dropping off in the checkout funnel?\"*\n- *\"Find sessions with rage clicks on the pricing page\"*\n- *\"Which campaigns are driving the most high-friction sessions?\"*\n- *\"Show me unresolved browser errors with sample session IDs\"*\n- *\"Are there any anomalies I should know about?\"*\n\n## Environment Variables\n\n| Variable | Required | Default | Description |\n|----------|----------|---------|-------------|\n| `KRYSTALVIEW_API_KEY` | Yes | — | Your KrystalView API key |\n| `KRYSTALVIEW_BASE_URL` | No | `https://krystalview.com/api` | API base URL |\n| `KRYSTALVIEW_TIMEOUT` | No | `15` | Request timeout in seconds |\n\n## Rate Limits\n\nAPI keys have configurable rate limits (default: 60 requests per minute). Rate limit headers are included in every response. If you hit the limit, the server returns a clear error with retry timing.\n\n## Security\n\n- API keys are scoped to a single site — agents can only access data for the site the key was created for\n- OAuth tokens issued by the hosted MCP endpoint are read-only and scoped to the selected site\n- Hosted OAuth supports refresh-token rotation and token revocation\n- Browser-originating MCP/OAuth requests are checked against explicit trusted origins\n- Tools are read-only\n- All requests use HTTPS\n- Keys can be rotated or revoked in the KrystalView console\n- The local stdio package stores no data — it proxies directly to the KrystalView API\n\n<!-- mcp-name: io.github.KrystalView/krystalview -->\n\n## License\n\nMIT\n",
  "bytes": 5017,
  "sha": "e412bcd5b1a789300ce05da53fba9d9d35ead19435788225791197d8f54b47a5",
  "repo_slug": "krystalview/krystalview-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_krystalview_krystalview_100f2d35/readme"
}