Home Docs MCP integration

MCP integration

Publistic includes a Model Context Protocol (MCP) server. Connect Claude, ChatGPT, or any MCP-compatible AI assistant to query your analytics with natural language.

What is MCP?

The Model Context Protocol is an open standard that lets AI assistants connect to external tools and data sources. With Publistic's MCP server, you can ask questions like "what's my best performing article this week?" and get answers directly from your analytics data.

Setup

  1. Generate an API key
    Go to Settings → API Keys in your Publistic dashboard and create a new key.
  2. Configure your AI client
    Add the Publistic MCP server to your AI assistant's configuration.
  3. Start asking questions
    Your AI assistant now has direct access to your analytics data.

MCP endpoint

https://mcp.publistic.us/mcp

Configuration example (Claude Desktop)

Add this to your Claude Desktop MCP configuration:

{
  "mcpServers": {
    "publistic": {
      "url": "https://mcp.publistic.us/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Available tools

The MCP server exposes 14 tools that cover all aspects of your analytics:

  • get_overview
  • get_top_articles
  • get_sources
  • get_trends
  • compare_periods
  • get_insights
  • get_web_vitals
  • get_authors
  • get_search_performance
  • get_underperforming_articles
  • get_content_gaps
  • get_site_health
  • query_custom

Example queries

Once connected, you can ask your AI assistant questions in natural language:

  • "What's my best performing article this week?"
  • "Which traffic sources have the highest engagement?"
  • "Compare this week's performance to last week"
  • "Show me articles with high pageviews but low read time"
  • "What are my Core Web Vitals looking like?"
  • "Which authors have the best recirculation rates?"
  • "Are there any content gaps I should fill?"
💡
The query_custom tool lets your AI assistant write and execute custom ClickHouse queries against your data. This means any analytics question you can think of can be answered, even if there isn't a dedicated tool for it.

Authentication

All MCP requests are authenticated via API key. Pass the key as a Bearer token in the Authorization header. Each API key is scoped to a single site and can be revoked at any time from your dashboard.

⚠️
Keep your API key secure. Anyone with your API key can read your analytics data. If you suspect a key has been compromised, revoke it immediately from Settings and generate a new one.