[CI] (3f39e0e) typescript-sdk/stdio-server - #4181
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 adds PostHog analytics to a minimal MCP (Model Context Protocol) stdio server by installing
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | Valid TypeScript, correct imports, no syntax issues |
| Preserves existing env vars & configs | Yes | Existing server tools and transport logic are untouched |
| No syntax or type errors | Yes | All new code is syntactically valid TypeScript |
| Correct imports/exports | Yes | PostHog from posthog-node and instrument from @posthog/mcp are correct |
| Minimal, focused changes | Yes | Only PostHog-related additions, no scope creep |
| Pre-existing issues | Stale package.json description says "PostHog-less" |
Not introduced by this PR |
Issues
- Missing
.env.example: The two required environment variables (POSTHOG_PROJECT_TOKEN,POSTHOG_HOST) are only documented via a runtimethrow. A committed.env.examplewith placeholder values would make setup self-documenting. [MEDIUM]
Other completed criteria
- Build configuration is valid —
package.jsonscripts and dependencies are well-formed - Existing app code and configs are fully preserved
- Changes are minimal and focused on PostHog integration only
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-node@5.53.0 and @posthog/mcp@0.18.0 added to package.json |
| PostHog client initialized | Yes | new PostHog(token, { host }) — correct Node SDK initialization pattern |
| capture() | Yes | instrument(server, posthog, { captureModel: true }) auto-captures MCP tool calls |
| identify() | N/A | Server-only app — no browser sessions to identify |
| Error tracking | No | Process-level errors in main().catch() are not captured to PostHog |
| Reverse proxy | N/A | Server-only app — reverse proxy is only for browser SDKs |
Issues
- No error tracking: The
main().catch()handler writes to stderr and exits but does not send the error to PostHog. Capturing exceptions before shutdown would provide visibility into server crashes. [MEDIUM]
Other completed criteria
- API key correctly loaded from
process.env.POSTHOG_PROJECT_TOKEN(not hardcoded) - Host correctly loaded from
process.env.POSTHOG_HOST - Graceful shutdown via
process.on('SIGTERM')callsposthog.shutdown()to flush events instrument()call is placed immediately after server creation, before tool registrations — correct order
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
src/index.ts |
mcp_tool_called (auto via instrument()) |
instrument(server, posthog, { captureModel: true }) automatically captures every MCP tool invocation (echo, add) with model metadata. These events enable tracking tool usage patterns across MCP sessions. |
Issues
None — the @posthog/mcp instrument() function handles event capture automatically with meaningful names and properties.
Other completed criteria
- Events represent real user/agent actions (MCP tool invocations)
- Events enable product insights (tool usage funnels, frequency analysis)
- Events enriched with model properties via
captureModel: true - No PII placed in event properties
- Event naming is handled by the SDK with consistent conventions
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:
3f39e0eApp:
typescript-sdk/stdio-serverApp directory:
apps/typescript-sdk/stdio-serverWorkbench branch:
wizard-ci-3f39e0e-typescript-sdk-stdio-serverWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-09-23T22:24:21.139Z
Duration: 126.1s
YARA Scanner