# exploring-mcp-sessions

exploring-mcp-sessions investigates PostHog MCP sessions to inspect tool call sequences, agent intent, and run failures.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 202 installs · ★ 101 repo stars
- Author: PostHog
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/exploring-mcp-sessions/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/exploring-mcp-sessions

## What it does

The skill inspects individual agent executions recorded as `$mcp_tool_call` events in PostHog. It relies on typed `posthog:mcp-analytics-*` tools to inspect session history, pull sequential actions, and summarize the overall goal with an LLM. When typed tools are missing or when analyzing cross-session error patterns, it falls back to HogQL via `posthog:execute-sql`.

A key catch is the 7-day default lookback window in the detailed tools. Querying an older session yields empty results unless its `session_start` timestamp is supplied to `date_from`. In addition, list rows lack error flags, so tracking down broken runs requires executing SQL queries with `countIf(toBool(properties.$mcp_is_error))`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill exploring-mcp-sessions -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/exploring-mcp-sessions/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/exploring-mcp-sessions/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill exploring-mcp-sessions -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/exploring-mcp-sessions/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill exploring-mcp-sessions -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/exploring-mcp-sessions/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install PostHog/ai-plugin skills/exploring-mcp-sessions
```

2. **Manually: put the files in place**
- File: `.github/skills/exploring-mcp-sessions/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill exploring-mcp-sessions -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/PostHog/ai-plugin --path skills/exploring-mcp-sessions
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/exploring-mcp-sessions/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill exploring-mcp-sessions -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/exploring-mcp-sessions/SKILL.md

## When to use it
- reconstruct chronological tool calls for a specific agent run
- identify failing MCP sessions and error messages
- generate a goal summary from agent intent records
- audit client names and users interacting with MCP endpoints

## Example prompts
- Show tool calls for session `019283-abc`
- Which MCP sessions ran into errors over the last 3 days?
- Summarize what the agent was trying to achieve in session `019283-def`

## Similar
- [finding-sessions-to-watch](https://affpapa.org/en/nevibecode/skills/finding-sessions-to-watch.md) — skill · 327 installs
- [exploring-llm-traces](https://affpapa.org/en/nevibecode/skills/exploring-llm-traces.md) — skill · 440 installs
- [posthog](https://affpapa.org/en/nevibecode/plugins/posthog-inc-posthog.md) — plugin · ★ 8052 repo stars
- [seo-posthog](https://affpapa.org/en/nevibecode/skills/seo-posthog.md) — skill · 141 installs
- [posthog-webhooks-events](https://affpapa.org/en/nevibecode/skills/posthog-webhooks-events.md) — skill · 1 install
- [posthog-analytics](https://affpapa.org/en/nevibecode/skills/posthog-analytics.md) — skill · 827 installs

From the same set: [posthog/ai-plugin](https://affpapa.org/en/nevibecode/by/posthog/ai-plugin.md) — 82 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
