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.
Prerequisites
Section titled “Prerequisites”- An Agent Analytics account at app.agentanalytics.sh
- Cursor installed
npxavailable in the environment Cursor uses- A valid Agent Analytics API key available as
AGENT_ANALYTICS_API_KEY
Recommended: install the agent skill
Section titled “Recommended: install the agent skill”npx skills add Agent-Analytics/agent-analytics-mcpexport 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.
Verify the install
Section titled “Verify the install”Ask Cursor:
List my Agent Analytics projectsHow 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.
Alternative: add a custom MCP server
Section titled “Alternative: add a custom MCP server”Use MCP in Cursor if you specifically want connector-style tool calls instead of skill + CLI execution.
- Open the Command Palette
- Search for
MCP - Choose Cursor Settings > Tools & MCP
- Click Add Custom MCP
- 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.
Lower-level fallback: direct API
Section titled “Lower-level fallback: direct API”If you want to bypass both the skill and MCP, call the hosted API directly:
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.
Troubleshooting
Section titled “Troubleshooting”- If the skill installs but queries fail, confirm
AGENT_ANALYTICS_API_KEYis available in the environment Cursor actually uses. - Confirm the
mcp.jsonentry 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.