---
title: MCP
description: "Connect Clics to AI assistants through the Clics plugin, a remote connector, or local MCP."
sidebar:
  label: Get Started
seo:
  title: Connect Clics analytics to AI assistants
---

Clics gives AI assistants access to your analytics workspace. They can query stats, list projects, inspect sessions, and manage goals and funnels without opening the dashboard.

## Choose your setup

|                   | **Clics plugin**           | **Remote connector**     | **Local MCP**                                     |
| ----------------- | -------------------------- | ------------------------ | ------------------------------------------------- |
| **Best for**      | ChatGPT and Codex          | Claude on the web        | Cursor, VS Code, Claude Code, and terminal agents |
| **Setup**         | Install Clics from Plugins | Add the Clics server URL | Run `@clicsdev/mcp` on your machine               |
| **Access**        | Sign in to Clics           | Sign in to Clics         | Use `CLICS_API_KEY`                               |
| **Local install** | None                       | None                     | Node.js 18+ recommended                           |

All three options expose the **same Clics tools** against your workspace.

## Clics plugin

Use the Clics plugin in OpenAI products. Search for **Clics**, add the plugin, click **Connect**, and sign in.

**Setup guides:**

- [ChatGPT](/mcp/chatgpt)
- [Codex](/mcp/codex)

## Remote MCP (web clients)

Use the remote connector with Claude on the web.

**Server URL:**

```
https://api.clics.dev/v1/mcp
```

Name the connector **Clics**, enter the server URL, click **Add**, and then sign in to Clics. Leave optional advanced connection fields empty.

**Setup guides:**

- [Claude web](/mcp/claude)
- [n8n](/mcp/n8n)
- [Zapier](/mcp/zapier)
- [Make](/mcp/make)

## Local MCP (editors and CLI)

Use local MCP when you work in an IDE or terminal agent. The `@clicsdev/mcp` package runs as a stdio server and calls `https://api.clics.dev` with your API key.

**Quick start:**

```bash
CLICS_API_KEY=your_api_key npx -y @clicsdev/mcp
```

For daily use, add the server to your editor config (see guides below) so it starts automatically.

**Base config** (Cursor, Windsurf, Claude Desktop, and most editors):

```json
{
  "mcpServers": {
    "clics": {
      "command": "npx",
      "args": ["-y", "@clicsdev/mcp"],
      "env": {
        "CLICS_API_KEY": "your_api_key"
      }
    }
  }
}
```

**Setup guides:**

- [Cursor](/mcp/cursor)
- [VS Code](/mcp/vscode)
- [Windsurf](/mcp/windsurf)
- [Antigravity](/mcp/antigravity)
- [OpenCode](/mcp/opencode)
- [Claude Desktop](/mcp/claude-desktop)
- [Claude Code](/mcp/claude-code)

## Available tools

| Category      | Tools                                                                                |
| ------------- | ------------------------------------------------------------------------------------ |
| **Projects**  | `list_projects`, `get_project`, `create_project`, `update_project`, `delete_project` |
| **Goals**     | `list_goals`, `create_goal`, `update_goal`, `delete_goal`                            |
| **Funnels**   | `list_funnels`, `get_funnel`, `create_funnel`, `update_funnel`, `delete_funnel`      |
| **Sessions**  | `list_sessions`, `get_session`, `list_session_events`                                |
| **Analytics** | `query_stats` (same body as the [Stats API](/reference))                             |

### Example prompts

Once connected, you can ask natural-language questions. The assistant picks the right tool:

- "How many visitors did my site get in the last 7 days?"
- "List my projects and their domains"
- "Create a page goal for `/pricing`"
- "Show conversion rates for my signup funnel"
- "What are my top landing pages this month?"
- "List the last 20 sessions and open the longest non-bounce visit"

## Get an API key for local MCP

1. Open the [Clics dashboard](https://platform.clics.dev)
2. Go to **Settings → API keys**
3. Create a key with the permissions you need
4. Copy it immediately (it is shown only once)

Revoke keys you no longer use. For local MCP, prefer environment variables over hardcoding keys in config files you commit to git.

## Troubleshooting

| Issue                           | What to check                                                                               |
| ------------------------------- | ------------------------------------------------------------------------------------------- |
| **401 / invalid key**           | For local MCP, confirm the key is correct and active                                        |
| **Remote connector fails**      | Confirm the URL is exactly `https://api.clics.dev/v1/mcp`, then reconnect and sign in again |
| **Local server does not start** | Node.js 18+, `npx` available, `CLICS_API_KEY` set in `env`                                  |
| **Tools not visible**           | Restart the editor or reload MCP servers after config changes                               |
| **Empty stats**                 | Project has received traffic; date range and `project_id` are correct                       |
