Skip to content

Cursor

Cursor

For Cursor, start with the Agent Analytics skill plus CLI-style workflows. In practice this is usually faster, cheaper on tokens, and easier to steer than MCP for day-to-day use.

  • An Agent Analytics account at app.agentanalytics.sh
  • Cursor installed
  • npx available in the environment Cursor uses
  • A valid Agent Analytics API key available as AGENT_ANALYTICS_API_KEY
Terminal window
npx skills add Agent-Analytics/agent-analytics-mcp
export AGENT_ANALYTICS_API_KEY=aak_...

This gives Cursor the Agent Analytics workflow layer plus CLI-oriented execution in the same environment. That is usually the best tradeoff when you want lower latency and less token overhead than MCP tool calls.

Ask Cursor:

  • List my Agent Analytics projects
  • How is my-site doing this week?
  • What are the top pages for my-site this week?

If you have not created your first real project yet, go back to Getting Started and do that next.

Use MCP in Cursor if you specifically want connector-style tool calls instead of skill + CLI execution.

  1. Open the Command Palette
  2. Search for MCP
  3. Choose Cursor Settings > Tools & MCP
  4. Click Add Custom MCP
  5. Add this to your mcp.json:
{
"mcpServers": {
"agent-analytics": {
"url": "https://mcp.agentanalytics.sh/mcp"
}
}
}

Save the file and reload Cursor if the tool list does not refresh automatically. MCP works, but it usually adds more latency and token overhead than the skill path.

If you want to bypass both the skill and MCP, call the hosted API directly:

Terminal window
curl "https://api.agentanalytics.sh/stats?project=my-site&since=7d" \
-H "X-API-Key: aak_..."

That lower-level path is useful for debugging auth, but the skill + CLI flow is the recommended installation for day-to-day Cursor usage.

  • If the skill installs but queries fail, confirm AGENT_ANALYTICS_API_KEY is available in the environment Cursor actually uses.
  • Confirm the mcp.json entry is valid JSON if you choose the MCP path.
  • Reload Cursor after adding the custom MCP server if the tools panel still shows the old state.
  • If Cursor can see the MCP server but not your projects, verify the hosted sign-in completed with the correct account.