Skip to content

[CI] (3f39e0e) custom-dispatcher/hono-server - #4183

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

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

Conversation

@wizard-ci-bot

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

Copy link
Copy Markdown

Automated wizard CI run

Source: wizard-pr
Trigger ID: 3f39e0e
App: custom-dispatcher/hono-server
App directory: apps/custom-dispatcher/hono-server
Workbench branch: wizard-ci-3f39e0e-custom-dispatcher-hono-server
Wizard branch: release-please--branches--main--components--wizard
Context Mill branch: main
PostHog (MCP) branch: master
Timestamp: 2026-09-23T22:26:23.804Z
Duration: 278.4s

YARA Scanner

✓ 30 tool calls scanned, 0 violations detected

No violations: ✓ 30 clean scans

@wizard-ci-bot

wizard-ci-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown
Author

Now I have all the information I need. Let me produce the evaluation report.


PR Evaluation Report

Summary

This PR integrates PostHog MCP analytics into a custom Hono-based MCP JSON-RPC dispatcher using the @posthog/mcp SDK (Path C — custom dispatcher without @modelcontextprotocol/sdk). It instruments initialize, tools/list, and tools/call handlers with rich analytics context including duration, error state, intent, and model metadata, and adds graceful shutdown on SIGTERM.

Files changed Lines added Lines removed
4 +129 -16

Confidence score: 5/5 🧙

No critical or medium issues found. This is a clean, well-structured MCP analytics integration that correctly uses the @posthog/mcp SDK for a custom dispatcher.


File changes

Filename Score Description
src/index.ts 5/5 Initializes PostHogMCP, instruments all three MCP protocol methods with analytics, adds SIGTERM shutdown handler
package.json 5/5 Adds pinned @posthog/mcp (0.18.0) and posthog-node (5.53.0) dependencies
.gitignore 5/5 Adds .env to prevent committing secrets
posthog-mcp-analytics-report.md 5/5 Comprehensive setup report documenting changes and manual next steps

App sanity check ✅

Criteria Result Description
App builds and runs Yes TypeScript compiles via tsc --noEmit; all imports resolve to installed packages
Preserves existing env vars & configs Yes Original tool definitions, runTool function, and Hono route structure are preserved intact
No syntax or type errors Yes Valid TypeScript throughout; proper type assertions and optional chaining
Correct imports/exports Yes @posthog/mcp and @hono/node-server correctly imported; no browser-only imports on server
Minimal, focused changes Yes Only PostHog MCP analytics instrumentation added; no unrelated refactors
Pre-existing issues None Base app is a clean MCP dispatcher scaffold

Issues

No issues found.

Other completed criteria

  • Environment variables documented in posthog-mcp-analytics-report.md with manual next steps
  • .gitignore updated to prevent .env from being committed
  • Build configuration remains valid (tsc --noEmit for build, tsx for runtime)

PostHog implementation ✅

Criteria Result Description
PostHog SDKs installed Yes @posthog/mcp 0.18.0 and posthog-node 5.53.0 added to package.json with pinned versions
PostHog client initialized Yes PostHogMCP initialized at module scope with captureModel: true and enableConversationId: false
capture() Yes captureInitialize, captureToolsList, and captureToolCall cover all MCP protocol methods
identify() N/A Server-only MCP dispatcher — no user-facing sessions
Error tracking Yes Tool call errors captured via captureToolCall with isError: true and the error object
Reverse proxy N/A Server-only app using posthog-node — no browser ad-blocker concerns

Issues

No issues found.

Other completed criteria

  • API key loaded from process.env.POSTHOG_PROJECT_TOKEN (not hardcoded)
  • Host loaded from process.env.POSTHOG_HOST (not hardcoded)
  • Graceful shutdown via process.on('SIGTERM') ensures events are flushed
  • prepareToolCall strips SDK-owned analytics arguments before passing to runTool
  • prepareToolList augments tool schemas for intent/model capture
  • Protocol version, session ID, user agent, and vendor client headers extracted as analytics context
  • captureInitialize gated to 2025-11-25 protocol version handshakes only

PostHog insights and events ✅

Filename PostHog events Description
src/index.ts `` Captures MCP handshake with client info, protocol version, and parameters
src/index.ts `` Captures tool listing with tool names and response
src/index.ts `` Captures each tool invocation with name, description, parameters, response, duration, error state, intent, and LLM model metadata

Issues

No issues found.

Other completed criteria

  • Events represent real MCP protocol actions (initialize, tools/list, tools/call)
  • Events enable product insights: tool-call volume, error rates, p95 latency, model distribution
  • Events enriched with duration_ms, tool description, sanitized parameters/response, intent, intent source, LLM model, and model source
  • No PII in event properties — only protocol-level metadata
  • Event naming follows PostHog MCP conventions (* prefix)

Reviewed by wizard workbench PR evaluator

@wizard-ci-bot wizard-ci-bot Bot added the CI/CD label Sep 23, 2026
@wizard-ci-bot wizard-ci-bot Bot closed this Sep 23, 2026
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