# GoatCounter MCP for AI Agents AI Agent Connect

> GoatCounter MCP. Track pageviews, analyze visitor stats, and manage your sites directly through your AI agent. It handles your privacy-focused web analytics so you can get insights without digging through dashboards.

## Overview
- **Category:** productivity
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_oy2DrhzX8CLr7ssLTemEJTw8bZJBNGBfBFNMjKur/ai-agent-connect
- **Tags:** web-analytics, privacy-focused, traffic-monitoring, visitor-stats, data-export, marketing-insights

## Description

This Connector lets you stay on top of your web traffic without having to leave your workspace or deal with complex analytics dashboards. You can ask your agent to pull pageview counts, check which browsers your audience prefers, or see which specific paths are getting the most hits. It handles the heavy lifting of data retrieval, whether you need a high-level summary of total hits or a deep dive into specific referral stats. You can also manage your entire portfolio of sites, creating new ones or updating configurations, right from a chat interface. If you need to move your data elsewhere, the agent can start and monitor exports for you. It is much easier to stay on top of your site performance when the data comes to you. By including this in the Vinkius catalog, you get a clean way to bridge your analytics into your daily workflow. You stop being a data entry clerk and start being a person who actually uses the information to make decisions. Instead of manual auditing, you get instant answers about which content is landing well and where your visitors are coming from. This means you spend less time navigating menus and more time actually improving your site.

## Tools

### get_export
Check the current status and metadata of a pending data export. This ensures you know when your file is ready.

### get_site
Pull detailed information about a specific registered site. This provides a quick overview of your site settings.

### list_sites
See a full list of all sites accessible in your account. This helps you quickly identify the correct site ID.

### get_me
Retrieve your current user details and API key information. Use this to confirm your connection is active.

### start_export
Trigger a new background data export and get a tracking ID. This starts the process for your large data sets.

### get_stats_hits_path
Get referral statistics for a specific URL path. This shows you exactly where your traffic is coming from.

### get_stats_hits
View an overview of pageviews across different paths. This helps you see which pages are the most popular.

### count_hits
Send pageviews or specific events directly to your GoatCounter dashboard. This helps you track custom actions from your app.

### create_site
Register a new site within your GoatCounter account. You can do this without opening a web browser.

### download_export
Grab a completed export file for your local analysis. Use this to move your data into other tools.

### get_stats_page_detail
Pull detailed stats for a specific item in a category, like browser versions. This gives you granular audience data.

### get_stats_page
Get stats for categories like browsers, systems, and languages. This provides a clear picture of your visitor base.

### get_stats_total
Retrieve total pageview counts for a specific date range. Use this for high level traffic summaries.

### update_site
Modify the settings and configuration for an existing site. This lets you manage your sites via chat.

## Prompt Examples

**Prompt:** 
```
How many pageviews did we get in the last 30 days?
```

**Response:** 
```
I've pulled your traffic data for the last 30 days. Here is the summary:

| Metric | Value |
| :--- | :--- |
| Total Pageviews | 12,450 |
| Top Path | /blog/new-post |

Your traffic has remained steady with a 5% increase compared to the previous month.
```

**Prompt:** 
```
List my sites and tell me which one has the most traffic.
```

**Response:** 
```
You have 3 sites registered in your GoatCounter account:

* **Personal Blog** (ID: 101): 4,200 hits
* **E-commerce Store** (ID: 102): 7,150 hits
* **Docs Portal** (ID: 103): 1,100 hits

The **E-commerce Store** is currently your highest-traffic site.
```

**Prompt:** 
```
What browsers are my visitors using?
```

**Response:** 
```
Based on your latest visitor stats, here is the browser breakdown:

* **Chrome**: 45%
* **Firefox**: 20%
* **Safari**: 15%
* **Other**: 20%

Most of your users are accessing your site via Chrome.
```

## Capabilities

### Pull pageview counts
Get total hits for specific paths and URLs.

### Check visitor demographics
See stats by browser, operating system, and location.

### Manage site settings
Create or update site configurations on the fly.

### Request data exports
Start and monitor CSV or JSON downloads for external analysis.

### Log custom events
Send hits or events from your backend to your dashboard.

## Use Cases

### Checking a new landing page
A developer asks the agent to check get_stats_hits_path to see if the new URL is receiving traffic after a launch.

### Monthly reporting
A marketer tells the agent to start_export and then download_export to get a CSV of last month's data for a slide deck.

### Demographic research
A site owner asks for get_stats_page to see which browsers are most common among their readers.

### Site expansion
A user uses create_site to quickly register a new blog without having to open the GoatCounter web interface.

## Benefits

- Get instant traffic summaries by asking for get_stats_total instead of logging into a separate dashboard.
- Manage your entire site portfolio by using list_sites and create_site to keep your configurations organized.
- Automate data portability by using start_export to handle large CSV downloads without manual clicks.
- Deep dive into demographics using get_stats_page to see exactly which browsers and locations your users use.
- Track custom backend events via count_hits to bridge your app's internal actions with your analytics.

## How It Works

The bottom line is you get real-time web analytics answers without leaving your workspace.

1. Subscribe to the Connector and enter your GoatCounter API key and instance URL.
2. Connect the Connector to your preferred AI client like Claude or Cursor.
3. Ask natural questions about your traffic or site stats.

## Frequently Asked Questions

**What is the GoatCounter MCP for?**
This Connector connects your web analytics to your AI agent. It lets you query pageviews, check visitor demographics, and manage your sites using natural language instead of a dashboard.

**Can I use GoatCounter MCP to manage my sites?**
Yes. You can use it to list all your registered sites, create new ones, or update your existing site configurations directly through your AI client.

**Does GoatCounter MCP support data exports?**
Yes, it supports both CSV and JSON exports. You can ask your agent to start an export and then download the file once it is ready.

**Can I track custom events with GoatCounter MCP?**
Yes, you can send custom hits or events from your backend to your dashboard. This is great for tracking specific user actions like signups or purchases.

**How do I connect GoatCounter MCP to my AI agent?**
Once you subscribe, you just need to provide your GoatCounter API key and your instance URL. From there, your agent can access your data immediately.

**Can I see which browsers my visitors are using?**
Yes. Use the `get_stats_page` tool with the 'browsers' category to see a breakdown of visitor browser statistics for your chosen date range.

**How do I export all my analytics data for backup?**
You can start a background export using `start_export`. Once processed, use `get_export` to check the status and `download_export` to retrieve the file.

**Is it possible to track custom events from my server code?**
Absolutely. The `count_hits` tool allows you to send pageviews or custom events directly to GoatCounter from any backend or middleware.