MCP + CLI
Connect sessionvision to any MCP-compatible AI assistant. Query your analytics data, explore your schema, and run analyses directly from tools like Claude Code.
Setup
Add sessionvision as an MCP server with a single command:
claude mcp add --transport http sessionvision https://app.sessionvision.com/api/v1/mcpOn first use, an OAuth 2.0 PKCE flow will open in your browser to authenticate. Tokens are managed automatically after the initial authorization.
Available Tools
| Tool | Description |
|---|---|
query | Execute read-only SQL against ClickHouse |
get_schema | Get database schema, tables, and columns |
list_events | List recent events with filters |
get_event_definitions | Get all unique event names and counts |
get_property_definitions | Get all property names used in events |
Resources
| URI | Description |
|---|---|
sessionvision://schema | Full database schema resource |
OAuth Scopes
| Scope | Description |
|---|---|
mcp:query:read | Execute read-only queries |
mcp:events:read | List and retrieve events |
mcp:persons:read | List and retrieve persons |
mcp:sessions:read | List and retrieve sessions |
mcp:insights:read | Run trends and funnel analyses |
mcp:schema:read | Read database schema |
mcp:analytics:read | Bundle scope (all read operations) |
Example Usage
Once connected, you can ask your AI assistant questions like:
# In Claude Code or any MCP-compatible tool:
"How many unique users visited the pricing page this week?"
"What are the top 10 most common events?"
"Show me the schema for the events table"
"List all events from user_123 in the last 24 hours"The MCP endpoint uses JSON-RPC 2.0 over HTTP POST. It supports the standard MCP methods: initialize, tools/list, tools/call, resources/list, resources/read, and ping.