{"_id":"@bossforce.ai/mcp-posthog","name":"@bossforce.ai/mcp-posthog","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@bossforce.ai/mcp-posthog","version":"0.1.0","type":"module","repository":{"type":"git","url":"git+https://github.com/bossforce-ai/bossforce-tools.git","directory":"mcps/analytics/posthog"},"publishConfig":{"access":"public"},"bin":{"bossforce-mcp-posthog":"dist/bin.js"},"dependencies":{"zod":"^4.4.3","@bossforce.ai/mcp-core":"0.3.0"},"devDependencies":{"@bossforce.ai/mcp-testkit":"0.0.0"},"scripts":{"build":"tsc -p tsconfig.json","test":"node --test \"dist/*.test.js\""},"_id":"@bossforce.ai/mcp-posthog@0.1.0","description":"MCP server for the **PostHog** API. List projects, run HogQL queries, list saved insights, and capture custom events. A good fit for pulling product-analytics data into an agent and recording events.","bugs":{"url":"https://github.com/bossforce-ai/bossforce-tools/issues"},"homepage":"https://github.com/bossforce-ai/bossforce-tools#readme","_integrity":"sha512-CEUGe3kymP6IC6ExavsWfuc1ecIzsXxd2vjbNlHQ/g/cnikISvZRZFac38l3eBbT3bppxQfKB45lib0bVTv8sA==","_resolved":"C:\\Users\\user\\AppData\\Local\\Temp\\d32019a94ffcb6a0d89536d787f4bceb\\bossforce.ai-mcp-posthog-0.1.0.tgz","_from":"file:bossforce.ai-mcp-posthog-0.1.0.tgz","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-CEUGe3kymP6IC6ExavsWfuc1ecIzsXxd2vjbNlHQ/g/cnikISvZRZFac38l3eBbT3bppxQfKB45lib0bVTv8sA==","shasum":"f7ec0e341caea764cbadd618e26ed4216f7a96b6","tarball":"https://registry.npmjs.org/@bossforce.ai/mcp-posthog/-/mcp-posthog-0.1.0.tgz","fileCount":26,"unpackedSize":25552,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCqdZu8Gqu17rD1/T53ScOl3Hek10b47Uw92eJ1GzsMRAIgNTPutRIj5brkJBj5E8/LkaOJXwQoA3YnsCCC9EisRxg="}]},"_npmUser":{"name":"bossforce.ai","email":"bossforce.ai@gmail.com"},"directories":{},"maintainers":[{"name":"bossforce.ai","email":"bossforce.ai@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-posthog_0.1.0_1781069221099_0.8583869832821271"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-10T05:27:00.955Z","0.1.0":"2026-06-10T05:27:01.243Z","modified":"2026-06-10T05:27:01.532Z"},"maintainers":[{"name":"bossforce.ai","email":"bossforce.ai@gmail.com"}],"description":"MCP server for the **PostHog** API. List projects, run HogQL queries, list saved insights, and capture custom events. A good fit for pulling product-analytics data into an agent and recording events.","homepage":"https://github.com/bossforce-ai/bossforce-tools#readme","repository":{"type":"git","url":"git+https://github.com/bossforce-ai/bossforce-tools.git","directory":"mcps/analytics/posthog"},"bugs":{"url":"https://github.com/bossforce-ai/bossforce-tools/issues"},"readme":"# @bossforce.ai/mcp-posthog\n\nMCP server for the **PostHog** API. List projects, run HogQL queries, list saved\ninsights, and capture custom events. A good fit for pulling product-analytics\ndata into an agent and recording events.\n\n## Credentials\n\n| Env                        | How to obtain                                                                                                                      |\n| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |\n| `POSTHOG_HOST`             | Region API host: `https://us.posthog.com` or `https://eu.posthog.com` (or your self-hosted URL). Optional — defaults to US Cloud.  |\n| `POSTHOG_PERSONAL_API_KEY` | Personal API key (`phx_…`) from **Settings > Personal API keys**, with the `project:read`, `query:read` and `insight:read` scopes. |\n| `POSTHOG_PROJECT_API_KEY`  | Project API token (`phc_…`) from **Settings > Project**. Only needed for `capture_event`.                                          |\n\nReads authenticate with the personal API key as a `Bearer` token against the\nprivate host (`POSTHOG_HOST`). Credentials are read lazily, so the server boots\nand answers `tools/list` without them; calls fail with an `auth` error until the\nrequired key is set.\n\n## Tools\n\n| Tool            | Arguments                                           | Returns                         |\n| --------------- | --------------------------------------------------- | ------------------------------- |\n| `list_projects` | —                                                   | `{ count, next, results }`      |\n| `query`         | `project_id`, `query`                               | HogQL `{ columns, results, … }` |\n| `list_insights` | `project_id`, `search?`, `limit?`, `offset?`        | `{ count, next, results }`      |\n| `capture_event` | `event`, `distinct_id`, `properties?`, `timestamp?` | ingestion acknowledgement       |\n\nResponses are PostHog's native JSON payloads, returned as `structuredContent`.\n\n### Project id and event capture\n\n`query` and `list_insights` are project-scoped: call `list_projects` first to get\nthe numeric `project_id`. `query` wraps your statement as\n`{ query: { kind: \"HogQLQuery\", query } }`.\n\n`capture_event` is different: it posts to the public ingestion host (the same\nhost with an `.i.` infix, e.g. `us.i.posthog.com`) and authenticates with the\n**project** API token (`POSTHOG_PROJECT_API_KEY`) sent in the request body — not\nthe personal key.\n\n## Develop\n\n```bash\npnpm --filter @bossforce.ai/mcp-posthog build\npnpm --filter @bossforce.ai/mcp-posthog test\n```\n\nRegenerate the tools/list snapshot after an intentional signature change:\n\n```bash\nUPDATE_SNAPSHOTS=1 pnpm --filter @bossforce.ai/mcp-posthog test\n```\n","readmeFilename":"README.md","_rev":"1-6b195bf155bf6f53efad713c45b603ab"}