io.github.CloudCorpRecords/productmetrics
PostHog projects, insights, flags and experiments as MCP tools.
التثبيت
أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: .cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).
@reneturcios/productmetricsclaude mcp add productmetrics -- npx -y @reneturcios/productmetrics@0.1.0 mcp
{
"mcpServers": {
"productmetrics": {
"command": "npx",
"args": [
"-y",
"@reneturcios/productmetrics@0.1.0",
"mcp"
]
}
}
}
ghcr.io/cloudcorprecords/productmetrics:0.1.0claude mcp add productmetrics -- docker run -i --rm ghcr.io/cloudcorprecords/productmetrics:0.1.0 mcp
{
"mcpServers": {
"productmetrics": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/cloudcorprecords/productmetrics:0.1.0",
"mcp"
]
}
}
}
التوثيق
مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.
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
الأسئلة الشائعة
ما هو io.github.CloudCorpRecords/productmetrics؟
PostHog projects, insights, flags and experiments as MCP tools.
كيف أثبّت io.github.CloudCorpRecords/productmetrics؟
يعمل على جهازك. في Claude Code: claude mcp add productmetrics -- npx -y @reneturcios/productmetrics@0.1.0 mcp. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.
هل يحتاج io.github.CloudCorpRecords/productmetrics إلى مفتاح API؟
لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.
هل io.github.CloudCorpRecords/productmetrics مفتوح المصدر؟
نعم. شيفرته متاحة على GitHub بترخيص MIT.
من يصون io.github.CloudCorpRecords/productmetrics؟
ينشره CloudCorpRecords. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.
من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.