Model Context Protocol Server

Connect your AI assistants to Countly's powerful analytics platform. Access real-time data, manage applications, and analyze user behavior through the Model Context Protocol.

Server is running and ready to accept connections

📡 Available Endpoints

/mcp MCP Protocol

Model Context Protocol endpoint for AI assistants and MCP clients

/health Health Check

Monitoring endpoint for Docker health checks and uptime verification

/.well-known/mcp-manifest.json Discovery

Server capabilities manifest for automated discovery and configuration

🔌 Connection Methods

VS Code Integration (Recommended)

Add this configuration to your VS Code settings.json:

{
  "mcp.servers": {
    "countly": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@countly/countly-mcp-server"],
      "env": {
        "COUNTLY_SERVER_URL": "https://your-server.count.ly",
        "COUNTLY_AUTH_TOKEN": "your-api-key"
      }
    }
  }
}

Claude Desktop Integration

Configure Claude Desktop to connect with Countly:

{
  "mcpServers": {
    "countly": {
      "command": "npx",
      "args": ["-y", "@countly/countly-mcp-server"],
      "env": {
        "COUNTLY_SERVER_URL": "https://your-server.count.ly",
        "COUNTLY_AUTH_TOKEN": "your-api-key"
      }
    }
  }
}

HTTP/SSE Connection

Connect via HTTP with custom headers (recommended):

POST /mcp
X-Countly-Server-Url: https://your-server.count.ly
X-Countly-Auth-Token: your-api-key
Content-Type: application/json

Or use URL parameters:

POST /mcp?server_url=https://your-server.count.ly&auth_token=your-api-key
Content-Type: application/json

🛠️ Available Analytics Tools

📊 Analytics

Sessions, users, events, locations, carriers, and device data

💥 Crash Analytics

Crash reports, statistics, and error tracking

📱 App Management

Create and manage applications

👥 User Management

Dashboard users and permissions

🔔 Alerts

Configure and manage alert rules

🎯 Events

Query and analyze custom events

👁️ Views

Page and screen analytics

📝 Notes

Create and manage annotations

🗄️ Database

Execute database queries

🔧 Configuration Options

  • Environment Variables: COUNTLY_SERVER_URL, COUNTLY_AUTH_TOKEN
  • HTTP Headers: X-Countly-Server-Url, X-Countly-Auth-Token
  • URL Parameters: ?server_url=...&auth_token=...
  • Configuration File: countly_token.txt for authentication