Clicky MCP Server

Clicky MCP Server

Enables users to retrieve website traffic analytics data from Clicky, including visitor counts, top pages, traffic sources, and domain-specific visitor data. Provides comprehensive web analytics insights through natural language queries with support for date range filtering and detailed traffic breakdowns.

Category
访问服务器

README

Clicky MCP Server

A Model Context Protocol (MCP) server for fetching traffic analytics data from the Clicky API.

Features

This MCP server provides five tools to interact with Clicky analytics:

  • get_total_visitors - Get total visitors for a date range
  • get_domain_visitors - Get visitors filtered by referrer domain
  • get_top_pages - Get top pages for a date range
  • get_traffic_sources - Get traffic sources breakdown for a date range
  • get_page_traffic - Get traffic data for a specific page by URL

Setup

  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Run the server:
npm start

Or for development:

npm run dev

Configuration

You need to provide your Clicky analytics credentials to use this server. Get these from your Clicky account:

  1. Get your credentials from your Clicky account:

    • Site ID: Available in your site preferences
    • Site Key: Available in your site preferences under "Preferences" → "Info"
  2. Configure credentials using one of these methods:

    Option 1: Environment variables

    export CLICKY_SITE_ID="YOUR_SITE_ID"
    export CLICKY_SITE_KEY="YOUR_SITE_KEY"
    

    Option 2: Command line arguments

    npm start -- --site-id YOUR_SITE_ID --site-key YOUR_SITE_KEY
    

    Option 3: .env file

    # Create .env file in project root
    CLICKY_SITE_ID=YOUR_SITE_ID
    CLICKY_SITE_KEY=YOUR_SITE_KEY
    

⚠️ Security Note: Never commit your actual credentials to version control. The .env file is already included in .gitignore for security.

Using with Claude Desktop

To use this MCP server with Claude Desktop, you need to add it to your Claude Desktop configuration:

  1. Locate your Claude Desktop config file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. Add the MCP server to your config:

    {
      "mcpServers": {
        "clicky-analytics": {
          "command": "node",
          "args": ["/path/to/clicky-mcp/dist/index.js"],
          "env": {
            "CLICKY_SITE_ID": "YOUR_SITE_ID",
            "CLICKY_SITE_KEY": "YOUR_SITE_KEY"
          }
        }
      }
    }
    
  3. Update the path: Replace /path/to/clicky-mcp/ with the actual path to your cloned repository.

  4. Add your credentials: Replace YOUR_SITE_ID and YOUR_SITE_KEY with your actual Clicky credentials.

  5. Restart Claude Desktop for the changes to take effect.

Once configured, you'll be able to use tools like "get traffic sources for my website" or "show me top pages from last week" directly in Claude Desktop conversations.

Available Tools

get_total_visitors

Get total visitor counts for a specified date range.

Parameters:

  • start_date (string, required): Start date in YYYY-MM-DD format
  • end_date (string, required): End date in YYYY-MM-DD format

Example:

{
  "start_date": "2024-01-01",
  "end_date": "2024-01-31"
}

get_domain_visitors

Get visitor data filtered by referrer domain.

Parameters:

  • domain (string, required): Domain name to filter by (e.g., "facebook", "google")
  • start_date (string, required): Start date in YYYY-MM-DD format
  • end_date (string, required): End date in YYYY-MM-DD format

Example:

{
  "domain": "facebook",
  "start_date": "2024-01-01",
  "end_date": "2024-01-31"
}

get_top_pages

Get the most popular pages for a date range.

Parameters:

  • start_date (string, required): Start date in YYYY-MM-DD format
  • end_date (string, required): End date in YYYY-MM-DD format
  • limit (number, optional): Maximum number of pages to return (1-1000)

Example:

{
  "start_date": "2024-01-01",
  "end_date": "2024-01-31",
  "limit": 50
}

get_traffic_sources

Get traffic sources breakdown showing where visitors come from.

Parameters:

  • start_date (string, required): Start date in YYYY-MM-DD format
  • end_date (string, required): End date in YYYY-MM-DD format

Example:

{
  "start_date": "2024-01-01",
  "end_date": "2024-01-31"
}

Returns: Clean breakdown of traffic sources with visitor counts and percentages for sources like Direct, Search engines, Social media, Links, etc.

get_page_traffic

Get traffic data for a specific page by filtering with its URL.

Parameters:

  • url (string, required): Full URL or path of the page (e.g., "https://example.com/page" or "/page")
  • start_date (string, required): Start date in YYYY-MM-DD format
  • end_date (string, required): End date in YYYY-MM-DD format

Example:

{
  "url": "https://news.ycombinator.com/show",
  "start_date": "2024-01-01",
  "end_date": "2024-01-31"
}

Returns: Traffic data for the specific page including visitor counts, actions, and other page-specific metrics.

API Limitations

  • Maximum date range: 31 days (enforced by Clicky API)
  • Maximum results per request: 1,000 items
  • One simultaneous request per IP address per site ID

Error Handling

The server includes built-in error handling for:

  • Invalid date ranges (> 31 days)
  • API rate limits
  • Network errors
  • Invalid parameters

All errors are returned with descriptive messages to help with debugging.

Development

The project structure:

clicky-mcp/
├── src/
│   ├── index.ts              # Main MCP server
│   ├── clicky-client.ts      # Clicky API client
│   └── tools/
│       ├── get-total-visitors.ts
│       ├── get-domain-visitors.ts
│       ├── get-top-pages.ts
│       ├── get-traffic-sources.ts
│       └── get-page-traffic.ts
├── package.json
├── tsconfig.json
└── README.md

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选