PostHog Analytics リモートMCPを Cline にMCP接続する方法(設定手順)
PostHog のリモートMCPサーバーを Cline に約1分でMCP接続。OAuth / 401 の問題は先に OAuth 2.1 デバッガーで確認できます。
🔒 Client-side only — never leaves your browser.
Or add to ~/.cursor/mcp.json:
{
"mcpServers": {
"posthog": {
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}claude mcp add --transport http posthog https://mcp.posthog.com/mcp
With credential header:
claude mcp add --transport http posthog https://mcp.posthog.com/mcp --header "Authorization: Bearer YOUR_API_KEY"
Or add to .vscode/mcp.json:
{
"servers": {
"posthog": {
"type": "http",
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}- Open Settings → Connectors (Integrations) → Add Custom Connector.
- Paste the endpoint URL:
https://mcp.posthog.com/mcp - Provide your API key / Bearer token when prompted.
Bridge the remote endpoint into stdio with mcp-remote in claude_desktop_config.json:
{
"mcpServers": {
"posthog": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.posthog.com/mcp",
"--header",
"Authorization: Bearer YOUR_API_KEY"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"posthog": {
"serverUrl": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to ~/.kiro/settings/mcp.json (or .kiro/settings/mcp.json in your workspace), then reopen Kiro's Agent panel to pick up the server:
{
"mcpServers": {
"posthog": {
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to ~/.codex/config.toml — Codex reads remote HTTP servers from [mcp_servers.*] tables:
[mcp_servers.posthog] url = "https://mcp.posthog.com/mcp" bearer_token_env_var = "POSTHOG_TOKEN"
Add to cline_mcp_settings.json (Cline → MCP Servers → Configure), or paste it via Cline's MCP marketplace file:
{
"mcpServers": {
"posthog": {
"type": "streamableHttp",
"url": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}Add to ~/.gemini/settings.json under mcpServers — httpUrl for Streamable HTTP, url for legacy SSE:
{
"mcpServers": {
"posthog": {
"httpUrl": "https://mcp.posthog.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY"
}
}
}
}接続手順
- Cline の MCP 設定を開く — Cline サイドバー → MCP Servers →
cline_mcp_settings.jsonを編集します。 - サーバーを追加 —
"posthog": { "type": "streamableHttp", "url":https://mcp.posthog.com/mcp}を記述します。 - 認証を完了 — PostHog のコンソールで資格情報を取得し、設定の
Authorization: Bearer <キー>ヘッダーに追加します。 - 検証 — オンライン Inspector に
https://mcp.posthog.com/mcpを貼り付け、initialize と tools/list を実行して接続を確認します。
🧰 ツール一覧(39)
| Tool | Safety | Description | Parameters |
|---|---|---|---|
| organizations-get ~30 tok | 🟢 Read | List PostHog organizations. | — |
| projects-get ~28 tok | 🟢 Read | List PostHog projects. | — |
| project-get ~30 tok | 🟢 Read | Get details of a PostHog project. | — |
| project-property-definitions ~36 tok | 🟢 Read | List property definitions of a project. | — |
| docs-search ~29 tok | 🟢 Read | Search PostHog documentation. | — |
| query-run ~31 tok | 🟢 Read | Run a HogQL query against project data. | — |
| list-errors ~32 tok | 🟢 Read | List captured error-tracking exceptions. | — |
| error-details ~33 tok | 🟢 Read | Get details of an error-tracking exception. | — |
| dashboards-get-all ~30 tok | 🟢 Read | List PostHog dashboards. | — |
| dashboard-get ~29 tok | 🟢 Read | Get details of a dashboard. | — |
| dashboard-create ~30 tok | 🟠 Write | Create a PostHog dashboard. | — |
| dashboard-update ~28 tok | 🟠 Write | Update a dashboard. | — |
| dashboard-delete ~28 tok | 🔴 Destructive | Delete a dashboard. | — |
| dashboard-reorder-tiles ~31 tok | 🟠 Write | Reorder dashboard tiles. | — |
| insights-get-all ~29 tok | 🟢 Read | List PostHog insights. | — |
| insight-get ~29 tok | 🟢 Read | Get details of an insight. | — |
| insight-create-from-query ~33 tok | 🟠 Write | Create an insight from a query. | — |
| insight-update ~30 tok | 🟠 Write | Update an existing insight. | — |
| insight-delete ~27 tok | 🔴 Destructive | Delete an insight. | — |
| insight-query ~32 tok | 🟢 Read | Run an insight query and get results. | — |
| experiments-get-all ~31 tok | 🟢 Read | List A/B test experiments. | — |
| experiment-get ~30 tok | 🟢 Read | Get details of an experiment. | — |
| experiment-create ~29 tok | 🟠 Write | Create an experiment. | — |
| experiment-update ~29 tok | 🟠 Write | Update an experiment. | — |
| experiment-delete ~29 tok | 🔴 Destructive | Delete an experiment. | — |
| experiment-results-get ~35 tok | 🟢 Read | Get statistical results of an experiment. | — |
| feature-flag-get-all ~29 tok | 🟢 Read | List feature flags. | — |
| feature-flag-get-definition ~34 tok | 🟢 Read | Get a feature flag definition. | — |
| feature-flag-create ~30 tok | 🟠 Write | Create a feature flag. | — |
| feature-flag-update ~30 tok | 🟠 Write | Update a feature flag. | — |
| feature-flag-delete ~30 tok | 🔴 Destructive | Delete a feature flag. | — |
| surveys-get-all ~28 tok | 🟢 Read | List PostHog surveys. | — |
| survey-create ~27 tok | 🟠 Write | Create a survey. | — |
| survey-update ~27 tok | 🟠 Write | Update a survey. | — |
| survey-delete ~27 tok | 🔴 Destructive | Delete a survey. | — |
| llm-get-costs ~31 tok | 🟢 Read | Get LLM observability cost metrics. | — |
| cohorts-get-all ~26 tok | 🟢 Read | List cohorts. | — |
| cohort-get ~28 tok | 🟢 Read | Get details of a cohort. | — |
| cohort-create ~27 tok | 🟠 Write | Create a cohort. | — |