Atlas / MCP servers / posthog / PostHog

PostHogBLOCK

mcp/posthog/posthog-1

Official PostHog MCP Server 🦔

Verdict
BLOCK
Grade
D
Trust score
69 /100
Exposed tools
3 3r · 0w · 0d
Transport
streamable-http
License
MIT
Stars
151
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

The MCP server has been moved into the PostHog Monorepo - you can find it here.

Documentation: https://posthog.com/docs/model-context-protocol

Use the MCP Server

Quick install

You can install the MCP server automatically into Cursor, Claude, Claude Code, VS Code and Zed by running the following command:

npx @posthog/wizard@latest mcp add
Read from source at commit 1aeb7559b341OBSERVED · 2026-10-07
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add agent-toolkit --env OPENAI_API_KEY=${OPENAI_API_KEY} --env POSTHOG_PERSONAL_API_KEY=${POSTHOG_PERSONAL_API_KEY} --env TEST_POSTHOG_PERSONAL_API_KEY=${TEST_POSTHOG_PERSONAL_API_KEY} -- npx -y @posthog/[email protected]
claude-desktop
{
  "mcpServers": {
    "agent-toolkit": {
      "command": "npx",
      "args": [
        "-y",
        "@posthog/[email protected]"
      ],
      "env": {
        "OPENAI_API_KEY": "${OPENAI_API_KEY}",
        "POSTHOG_PERSONAL_API_KEY": "${POSTHOG_PERSONAL_API_KEY}",
        "TEST_POSTHOG_PERSONAL_API_KEY": "${TEST_POSTHOG_PERSONAL_API_KEY}"
      }
    }
  }
}
03

Exposed tools (3)

3 read · 0 write · 0 destructive.

ToolRiskDescription
button_clickreadButton click rate
engagementreadUser engagement ratio
purchasereadAverage revenue
04

Trust audit

BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeFAIL
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (2 observation(s))
Network
declared (5 observation(s))
Shell
declared (3 observation(s))
Dependencies
not all pinned
Secrets in source
none-found

Findings (13)

HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
typescript/worker-configuration.d.ts:2222
exec(input?: (string | URLPatternInit), baseURL?: string): URLPatternResult | null;
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
typescript/worker-configuration.d.ts:4657
exec(query: string): Promise<D1ExecResult>;
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
LOWInventory / provenance · inv.hidden_file · CWE-1104
.release-please-config.json
.release-please-config.json
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
.release-please-manifest.json
.release-please-manifest.json
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.hidden_file · CWE-1104
typescript/.env.test.example
.env.test.example
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
typescript/scripts/generate-tool-schema.ts:10
const outputPath = path.join(__dirname, "../../schema/tool-inputs.json");
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
typescript/src/tools/toolDefinitions.ts:2
import toolDefinitionsJson from "../../../schema/tool-definitions.json";
LOWObfuscation / stealth · obf.decode_call · CWE-506, CWE-94
typescript/worker-configuration.d.ts:207
atob(data: string): string;
LOWObfuscation / stealth · obf.decode_call · CWE-506, CWE-94
typescript/worker-configuration.d.ts:293
declare function atob(data: string): string;
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
examples/ai-sdk/package.json
@ai-sdk/openai, @posthog/agent-toolkit, ai, dotenv, zod, @types/node, tsx, typescript
Why it matters. 8 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
examples/langchain-js/package.json
@langchain/core, @langchain/openai, @posthog/agent-toolkit, dotenv, langchain, zod, @types/node, tsx
Why it matters. 9 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
husky, tsx
Why it matters. 2 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
typescript/package.json
@modelcontextprotocol/sdk, agents, ai, posthog-node, uuid, zod, @langchain/core, @langchain/openai
Why it matters. 21 dependency range(s) float
Fix. pin exact versions or ship a lockfile

Gates applied: no_behavioural_pass.

Audited 2026-10-07 · audit v0.4.1 · source sha 1aeb7559b341full audit observations/trust-audit/mcp-server/posthog__posthog-1.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-071aeb7559b341BLOCKD69first audit
06

Questions

What is the PostHog MCP server?

Official PostHog MCP Server 🦔

What tools does PostHog expose?

3 in total: 3 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.

Is PostHog safe to connect to an agent?

No — not without reading the findings first. The audit graded it D (69/100) and found 2 critical or high issues in the source. Each one is listed on this page with the file and line it is on.

What credentials does PostHog need?

It reads OPENAI_API_KEY, POSTHOG_PERSONAL_API_KEY and TEST_POSTHOG_PERSONAL_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does PostHog run?

It speaks streamable-http, so it runs as a service you connect to over the network. It is published on npm as @posthog/agent-toolkit at 0.2.2.

How current is this page?

The grade is for one exact copy of the source (1aeb7559b341), read on 2026-10-07. The repository is watched and re-audited when it changes.

Advertisement