Repository navigation
[CI] (8dccaac) custom-dispatcher/hono-server - #2368
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
wizard-ci-bot[bot] wants to merge 1 commit into
Conversation
Author
PR Evaluation ReportSummaryThis PR integrates PostHog MCP analytics into a custom Hono-based MCP dispatcher server. It uses
Confidence score: 5/5 🧙
File changes
App sanity check ✅
Issues
|
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-node@^5.39.4 and @posthog/mcp@0.7.0 added to dependencies |
| PostHog client initialized | Yes | new PostHogMCP(apiKey, { host }) at module scope with env vars |
| capture() | Yes | captureInitialize and captureToolCall called at appropriate dispatch points |
| identify() | N/A | Server-only app — MCP sessions tracked via sessionId header |
| Error tracking | Yes | Failed tool calls captured with isError: true and error property passed to captureToolCall |
| Reverse proxy | N/A | Server-only app — no browser-side ad-blocker concerns |
Issues
- Unsafe env var access:
process.env.POSTHOG_PROJECT_API_KEY!uses non-null assertion. If unset,undefinedis passed as the API key, which could cause silent failures or runtime errors. Consider adding a startup check:if (!process.env.POSTHOG_PROJECT_API_KEY) throw new Error('...'). [LOW]
Other completed criteria
- API key correctly loaded from
process.env.POSTHOG_PROJECT_API_KEY - Host correctly loaded from
process.env.POSTHOG_HOST - Graceful shutdown with
posthog.shutdown()on SIGTERM ensures event flush - MCP session ID extracted from
Mcp-Session-Idheader for event correlation
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
src/index.ts |
`` | Captures every client handshake with clientName, clientVersion, sessionId |
src/index.ts |
`` | Captures every tool dispatch with toolName, parameters, response, durationMs, isError |
src/index.ts |
`` (via isError: true) |
Error details captured alongside failed tool calls |
Issues
No issues.
Other completed criteria
- Events represent real server actions (MCP protocol handshakes and tool invocations)
- Events enable product insights — can build funnels on tool usage, error rate trends, and duration analysis
- Events include rich contextual properties (timing, parameters, response data, session correlation)
- No PII in event properties — only tool names, parameters, and technical metadata
- Event naming follows standard PostHog MCP convention (
*prefix)
Reviewed by wizard workbench PR evaluator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated wizard CI run
Source: wizard-pr
Trigger ID:
8dccaacApp:
custom-dispatcher/hono-serverApp directory:
apps/custom-dispatcher/hono-serverWorkbench branch:
wizard-ci-8dccaac-custom-dispatcher-hono-serverWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-07-03T00:57:11.194Z
Duration: 141.0s
YARA Scanner