Skip to content
Clics privacy-friendly cookieless web analytics documentation
Esc
navigateopen⌘Jpreview
On this page

Add Clics MCP to VS Code for analytics and projects

Copy page

VS Code

Add the Clics local MCP server to VS Code for analytics queries and project management via MCP tools.

Connect Clics to VS Code through the built-in MCP integration. Your coding agent can query analytics and manage workspace objects from chat.

When to use this

Use VS Code + local MCP with GitHub Copilot, Claude Code for VS Code, or any extension that supports MCP tools in the editor.

Prerequisites

  • Node.js 18 or newer
  • VS Code 1.99+ with MCP support (or Copilot with MCP enabled)
  • A Clics API key from Settings → API keys

Config file

Scope How to open
Workspace Create .vscode/mcp.json in your project root
User Command Palette → MCP: Open User Configuration

VS Code uses the root key servers (not mcpServers).

Configuration

{
  "servers": {
    "clics": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@clicsdev/mcp"],
      "env": {
        "CLICS_API_KEY": "your_api_key"
      }
    }
  }
}

The type: "stdio" field is required for process-based MCP servers in VS Code.

Enable the server

  1. Save the config file
  2. Open the MCP panel or run MCP: List Servers
  3. Start or restart the clics server
  4. Confirm tools such as query_stats and list_projects appear

Example workflows

After a release

“Did traffic to /pricing increase in the last 48 hours compared to the week before?”

Goal setup

“Create a page goal for /onboarding/complete in my main project”

Funnel review

“Get my signup funnel and summarize conversion between each step”

Tips

  • Commit .vscode/mcp.json with a placeholder key and document that teammates set CLICS_API_KEY locally
  • Workspace config overrides user config for the same server name
  • If Copilot does not see tools, ensure MCP is enabled in Copilot settings

Troubleshooting

Problem Fix
Config ignored Use servers, not mcpServers
Server won’t start Confirm npx is on your PATH; test with CLICS_API_KEY=... npx -y @clicsdev/mcp
No tools in chat Reload the window (Developer: Reload Window) after first setup

Was this page helpful?