AI Integration

Connect Savri to your favorite AI tools. Talk to your analytics data through Claude, ChatGPT, Gemini, or any AI that supports API calls.

Claude CodeChatGPTGeminiCursor
ToolMethodSetup
Claude Code / CursorMCP ServerConfigure MCP server
ChatGPTCustom GPT + ActionsCreate Custom GPT
Gemini / OthersREST APIUse REST API

1Claude Code & Cursor (MCP)

Model Context Protocol (MCP) gives Claude Code and Cursor direct access to your analytics. You can talk naturally with your data.

What is MCP?

MCP is a protocol created by Anthropic that lets AI assistants communicate with external services. It runs locally on your computer and provides secure API access.

Installation

Add the following to your Claude Desktop configuration (claude_desktop_config.json):

claude_desktop_config.json
{
  "mcpServers": {
    "savri": {
      "command": "npx",
      "args": ["-y", "@savri/mcp"],
      "env": {
        "SAVRI_API_KEY": "bk_your_api_key_here"
      }
    }
  }
}

Create an API key with read scope in settings. Add write scope if you want to create goals and funnels.

Available tools

ToolDescription
savri_list_sitesList all your sites with visitor statistics
savri_get_statsGet visitors, pageviews, bounce rate for a site
savri_get_pagesSee which pages get the most traffic
savri_get_referrersSee where your traffic comes from
savri_get_countriesGeographic distribution of visitors
savri_list_propertiesList registered event properties for a site
savri_create_propertyRegister a new event property
savri_delete_propertyDelete an event property
savri_list_goalsList conversion goals for a site
savri_create_goalCreate conversion goals (pageview or event)
savri_delete_goalDelete a conversion goal
savri_list_funnelsList existing funnels
savri_create_funnelCreate funnels to track user journeys
savri_delete_funnelDelete a funnel
savri_get_funnel_statsGet conversion statistics for a funnel

Example usage

Try telling Claude:

Show me traffic for my site over the last 30 days and compare with the previous period. Which pages have increased the most?

2ChatGPT (Custom GPT)

Create a Custom GPT with Actions that call our REST API. Perfect for analyzing traffic directly in ChatGPT.

Create a Custom GPT

  1. Go to chat.openai.com → Explore GPTs → Create
  2. Give your GPT a name, e.g. "My Analytics Assistant"
  3. Under "Actions", paste the OpenAPI specification below
  4. Add your API key under Authentication (Bearer token)

OpenAPI Specification

Copy this spec and paste it under Actions in your Custom GPT:

openapi.yaml
openapi: 3.1.0
info:
  title: Savri Analytics API
  version: 1.0.0
  description: Access your website analytics data
servers:
  - url: https://savri.io/api/v1
paths:
  /sites:
    get:
      operationId: listSites
      summary: List all your websites
      security:
        - bearerAuth: []
      responses:
        '200':
          description: List of sites
  /stats/overview:
    get:
      operationId: getStats
      summary: Get visitor statistics
      security:
        - bearerAuth: []
      parameters:
        - name: site_id
          in: query
          required: true
          schema:
            type: string
        - name: period
          in: query
          schema:
            type: string
            enum: [7d, 30d, 90d]
      responses:
        '200':
          description: Statistics overview
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

Tip

Add instructions to the GPT about which site to use by default, so you don't have to specify site_id every time.

3REST API (Gemini, etc.)

Any AI tool that can make HTTP calls can use our REST API. Gemini, Claude.ai (via Projects), or custom integrations.

curl -H "Authorization: Bearer bk_your_api_key" \
  "https://savri.io/api/v1/stats/overview?site_id=YOUR_SITE_ID&period=30d"

See full API documentation for all endpoints and parameters.

Use cases

Weekly report

"Summarize this week's traffic and identify trends"

Anomaly detection

"Is there anything unusual in the traffic over the last few days?"

Goal setup

"Create a goal that tracks purchase clicks on all affiliate links"

Traffic analysis

"Which traffic sources convert best to our goals?"

Get started

Create an API key to start using AI integration.