Skip to content

[CI] (e97a8e7) custom-dispatcher/hono-server - #3750

Closed
wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-e97a8e7-custom-dispatcher-hono-server
Closed

[CI] (e97a8e7) custom-dispatcher/hono-server#3750
wizard-ci-bot[bot] wants to merge 1 commit into
mainfrom
wizard-ci-e97a8e7-custom-dispatcher-hono-server

Conversation

@wizard-ci-bot

@wizard-ci-bot wizard-ci-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

Automated wizard CI run

Source: context-mill-pr
Trigger ID: e97a8e7
App: custom-dispatcher/hono-server
App directory: apps/custom-dispatcher/hono-server
Workbench branch: wizard-ci-e97a8e7-custom-dispatcher-hono-server
Wizard branch: codex/mcp-analytics-ci-region
Context Mill branch: codex/mcp-modern-capture-wizard
PostHog (MCP) branch: master
Timestamp: 2026-09-01T18:20:36.618Z
Duration: 160.9s

YARA Scanner

✓ 14 tool calls scanned, 0 violations detected

No violations: ✓ 14 clean scans

@wizard-ci-bot

wizard-ci-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown
Author

PR Evaluation Report

Summary

This PR adds PostHog MCP analytics to a Hono-based custom MCP dispatcher server. It correctly identifies the app as a "Path C" custom dispatcher and uses PostHogMCP from @posthog/mcp to capture initialize and tools/call events, with error tracking and graceful shutdown on SIGTERM.

Files changed Lines added Lines removed
4 +96 -2

Confidence score: 4/5 👍

  • .env committed with real API key: The .env file containing a real PostHog project token (phc_xxxx...CV6a) is present on disk. Although .gitignore was added, it only prevents future commits—the .env is not in the diff but exists locally. The report file also references phx_API_KEY_IS_HARDCODED which is misleading. No .env.example file was created. [MEDIUM]
  • No .env.example committed: Environment variables are documented only in the report markdown file, not in a standard .env.example that developers would expect. [LOW]

File changes

Filename Score Description
src/index.ts 5/5 Core PostHog MCP integration: PostHogMCP initialization, captureInitialize, captureToolCall (success + error), SIGTERM shutdown handler
package.json 5/5 Added @posthog/mcp and posthog-node dependencies
.gitignore 4/5 Added .env to gitignore—correct but no .env.example committed
posthog-mcp-analytics-report.md 4/5 Detailed setup report documenting the integration path, events, and env vars

App sanity check ✅

Criteria Result Description
App builds and runs Yes TypeScript compiles, imports are valid, PostHogMCP used correctly
Preserves existing env vars & configs Yes Existing app code and JSON-RPC handling preserved unchanged
No syntax or type errors Yes All TypeScript is valid; optional chaining on posthog?. handles null case
Correct imports/exports Yes PostHogMCP imported from @posthog/mcp, correct package
Minimal, focused changes Yes Only PostHog-related additions; no scope creep
Pre-existing issues None Base app is clean

Issues

  • No .env.example file: Env vars are documented in the report markdown but no .env.example was committed for developer onboarding. [LOW]

Other completed criteria

  • Build configuration valid — package.json scripts and dependencies are correct
  • Graceful degradation — posthog is null when token is missing in production; throws helpfully in development
  • SIGTERM handler ensures events are flushed before process exit

PostHog implementation ✅

Criteria Result Description
PostHog SDKs installed Yes posthog-node@^5.51.6 and @posthog/mcp@^0.12.0 added to package.json
PostHog client initialized Yes new PostHogMCP(token, { host, enableExceptionAutocapture: true }) — correct Path C pattern
capture() Yes captureInitialize() on initialize, captureToolCall() on every tools/call
identify() N/A Server-only MCP app
Error tracking Yes enableExceptionAutocapture: true in config; error path captures with isError: true and the error object
Reverse proxy N/A Server-only app using posthog-node

Issues

No critical or medium issues.

Other completed criteria

  • API key loaded from POSTHOG_PROJECT_TOKEN env var — not hardcoded in source
  • Host loaded from POSTHOG_HOST env var with correct default
  • Shutdown handler (posthog?.shutdown()) on SIGTERM ensures event delivery
  • Both success and error paths for tools/call are instrumented

PostHog insights and events ✅

Filename PostHog events Description
src/index.ts `` Captures MCP client handshake with client name, version, and protocol version
src/index.ts `` Captures every tool invocation with tool name, parameters, response, duration, and error status
src/index.ts `` (via enableExceptionAutocapture) Automatic exception capture for unhandled errors

Issues

No issues.

Other completed criteria

  • Events represent real MCP protocol actions (initialize handshake, tool calls)
  • Events enable product insights — can build funnels (initialize → tool calls), track error rates, measure latency distributions
  • Events enriched with meaningful properties: toolName, parameters, response, durationMs, isError
  • No PII in event properties — only tool names, arguments, and protocol metadata
  • Event naming follows PostHog MCP conventions (, )

Reviewed by wizard workbench PR evaluator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants