Back to Browse

Productmetrics MCP Server

Developer ToolsModerate5.6MCP RegistryLocal
Free

Server data from the Official MCP Registry

PostHog projects, insights, flags and experiments as MCP tools.

About

PostHog projects, insights, flags and experiments as MCP tools.

Security Report

5.6
Moderate5.6Moderate Risk

productmetrics is a straightforward PostHog REST client that authenticates with a personal API key from an environment variable, sends it only as a Bearer header to the PostHog API, and exposes tools that match its analytics purpose. No exfiltration, hardcoded secrets, or shell execution were found. The main points to be aware of are that the API host can be overridden by environment variables, which would send the key to any configured host, and that the server can create and modify feature flags. Supply chain analysis found 4 known vulnerabilities in dependencies (0 critical, 2 high severity). Package verification found 1 issue.

8 files analyzed · 9 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

HTTP Network Access

Connects to external APIs or services over the internet.

env_vars

Check that this permission is expected for this type of plugin.

What You'll Need

Set these up before or after installing:

POSTHOG_API_KEYRequired
POSTHOG_PROJECT_IDRequired

How to Install

Add this to your MCP configuration file:

{
  "mcpServers": {
    "io-github-cloudcorprecords-productmetrics": {
      "env": {
        "POSTHOG_API_KEY": "your-posthog-api-key-here",
        "POSTHOG_PROJECT_ID": "your-posthog-project-id-here"
      },
      "args": [
        "-y",
        "@reneturcios/productmetrics"
      ],
      "command": "npx"
    }
  }
}

Documentation

View on GitHub

From the project's GitHub README.

productmetrics

PostHog product analytics as MCP tools, talking to the PostHog REST API. productmetrics is a clean-room rebuild of the core surface of the PostHog MCP server, under a new name: fresh code, no copied branding. The original is PostHog's hosted remote MCP (OAuth); hosted OAuth is NOT reproduced — this rebuild is a personal-API-key REST client for the same API.

Tools (core subset, 12)

list_projects, get_project, list_insights, get_insight, query_insight, run_hogql_query, list_feature_flags, get_feature_flag, create_feature_flag, update_feature_flag, list_experiments, get_experiment.

Not in this subset: events and persons, actions and cohorts, annotations, dashboards, data warehouse, error tracking, surveys, session recordings, subscriptions, and organization admin tools.

Setup

Create a personal API key in PostHog and set it:

export POSTHOG_API_KEY=phx_...
export POSTHOG_PROJECT_ID=12345   # optional default project

Optionally override the host with POSTHOG_HOST (for example the EU host) or the full base with POSTHOG_API_BASE_URL (default https://app.posthog.com/api). Without the key, every tool call fails with an error naming the missing variable. Pass project_id per call or rely on the POSTHOG_PROJECT_ID fallback.

CLI

npx @reneturcios/productmetrics list_projects '{}'
npx @reneturcios/productmetrics mcp        # stdio MCP server

Each tool name is a subcommand taking one JSON object argument.

MCP client config

{
  "mcpServers": {
    "productmetrics": {
      "command": "npx",
      "args": ["-y", "@reneturcios/productmetrics", "mcp"],
      "env": { "POSTHOG_API_KEY": "phx_..." }
    }
  }
}

Docker

docker run -i -e POSTHOG_API_KEY ghcr.io/cloudcorprecords/productmetrics

Development

npm install
npm run build
npm test

License

MIT

Reviews

No reviews yet

Be the first to review this server!