How to Use the Countly MCP in Claude Code
Run headless Countly analytics audits and trigger custom event tracks directly from your Claude Code terminal.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Countly MCP to Claude Code
Create your Vinkius account to connect Countly to Claude Code and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Headless session testing in Claude Code
This Countly MCP Server exposes `begin_session`, `update_session`, and `end_session` directly to your terminal environment. You can pipe these tools into shell scripts via Claude Code to simulate user traffic, verify session timeouts, or test telemetry collection during CI/CD runs. It removes the need for any graphical interface. Because Claude Code operates entirely in the terminal, you can easily script Countly session lifecycles without opening a browser or booting up a heavy IDE.
Command-line event recording and validation
The integration uses `record_events` and `read_events` to let you track and verify custom application behavior straight from the Claude Code command line. When debugging a production issue, you can tell your agent to query the latest custom events to see if a specific error code was logged in Countly. It gives you instant diagnostics. You can pipe the JSON output of these Countly event tools directly into utilities like jq or grep, making terminal-based analytics troubleshooting incredibly fast with Claude Code.
Instant metrics extraction via MCP Server
This server provides `read_metrics` and `read_drill` to pull raw behavioral cohorts and standard usage metrics right into your Claude Code shell. If you need a quick count of daily active users, you ask your agent, and it queries your Countly instance to return a formatted text table. It replaces slow dashboard loading times. You can also update user segments using `update_user_details` to quickly flag internal test accounts. Running this command directly from your terminal session updates metadata instantly.
Set up Countly MCP in Claude Code
Prerequisites
- Claude Code CLI installed (
npm install -g @anthropic-ai/claude-code) - Active Vinkius subscription with a valid endpoint token
- 1
Run the add command
Open your terminal and run the command shown on the right. Replace
[YOUR_TOKEN_HERE]with your endpoint token from cloud.vinkius.com. Use--scope userto make it available across all projects. - 2
Verify the connection
Start a Claude Code session and type
/mcpto list connected servers. You should seecountly-mcpwith a green status indicator. - 3
Start using tools
Ask Claude Code something like "Check my latest Countly transactions." It will automatically discover and invoke the available Countly tools.
claude mcp add --transport http countly-mcp https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about Countly MCP in Claude Code
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Countly MCP today
We host it, we monitor it, we maintain it. You just paste one token.