Claude Code
Claude Code
Use the skill path first before dropping to raw MCP setup.
Prerequisites
Section titled “Prerequisites”- Claude Code installed locally
- Access to the Google or GitHub sign-in you want to connect when Claude Code opens browser approval
Recommended: install the Claude Code skill
Section titled “Recommended: install the Claude Code skill”npx skills add agent-analytics/skillsThis path teaches Claude Code how to set up tracking, query analytics, and run experiments. It uses browser approval, agent sessions, and human-owned upgrade handoffs by default.
Verify the install
Section titled “Verify the install”Ask Claude Code:
Set up Agent Analytics for this project. Install it here if needed. Open the browser for me or give me a login link, then wait. I will sign in with Google or GitHub, approve it, and paste back any finish code if you need it. Then create the project, add tracking and key events, and verify the first event.List my Agent Analytics projectsHow is my-site doing this week?What are the top pages for my-site this week?
If the skill is working, Claude Code should be able to reach your account without asking you to hand-roll HTTP requests.
If you have not created your first real project yet, continue with First Project in 5 Minutes.
Lower-level fallback: add only the MCP server
Section titled “Lower-level fallback: add only the MCP server”If you want the MCP server without the skill layer:
claude mcp add agent-analytics --transport http https://mcp.agentanalytics.sh/mcpUse --transport http. The hosted MCP server is not configured for legacy SSE transport.
Troubleshooting
Section titled “Troubleshooting”- Make sure Claude Code completes browser approval with the same GitHub or Google account you want connected to Agent Analytics.
- If the skill pauses on approval, complete the browser sign-in and let Claude Code continue.
- If you intentionally use a compatibility API key for direct HTTP debugging, confirm the environment exposes
AGENT_ANALYTICS_API_KEY. - If the MCP command fails, verify you used
--transport http.